I started out using the "Places->Connect to Server..." menu item on the Gnome panel. It's really easy: select "Windows share" in the Service type drop menu, and type in the relevant connection information (server, share, folder, etc.). This worked rather well as long as I was using nautilus for my file transfers. I couldn't figure out at the time how to access the remote files via a script with regular shell commands (e.g. cp, rm, mv).

I just recently learned that I was actually using Gnome VFS, and that files may be copied at the command line with the gnomevfs-copy utility, using the same file URI's that nautilus uses (they start with smb://).

Still, I wanted something that's not tied to Gnome, since I have plans to replace it with something else (I'll have more to say about that in the near future).

For a short while I used scp (secure copy) and sshfs (ssh user-space file system), but this method has several drawbacks: for starters I needed to setup an SSH server on my wife's laptop (available for free as part of Cygwin). It isn't straight forward.

There are other problems:

I can't access my wife's documents folder when I connect with my own username, even though it is shared

Filenames must be in English (I couldn't figure out how to configure this)

the shared folder is treated here as if it is always available - I tried to add the noauto option but then the codepage and iocharset settings were ignored (probably due to a bug in smbmount).

Last week I got fed up with this and searched Google for smbfs - the first link I got pointed me to CIFS VFS -Advanced Common Internet File System for Linux. A few minutes later I tried the following line in /etc/fstab:

One last note: an issue that seems to be a FAQ is how to mount a folder like "My Documents" that's shared on the windows machine? - the problem is that the space messes up /etc/fstab. The solution is to use the octal code for the space character \040, as follows:

Thursday, August 23, 2007

As part of my daily system update, I've upgraded udev to version 0.114-2. I usually take the time to go over the change logs of updated packages, but I haven't done it this time. I probably should have.

I discovered that the disk id format has changed, i.e. the entries in /dev/disk/by-id have changed. This meant that my /etc/fstabsettings for my external USB disk, stopped working. The device name that was used to refer to the disk did not exist anymore.

My first reaction was to use a different method of referencing that drive (e.g. /dev/disk/by-uuid), but I figured I really should handle it the udev way:

use the following to detect the disk serial number (attached as /dev/sda1):

udevinfo -a -p /sys/block/sda | grep serial

add a specific udev rule, in /etc/udev/local.rules

KERNEL=="sd?1", ATTRS{serial}=="DEF1078555F6", SYMLINK+="gigapod"

(this adds a symbolic link /dev/gigapod that points to the disk's first partition).

This way the disk is correctly mounted during the boot process, and there's no need to mount the disk in /etc/init.d/bootmisc.sh. Furthermore, Gnome seems to like it better this way (it was creating two disk icons on the desktop, one named gigapod and the other named backup60g which is the disk label - I now get only the latter).