udev fixing mount point
Hello
I write to you because I don't find any solution or any manuals.
I would like to fix the mount point of several usb devices. This is a classic queries, many people around the world using Linux have the same aim.
Presently, I have only udev and udisks on that part of the process. Hal isn't running anymore, but automounting still works.
I have read many udev rules over the internet, and I have writen at least two that work...
But after working, unmounting in Kde isn't working anymore, whereas the basic settings (plugging usb, let kde/udev/system/whatever mount, work on doc, then unmount with the appropriate button in kde...) work good, but the mount point is ugly and unremindable.
The only thing I want is replace the mount point (aka '/media/6566-3267') by the one I want ( '/media/NeoParker' or '/media/htc' for an other one).
So, is there a rule to put like :
ENV{ID_FS_UUID}=="6566-3267", ENV{MOUNTPOINT}="NeoParker" ?
And it's all, all the rest of the process get its life (creating mount point, mount, ... , unmount, rmdir of the mountpoint) and I haven't any thing to say on it.
The fact is that just a simple rule like the one I have just said would be so easy for every user ... But I don't find any, so, I ask you.
Sorry if I disturb you.
Thank you for your help.
Signature · 4 lines
Stéphane Guedon page web : http://www.22decembre.eu/ carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc
Hi,
Quoted 2 lines · Stéphane Guedon
Presently, I have only udev and udisks on that part of the process. Hal isn't running anymore, but automounting still works.
If there's an /etc/fstab entry for your device, udisks will use that instead of creating a directory itself (udisks simply calls mount(8) as the user). You probably want to use one of the 'user' or 'users' option to allow the unprivileged desktop session to mount the device, otherwise it won't work. For example
/dev/disk/by-uuid/6566-3267 /media/NeoParker auto defaults,users 0 0
should work (you of course need to mkdir that directory yourself).
David
Quoted 14 lines · On Saturday 26 February 2011 19:53:52 you wrote:
Hi,
On Sat, Feb 26, 2011 at 11:36 AM, Stéphane Guedon
Quoted 2 lines · <[email protected]> wrote:
Presently, I have only udev and udisks on that part of the process. Hal isn't running anymore, but automounting still works.
If there's an
/etc/fstabentry for your device, udisks will use that instead of creating a directory itself (udisks simply calls mount(8) as the user). You probably want to use one of the 'user' or 'users' option to allow the unprivileged desktop session to mount the device, otherwise it won't work. For example
Quoted 5 lines
/dev/disk/by-uuid/6566-3267/media/NeoParker auto defaults,users 0 0should work (you of course need to mkdir that directory yourself).
David
So, this means each media to be plugged regulary should have its mountpoint setup before...
And the others are automatic.
Ok...
Thank you !
Signature · 4 lines
Stéphane Guedon page web : http://www.22decembre.eu/ carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc