Wednesday, March 07, 2007

Só Danço Samba

I ought to mention that I've successfully mounted Windows shares using the following form:


That's the Server Message Block (SMB) file system, which is what modern Windows OSes use to share files and printers. So if you wanted to mount a share called "Music," located on a server with IP address, to local directory /media/Music, you would enter

sudo mount -t smbfs // /media/Music

and then you'll be able to access the files as though they were stored locally. Don't expect playback of high-quality video files to go smoothly, though. It's like streaming without a buffer, so you'll probably drop a lot of frames. For almost anything else, it's great.

Mac OS X can mount shares from the Finder GUI. Go → Connect to Server… or the ⌘K shortcut opens a window that will let you specify a server address. You can also bookmark frequently used servers. To connect to the server from our previous example, you would type smb:// and click Connect. In my experience, you can also use the computer name. My Windows file server is named "cryptkeeper," so I connect using smb://cryptkeeper, which defaults to the guest account. If you want to specify a user account for login, use smb://USERNAME@HOSTNAME instead.

(Note that you must create the local directory before mounting the share. The mount command won't create it automatically.)

I still need to play around with the mount options, since Ubuntu doesn't seem to recognize the accented letters in certain filenames, e.g., Hüsker Dü, Múm, Röyksopp. Maybe it would help to mount the share with a different character set; UTF-8 springs to mind. I'll probably have to use smbmount if I want to do that, though. I seem to remember reading that mount doesn't actually know anything about smbfs. If I find more info on this, it will be posted here.

No comments: