automount usb-storage..?? 

Newsgroups:  gmane.linux.debian.user
Date:        Wed, 4 Oct 2006 09:49:04 +0200
> I've just upgraded my debian sarge to etch. When I plug usb-storage to my
> computer, it doesn't detect anything. Then after I installed HAL packages
> and autofs package, the auto-detection works but it's not automatically
> mounted and KDE Daemon detect it but I cannot read it instantly from
> Konqueror. Did I miss something?

There might be a slight misunderstanding: KDE does not really automount usb devices in the strict sense of the word. What happens is that an icon pops up on your desktop after you insert a pluggable device or removable media, but it is not mounted. After you click on the icon the device/media will be mounted and opened in konqueror. (You can also configure other actions, e.g. staring a media player if you insert an audio CD.)

As Oguz has already pointed out, you will need udev, dbus and hal. In addition to that it is advisable to install the pmount package and to add your user to the plugdev group. (Then you will not need /etc/fstab entries for the USB sticks.) If these packages are installed you should be able to activate the desktop icons in "K-Menu > Control Center > Desktop > Behavior > Device Icons". The settings for different types of media can be tuned in "Peripherals > Storage Media"; there should also be a dialog if you insert a given type for the first time after activating the icons.

If you still cannot get it to work you should post the output of

dpkg -l udev\* hal\* dbus\* pmount

so that we can check if you have the correct versions of all necessary packages installed.

Florian Kulzer

automount usb-storage..?? 

> > removable media, but it is not mounted. After you click on the icon the
> > device/media will be mounted and opened in konqueror....
>
> USB devices are automounted on my Etch system, but I would prefer the action
> you have described.  Is there a way to get that behavior in my system?

You probably have usbmount or a similar package installed. If you want to use the desktop-integrated handling of the removable devices it is better to uninstall this package (as is recommended in the package description of usbmount). If you do not know which process mounts your devices you can plug one in and check the syslog.

For any desktop environment (DE) that implements the freedesktop.org specifications related to removable media it should be enough to install udev, dbus, hal and pmount, as I have described in my earlier mail for the example of KDE. If you use Gnome you will need the package gnome-volume-manager in addition to that. Then it should should be just a matter of activating the icons in the control center, configuration menu or whatever it is called for the DE that you use.

Here are some troubleshooting tips if it should not work for you:

  1. Check if udev creates the device node after you plug in a usb stick. This should be something like /dev/sda, /dev/sda1, /dev/sdb, /dev/sdb1, etc. I would assume that this is OK for you, since you have some sort of automounting working at the moment.

  2. Remove the usb stick, run "lshal —monitor" and plug it in again. You should see messages about the detection of the medium, its device label, etc.

  3. Still no icons? Make sure they are activated within the DE and check ~/.xsession-errors and the syslog for error messages.

Florian Kulzer

automounting usb-storage 2 

Newsgroups:  gmane.linux.debian.user
Date:        Thu, 5 Oct 2006 00:14:33 +0200
> I read the thread contributed by Florian e.al..
> I have the same/similar problem (etch/KDE3.5.4)
> Plugging in USB-device the automounter pops up with tree options:
> open in new window
> play with kaffeine
> do nothing
>
> Choosing new window I get an empty window /system/media/sda1 and the konqueror-Message:
>
> A security policy in place prevents this sender from sending this message
> to this recipient, see message bus configuration file
> (rejected message had interface "org.freedesktop.Hal.Device.Volume"
> member "mount" error name "(unset)" destination "org.freedesktop.Hal")
>
> What can I do to let every user read its USB-stick?

The version of hal currently in Etch misses an entry for the plugdev group in /etc/dbus-1/system.d/hal.conf. This has been corrected in hal 0.5.8.1-1.

See bug report #377689 for details and a way to fix the problem, or use the file that John Schmidt attached to his message in this thread.

Automounting card readers and USB keys using autofs 

http://www.debian-administration.org/articles/127

Posted by chris in the Debian section on Mon 25 Apr 2005 at 12:57

Following on to the previous article on Card Readers and USB keys using udev we can go one step further and get automounting working.

Most of the information here is taken from http://www.greenfly.org/tips/autofs.html but is modified to match the information from the udev article. The naming conventions of the config files etc are taken from the greenfly article - which includes many more things you can do with autofs :)