Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automount removable devices without hal
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Tue Apr 20, 2010 2:10 pm    Post subject: Automount removable devices without hal Reply with quote

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
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Wed Apr 21, 2010 5:44 am    Post subject: Reply with quote

Have you looked into ivman. I'm not sure but I think it does what you want.

:D
_________________
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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 7:42 am    Post subject: Reply with quote

No, it is based on HAL :/
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Wed Apr 21, 2010 8:40 am    Post subject: Reply with quote

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.

:D :D
_________________
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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message
yzg
Guru
Guru


Joined: 18 Jun 2005
Posts: 491

PostPosted: Wed Apr 21, 2010 10:03 am    Post subject: Reply with quote

If you are using KDE, the device notifier widget will do the mounting for you.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Wed Apr 21, 2010 10:07 am    Post subject: Reply with quote

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.

:D :D
_________________
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
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Wed Apr 21, 2010 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Wed Apr 21, 2010 10:44 am    Post subject: Reply with quote

kingfame_147 wrote:
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


You could try "uam", see here: https://bugs.gentoo.org/show_bug.cgi?id=278363 and here http://proj.mgorny.alt.pl/uam/
Back to top
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 11:49 am    Post subject: Reply with quote

Sounds great. I'll have a look at it when I'm at home again.
Back to top
View user's profile Send private message
M
Guru
Guru


Joined: 12 Dec 2006
Posts: 432

PostPosted: Wed Apr 21, 2010 11:50 am    Post subject: Reply with quote

Quote:
You could try "uam", see here: https://bugs.gentoo.org/show_bug.cgi?id=278363 and here http://proj.mgorny.alt.pl/uam/

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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 11:53 am    Post subject: Reply with quote

Well, for CDs u can easly use the fstab, or why u didn't want to use that?
Back to top
View user's profile Send private message
M
Guru
Guru


Joined: 12 Dec 2006
Posts: 432

PostPosted: Wed Apr 21, 2010 12:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 12:19 pm    Post subject: Reply with quote

If u use the auto-option u just have to 'cd' in that folder, don't u?
Back to top
View user's profile Send private message
M
Guru
Guru


Joined: 12 Dec 2006
Posts: 432

PostPosted: Wed Apr 21, 2010 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Wed Apr 21, 2010 7:22 pm    Post subject: Reply with quote

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.

:D :D
_________________
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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Wed Apr 21, 2010 10:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Thu Apr 22, 2010 12:04 am    Post subject: Reply with quote

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.

:D :D
_________________
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
View user's profile Send private message
M
Guru
Guru


Joined: 12 Dec 2006
Posts: 432

PostPosted: Thu Apr 22, 2010 7:52 am    Post subject: Reply with quote

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 :lol: I will stick to uam and ignore all others.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Thu Apr 22, 2010 9:09 am    Post subject: Reply with quote

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. :lol:

Just stick with what works. When that stops working, try something else. That's what I usually do.

:D :D
_________________
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
View user's profile Send private message
discomfitor
l33t
l33t


Joined: 21 Feb 2003
Posts: 927
Location: None

PostPosted: Fri Apr 23, 2010 12:43 am    Post subject: Reply with quote

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 :lol: 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
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1353
Location: Mississippi USA

PostPosted: Fri Apr 23, 2010 1:39 am    Post subject: Reply with quote

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.

:D :D
_________________
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
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Sat Aug 21, 2010 5:53 am    Post subject: Reply with quote

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
View user's profile Send private message
kingfame_147
Apprentice
Apprentice


Joined: 11 Oct 2008
Posts: 171

PostPosted: Fri Aug 27, 2010 9:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum