FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-17-2011, 08:07 AM
Raffaele BELARDI
 
Default USB automount with LXDE

When I need to mount a removable USB device on LXDE (~amd64) I currently
manually issue the mount command. What do I need to do to make
automounting possible?

According to LXDE wiki (1) you need HAL, which I don't have on my
system. I found several suggestions on the net but none seems promising.
Any hints to point me in the right direction?

raffaele

(1)
http://wiki.lxde.org/en/LXDE:Questions#Does_LXDE_automount_plugged_in_remo vable_devices_.28USB_drives.2C_Flash_disks.2C_etc. 29.3F
 
Old 11-17-2011, 08:47 AM
James Broadhead
 
Default USB automount with LXDE

On 17 November 2011 09:07, Raffaele BELARDI <raffaele.belardi@st.com> wrote:
> When I need to mount a removable USB device on LXDE (~amd64) I currently
> manually issue the mount command. What do I need to do to make
> automounting possible?
>
> According to LXDE wiki (1) you need HAL, which I don't have on my
> system. I found several suggestions on the net but none seems promising.
> Any hints to point me in the right direction?
>
> raffaele
>
> (1)
> http://wiki.lxde.org/en/LXDE:Questions#Does_LXDE_automount_plugged_in_remo vable_devices_.28USB_drives.2C_Flash_disks.2C_etc. 29.3F

udev can do it - here's an Arch guide which is probably helpful:
https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices

Personally, I use pmount, which allows plugdev-users to mount without sudo.

gentoo-wiki has an article on "AutoFS", but I've no idea about that.
 
Old 11-17-2011, 08:57 AM
Pandu Poluan
 
Default USB automount with LXDE

On Nov 17, 2011 4:51 PM, "James Broadhead" <jamesbroadhead@gmail.com> wrote:

>

> On 17 November 2011 09:07, Raffaele BELARDI <raffaele.belardi@st.com> wrote:

> > When I need to mount a removable USB device on LXDE (~amd64) I currently

> > manually issue the mount command. What do I need to do to make

> > automounting possible?

> >

> > According to LXDE wiki (1) you need HAL, which I don't have on my

> > system. I found several suggestions on the net but none seems promising.

> > Any hints to point me in the right direction?

> >

> > raffaele

> >

> > (1)

> > http://wiki.lxde.org/en/LXDE:Questions#Does_LXDE_automount_plugged_in_remo vable_devices_.28USB_drives.2C_Flash_disks.2C_etc. 29.3F


>

> udev can do it - here's an Arch guide which is probably helpful:

> https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices

>

> Personally, I use pmount, which allows plugdev-users to mount without sudo.

>

> gentoo-wiki has an article on "AutoFS", but I've no idea about that.

>


What about mdev? Can it do that too?


Rgds,
 
Old 11-17-2011, 09:37 AM
Neil Bothwick
 
Default USB automount with LXDE

On Thu, 17 Nov 2011 10:07:11 +0100, Raffaele BELARDI wrote:

> When I need to mount a removable USB device on LXDE (~amd64) I currently
> manually issue the mount command. What do I need to do to make
> automounting possible?

The simplest option is to emerge uam.


--
Neil Bothwick

Will the last human please uninstall internet.exe.
 
Old 11-17-2011, 12:22 PM
Raffaele BELARDI
 
Default USB automount with LXDE

On 11/17/2011 11:37 AM, Neil Bothwick wrote:
> On Thu, 17 Nov 2011 10:07:11 +0100, Raffaele BELARDI wrote:
>> When I need to mount a removable USB device on LXDE (~amd64) I currently
>> manually issue the mount command. What do I need to do to make
>> automounting possible?
>
> The simplest option is to emerge uam.
>

Thanks to all, summarizing:

1. udev rules: mounts automatically, with pmount can do non-root un-mounting
2. mdev: according to the man page works only at system boot
3. uam: does not require fiddling with udev rules but cannot un-mount

I suppose I'll go with 1.

Next question: will pcmanfm automatically display an icon for the newly
mounted media and delete it once it is unmounted?

raffaele
 
Old 11-17-2011, 01:06 PM
Neil Bothwick
 
Default USB automount with LXDE

On Thu, 17 Nov 2011 14:22:35 +0100, Raffaele BELARDI wrote:

> 1. udev rules: mounts automatically, with pmount can do non-root
> un-mounting 2. mdev: according to the man page works only at system boot
> 3. uam: does not require fiddling with udev rules but cannot un-mount
>
> I suppose I'll go with 1.

3 is wrong, you can unmount with pmount, exactly the same as with 1.

uam is basically a set of udev rules that effectively does 1 for you.
That's why I described it as the simplest option.


--
Neil Bothwick

WinErr 013: Unexpected error - Huh ?
 
Old 11-17-2011, 01:58 PM
Raffaele BELARDI
 
Default USB automount with LXDE

On 11/17/2011 03:06 PM, Neil Bothwick wrote:
> On Thu, 17 Nov 2011 14:22:35 +0100, Raffaele BELARDI wrote:
>> 3. uam: does not require fiddling with udev rules but cannot
>> un-mount
>
> 3 is wrong, you can unmount with pmount, exactly the same as with
> 1.
>
> uam is basically a set of udev rules that effectively does 1 for
> you. That's why I described it as the simplest option.
>

Ok, I got a wrong impression reading the README: "The pmount utility
can be used to manually unmount removable devices mounted by uam which
can't be done by uam due to its reliance on udev triggers."

The ArchWiki link on Udev posted by James shows how to set a rule for
un-mounting:

ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/su tomk -c
'/usr/bin/pumount /media/%E{dir_name}'"

Based on your feedback I suppose the same can be done (or is done?)
with uam.

raffaele
 
Old 11-17-2011, 02:54 PM
Neil Bothwick
 
Default USB automount with LXDE

On Thu, 17 Nov 2011 15:58:03 +0100, Raffaele BELARDI wrote:

> The ArchWiki link on Udev posted by James shows how to set a rule for
> un-mounting:
>
> ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/su tomk -c
> '/usr/bin/pumount /media/%E{dir_name}'"
>
> Based on your feedback I suppose the same can be done (or is done?)
> with uam.

The problem with such a rule is that it is executed after the device is
removed, so it cannot unmount the filesystem cleanly. The only way to do
that would be for udev to know you were going to remove the drive before
you actually unplugged.

I thought that pcmanfm, the LXDE file manager, had a context menu option
to unmount.


--
Neil Bothwick

It's no use crying over spilt milk -- it only makes it salty for the cat.
 
Old 11-18-2011, 06:48 AM
Raffaele BELARDI
 
Default USB automount with LXDE

On 11/17/2011 04:54 P, Neil Bothwick wrote:
> I thought that pcmanfm, the LXDE file manager, had a context menu
> option to unmount.
>

Me too, and I think that a long time ago I did have it, but now it's
not there. Probably I'd better try on the lxde mailing list.

thanks,

raf
 

Thread Tools




All times are GMT. The time now is 05:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org