View previous topic :: View next topic |
Author |
Message |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Tue Apr 20, 2010 2:10 pm Post subject: Automount removable devices without hal |
|
|
Hi,
as of xorg-server-1.8.0 I removed hal from my system (never liked it mutch, and hal isn't developed anymore).
I allways used "halevt" for automountig usb sticks, cameras, mobiles etc.
How u guys do that without hal? Is there a good solution with udev?
I don't want to mount only specific devices with 2-3 udev rules. I need a way to mount any remv. device :)
Regards,
fame |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Wed Apr 21, 2010 5:44 am Post subject: |
|
|
Have you looked into ivman. I'm not sure but I think it does what you want.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 7:42 am Post subject: |
|
|
No, it is based on HAL :/ |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Wed Apr 21, 2010 8:40 am Post subject: |
|
|
Well, it won't be for long. Hal is going out soon. I don't recall it using hal a while back tho. I guess it got snuck in somehow.
Maybe this will work.
Quote: | root@smoker ~ # eix autofs
* net-fs/autofs
Available versions: 3.1.7-r5 ~3.1.7-r6 4.1.3-r7 ~4.1.3-r9 5.0.3-r6 ~5.0.4 ~5.0.4-r2 ~5.0.4-r3 ~5.0.4-r4 ~5.0.4-r5 {ldap sasl}
Homepage: http://www.linux-consulting.com/Amd_AutoFS/autofs.html
Description: Kernel based automounter
root@smoker ~ # |
I don't think it uses hal.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 8:54 am Post subject: |
|
|
I thought about that autofs stuff, too. I'm not quite sure if it doe's what I need, but i'll take a closer look at it.
Thanks :) |
|
Back to top |
|
 |
yzg Guru

Joined: 18 Jun 2005 Posts: 499
|
Posted: Wed Apr 21, 2010 10:03 am Post subject: |
|
|
If you are using KDE, the device notifier widget will do the mounting for you. |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Wed Apr 21, 2010 10:07 am Post subject: |
|
|
If he has removed hal, I don't think he has KDE. I'm pretty sure KDE depends on hal being there since pmount requires it. It does here but maybe I have some weird USE flag set somewhere.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
SamuliSuominen Retired Dev

Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Wed Apr 21, 2010 10:08 am Post subject: |
|
|
yzg wrote: | If you are using KDE, the device notifier widget will do the mounting for you. |
not without hal... everything in kde that's hardware specific relies on HAL |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 10:13 am Post subject: |
|
|
Hehe, yeah, no KDE here.
Act. I'm using fluxbox.
If autofs isn't what I'm looking for maybe i'll just wait until hal is gone and use a new mechanism :D |
|
Back to top |
|
 |
SamuliSuominen Retired Dev

Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 11:49 am Post subject: |
|
|
Sounds great. I'll have a look at it when I'm at home again. |
|
Back to top |
|
 |
M Guru

Joined: 12 Dec 2006 Posts: 432
|
Posted: Wed Apr 21, 2010 11:50 am Post subject: |
|
|
Great, I just tried it, works perfectly, too bad it can't mount cds but I rarely use it and when I do I can mount cd manually. I used skvm before, from suckless project but that also uses hal. |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 11:53 am Post subject: |
|
|
Well, for CDs u can easly use the fstab, or why u didn't want to use that? |
|
Back to top |
|
 |
M Guru

Joined: 12 Dec 2006 Posts: 432
|
Posted: Wed Apr 21, 2010 12:14 pm Post subject: |
|
|
Well, it doesn't make any difference if I will type mount /dev/sr0 /mnt/cdrom or just mount /mnt/cdrom , I can assign some shortcut for that, but I didn't bother because as I said lately I rarely use them. |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 12:19 pm Post subject: |
|
|
If u use the auto-option u just have to 'cd' in that folder, don't u? |
|
Back to top |
|
 |
M Guru

Joined: 12 Dec 2006 Posts: 432
|
Posted: Wed Apr 21, 2010 12:38 pm Post subject: |
|
|
I think auto will work just when you turn on computer and all fstab lines are processed and you have disk inside, not later on, for something like that you use autofs. But maybe I am wrong... I remember automounter from mandrake linux worked like that but now with hal polling is used so every n seconds drive is polled for status.
Edit: now I remembered what I also used before, you have some nice settings in /proc/sys/dev/cdrom, you can echo commands or add them in /etc/sysctl.conf, I used lock 0 and wm shortcuts for mount cdrom and sys-apps/eject, you only have to know if app is capable to handle force eject but that is up to you and your usage, so you can use happily http://proj.mgorny.alt.pl/uam/ , those are just udev rules with some nice shell scripts to handle all usb sticks, there is no daemon. Then just set some shortcuts for mount/umount/eject cdrom... It is a little stupid to have daemon to always poll for this info (for laptop especially), but udev also doesn't export this info so for fluxbox, openbox or similar uam and some shortcuts seems like a good combination.
Last edited by M on Wed Apr 21, 2010 8:46 pm; edited 1 time in total |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Wed Apr 21, 2010 7:22 pm Post subject: |
|
|
Well, you do have another option. It is what is replacing hal anyway. There are two entries and I am not sure which you will need. Here they are:
Quote: | * sys-auth/polkit
Available versions: ~0.96 ~0.96-r1 {debug doc examples expat nls pam}
Homepage: http://hal.freedesktop.org/docs/PolicyKit
Description: Policy framework for controlling privileges for system-wide services
* sys-auth/policykit
Available versions: ~0.9 0.9-r1 {bash-completion doc pam selinux zsh-completion}
Homepage: http://hal.freedesktop.org/docs/PolicyKit
Description: Policy framework for controlling privileges for system-wide services
|
They both have the same link to their home page, they both have the same description as well. Sort of weird. It may be worth a look since things are going that way anyway.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Wed Apr 21, 2010 10:26 pm Post subject: |
|
|
CD support is planed for UAM for the 0.4 release :)
I use cd-roms once in 2 months, nothing important for me.
@dalek
What does the policykit have to do with automounting removable devices?
BTW:
UAM works great. Thats exactly what i wanted: An easy and leightweigth solution with udev, thx for the hint! |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Thu Apr 22, 2010 12:04 am Post subject: |
|
|
kingfame_147 wrote: |
@dalek
What does the policykit have to do with automounting removable devices?
|
I was thinking that it would automount your devices. I have not read up on it yet so it may not do that at all. It is what is replacing hal tho.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
M Guru

Joined: 12 Dec 2006 Posts: 432
|
Posted: Thu Apr 22, 2010 7:52 am Post subject: |
|
|
Actually udisks is replacing hal, PolicyKit was/is used also with hal, they also changed names and confused everyone, as I understand PolicyKit is now polkit, devkit is renamed to udisks, consolekit is still consolekit I guess etc.
So after all these years we still have no standard way of mounting removable devices I will stick to uam and ignore all others. |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Thu Apr 22, 2010 9:09 am Post subject: |
|
|
Actually, devicekit is replacing hal according to the home page. The names have changed so much that who knows what it will be in the end.
Just stick with what works. When that stops working, try something else. That's what I usually do.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
discomfitor l33t


Joined: 21 Feb 2003 Posts: 927 Location: None
|
Posted: Fri Apr 23, 2010 12:43 am Post subject: |
|
|
M wrote: | Actually udisks is replacing hal, PolicyKit was/is used also with hal, they also changed names and confused everyone, as I understand PolicyKit is now polkit, devkit is renamed to udisks, consolekit is still consolekit I guess etc.
So after all these years we still have no standard way of mounting removable devices I will stick to uam and ignore all others. |
Close. Devicekit was a daemon which was going to run in the same way as HAL. It has been deprecated in favor of udisks+upower, both of which are activated through dbus calls and managed through permissions granted through policykit.
As of now, the only desktops that can use udisks/upower are gnome and e17, and there are very few cmd apps that can make use of them. This does not, however, mean that they are not fully functional. _________________ There is no substitute for experience.
Imperfection indicates a lack of effort. |
|
Back to top |
|
 |
dalek Veteran


Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Fri Apr 23, 2010 1:39 am Post subject: |
|
|
I was going by what the home page says. From my understanding the same person wrote both hal and policykit or whatever they are calling this week.
 _________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
 |
SamuliSuominen Retired Dev

Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Sat Aug 21, 2010 5:53 am Post subject: |
|
|
1. udiskie, sys-fs/udiskie in Portage. udisks based automounter. python.
2. wmudmount, x11-plugins/wmudmount in Portage. udisks based dockapp.
3. traydevice, sys-fs/traydevice in Portage. udisks based trayicon. python.
4. udisksevt, haskell(!) based, http://github.com/dpx-infinity/udisksevt
5. package.masked thunar+thunar-volman (using gvfsd+udev+gnome-disk-utility)
6. pcmanfm (using gvfsd or later versions, like git, using udisks)
7. uam (based only on udev), in Gentoo bugzilla, https://bugs.gentoo.org/278363
8. nautilus, of course with gvfsd+udev+and co.
9. ???
I hope that helps. |
|
Back to top |
|
 |
kingfame_147 Apprentice

Joined: 11 Oct 2008 Posts: 171
|
Posted: Fri Aug 27, 2010 9:22 pm Post subject: |
|
|
10. profit :)
Thanks again. I'm using uam since the time I started the topic and it's working great :)
Btw: The uam homepage seems to be down. Bad that such a good approach will not be developed anymore :< |
|
Back to top |
|
 |
|