Secure Windows File Sharing (Samba) over the Internet without Putty.

Posted November 2nd, 2009 in Linux, Windows by Damian

There are numerous articles describing tunnelling Samba over SSH with putty. In this post I will show you how to set up Samba tunnelling for everyday use without putty running all the time.

Things you need before you start:

An SSH server between you and the shares you want to connect to. It may be running on the same machine as the shares you want to access.

Also, File Sharing (Windows) or Samba (Linux) should be configured correctly on the machine you want to access. Make sure your firewall lets the SSH server connect to your Samba or Windows shares.

Step 1: Create a local loopback interface

We need to create a loopback interface on your local computer first. There is a lot of HOWTOs on the web describing this. I suggest you read this one. As soon as you have the loopback working and putting properly forwarding ports to the local loopback interface, go to step 2.

Step 2: Set up the tunnelling app

So you have the forwarding working now. Technically, that’s all you need. However, if you plan to use shares on a daily basis, there are a few things you will notice:

  • It’s annoying to have the putty window open all the time,
  • If you close it, your shares will become unavailable,
  • If your network goes down for a while, putty won’t be able to reconnect your ssh session.

There’s a solution to these problems: a tunnelling tray application. Personally, I like myentunnel. It’s a simple wrapper for plink.exe from the putty package. Sitting quietly in the task-bar’s tray, it’s unobtrusive and reconnects automatically after a network failure.

Install and run myentunnel. Then set your hostname, username and password stuff in the Settings tab and go to the Tunnels tab. Add the Samba port and IPs in the Local box, press Save and then Connect. If putty connected and forwarded the ports properly, myentunnel should work without a hitch too.

If you have multiple servers to connect to, you can create server profiles. Read the myentunnel documentation for details.

That’s all, enjoy.

Finally! A decent text editor for Linux with Windows key bindings.

Posted May 3rd, 2007 in Linux by Damian

I’ve been using Linux for more than 7 years now. The main thing I do on Linux is text editing. Editing configuration files, source files, html files and what not. Initially I used Midnight Commander’s built-in editor (as probably many of you coming from windowed systems). As I became more experienced and geeky I moved to one of the ‘holy editors’: Vim. Vim is an excellent editor with unlimited possibilities but unfortunately mastering it takes unlimited time as well. I used Vim for several years before realising that all this complexity and a user interface from the 70s were not for me anymore. I needed simplicity. I needed something with Ctrl-C, Ctrl-V for clipboard and Ctrl-F for find. I decided to look for another editor.

Here’s what I was looking for:

  • as many windows-like (CUA) key bindings as possible. At least Ctrl-C, Ctrl-V.
  • syntax coloring
  • basic editing functions like search&replace
  • needs to work on a VT as well as a console without rebinding keys
  • minimum configuration

These features are not particularly demanding, are they? Well, I tried at least a dozen various editors and couldn’t find any that would meet these requirements. Not until I stumbled upon Diakonos.

Diakonos is a simple programmer’s editor for the Linux console that I find almost ideal. It’s open-source, it has all I need and it works out of the box. I’m not going into details (you can read about its features on the homepage), just a screenshot and a list of pros and cons.

Pros:

  • very windows-like key bindings (all that I use, I didn’t rebind a single key!)
  • no configuration needed (although you can configure it pretty extensively if you want to)
  • works on a VT as well as console without reconfiguring putty, .inputrc or anything
  • has all the features you would expect in a basic programmers editor (regexps, etc)

Cons:

  • It’s slow. It is really slow when compared to any other editor (even Emacs). It’s written in Ruby, which is an interpreted language. I’m not sure if it is for Ruby or the author’s laziness but I don’t really care. It works sufficiently fast on my hardware. It saves a lot of my time which is more valuable to me than cpu cycles.
  • Syntax coloring has some problems. I think it has something to do with switching contexts. When editing a PHP file with HTML in it, the coloring sometimes gets funny. Well that’s not a major drawback for me too.

To summarise. If you’re frustrated with complexity of Vim and Emacs, try Diakonos.

Start Sylpheed with only the compose window open (patch)

Posted March 15th, 2006 in Downloads, Linux by Damian

This patch I wrote adds a command-line option to hide Sylpheed’s main window at startup and quit when done composing. Useful if you don’t like your inbox popping up when you click on a mailto link in a browser and Sylpheed is your default mail app.

Example setting in Preferred Applications of Gnome:

sylpheed --no-main-window --compose %s

Note that this is just a dirty patch and it works with Sylpheed 2.0.4. I sent a proposal to sylpheed developers some time ago, but I don’t know if/when the feature will be implemented properly.

Download Sylpheed patch (.gz)

Ubuntu/Debian package: xmms-ahx 0.6

Posted March 15th, 2006 in Downloads, Linux by Damian

This Ubuntu package contains a plugin which lets you play Amiga AHX chiptunes using XMMS.

For those unaware: AHX was a tracker-like music making program for Amiga computers that produced sound similar to Commodore 64. It was developed by the Abyss group and is still popular among oldschool demosceners.

You can get some AHX tunes from Kamson’s lair.

Sources from: https://xmms-ahx.sourceforge.net/ (pretty dated now) … and yes, I’m still using XMMS :)

Download xmms-ahx_0.6_i386.deb