Search Tillamook Rage
Google Custom Search


Give XFCE Autoplay (Automount)

Windows users are used to the autoplay feature, a handy bit where you can insert a CD and (hopefully) the correct program runs it. Well XFCE has the same feature, just not fully enabled by default. And sometimes it can be a pain, the automount feature can prevent installation using Ubiquity (the Ubuntu graphical installer). So here's the skinny (and maybe the slightly overweight) on the similar features in XFCE, both through the graphical method and through editing the config file.

This procedure was developed using XFCE 4.4.0.

As always, please be careful following procedures from this or any site as they can leave you with a system that's damaged and a pain to fix if a mistake is made. Make backups of any changes you make as always, if editing config files by hand.

Graphical Method

The autoplay features are handled by Thunar's volume management. Thunar is XFCE's file manager. The graphical manager is located in a place where you would never find it unless you knew where to look already. It's in the Settings > Settings Manager > File Manager and then the Advanced tab. You will see the word Configure is in blue, that's where you need to go. Well placed, eh?

The first tab you will see is Storage tab. This refers to removable memory and CD/DVDs. I can't find much difference between the hot-plugged and removable mounting, so I use both. Choosing to browse when inserted will open Thunar to the mounted drive's directory, i.e. /media/disk in some systems. Auto-run can run an executable stored on a disk or USB drive. Auto-open appears to do the same as browse with the files I'm using, but try it yourself if you wish to see how it reacts with the files you use. The command entry is for choosing what burning software you want to use for CDs/DVDs. This will bring up the program and prepare you to burn a disk when inserting a blank CD or DVD, as in XP for those of you used to a Windows environment.

The second tab is for Multimedia applications. This refers to audio and video CDs as well as DVDs. It even has a feature Windows doesn't, it can autoplay from a portable music player, such as an iPod, flash media players, or the Toshiba Gigabeat line.

The third tab, Cameras, is solely for importing photos from a camera when it is connected. You can either set Thunar to open the directory, if you know what the camera will be mounted as, or open a photo viewer or editor. This is handy for setting a computer up as a picture frame.

Yet another cool feature lies in the next tab, PDAs. The software to sync your Palm or Pocket PC device is included with many Linux distros, including Xubuntu.

The Printers tab has a feature that is normally not enabled, but should be. You can have your Linux distro run a script to install a USB printer when it is plugged in. It's a great feature, and one Linux should always have.

Input Devices allows you to execute a command when a USB keyboard, mouse, or tablet is plugged in. I'm not sure what command you would need to run, but maybe someone does.

Editing the Config File Manually

The file you need to manage is /home/(user name)/.config/Thunar/volmanrc. If it doesn't exist you can create it. At the terminal type sudo mousepad /.config/Thunar/volmanrc and then type your password. Here's what the file should look like:

AutoprinterCommand=gnome-printer-add hal://%h

Changing the options to either TRUE or FALSE will change the setting from being enabled or disabled. If an option is not present in the config file then it is automatically disabled. The options fall in line with the graphical version, in order from first tab through to the last. The Command option allows you to enter a command to be run when the automount occurs, for example when a CD is inserted this file is set to start K3B, a CD burning application.

Hope that helps a lot of you wanting to add or remove some of the drive management within XFCE.

1 comment:

Anonymous said...

Thanks for the tutorial! It answered my question, and solved a big headache I've been working around for a long time on XFCE.