You are not logged in.

#1 2010-10-30 14:00:52

no_mad
Member
Registered: 2010-10-21
Posts: 19

HAL or UDEV

I was nearly posting this case to newbie area but after concerning I placed it here, since fall, 2009 I started to use Arch Linux after some other distributions, and I have actually only one problem,(most of other I can solve from material gained from web and learn from those). It is larger subject conserning HAL and UDEV I am not fully aware of their differences but according to one Arch Linux resource: 

HAL functions largely overlap with udev and kernelspace functionality. Therefore, HAL is rapidly becoming obsolete in favor of udev. Currently, a small number of programs still rely on and use HAL, though development is heading toward utilizing udev as a replacement in the near future.

which made me to go study UDEV, and it's possibilities. and I have to admit that presicely when speaking of CD/DVD compactflash or other readers or USB... UDEV is not working.

I have made now several Arch machines, with UDEV rule taken from:

https://wiki.archlinux.org/index.php/Ud … SB_devices

I'm myself capable to controll manually those medias, but it is not practical and it takes time. Also I haven't found any method to compete with HAL based system to automount and letting user privs to umount the device from Xfce4 or Lxde. if there is, it is not described on that UDEV site which I linked above earlier. I have tried them all except LUKS based rules due I haven't yet installed any encrypted media. Just to start from this:

" Mount CDs: To auto mount a CD a simple UDisks wrapper will get the job done properly. "

it is not working neither did Udiskie etc. systems.

to continue with this:

Mount SD cards: The same rules as above can be used to auto-mount SD cards, you just need to replace sd[a-z][0-9] by mmcblk[0-9]p[0-9]: "

...not working

I have read dozens threads concerning this problem where some can't get Udev to work and those responding have get it to function but not giving working solution. I could easily use those auto mount rules provided  on Udev Arch.Wiki site but If I make install to some of my friends who are not that familiar with terminal usage, it makes it impossible to them to use system. I used days in time around this, seeking solution, and yesterday NIGHT while installing Arch to my friends computer I get just frustrated, and installed HAL and all those CD/DVDs come to desktop is able to umount them or mount them seeing their content...getting USB's SDs CF to run without hassle.

I am not attacking anyone and also understanding that system is free I haven't had to pay for it so no one owns anything to me, I also understand that system change out from HAL to UDEV is happening on whole Linux area and not only bugging inside Arch Linux. I am just saying that article on Arch.Wiki for UDEV is not working and it is misleading to make one believe it makes solution for this problem it is absolutely better not to make any tutorial than one which is not leading to solution named in it.  Together they brake my drawing pad configuration and it is not working.

Offline

#2 2010-10-30 14:48:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: HAL or UDEV

FYI these rules from that wiki article work for me with USB storage devices - I don't use CD/DVDs so I can't comment on that.

If you want to use HAL, use HAL - just bear in mind that it will become obsolete, so you will need to apply an alternative solution at some stage.

Many pages in the wiki are wrong, for various reasons - if you don't have sufficient motivation to fix them, at least post your comments under the page's discussion tab.

Offline

#3 2010-10-30 14:57:08

bzipitidoo
Member
Registered: 2010-01-29
Posts: 33

Re: HAL or UDEV

These are similar to questions I have.  What desktop environment are you using?  I am using LXDE.

Seems automount doesn't work well in LXDE.  Closest I've gotten works like this:  entries in /etc/fstab show up in the left panel of pcmanfm, LXDE's file manager.  So by manually editing fstab, I can get pcmanfm to show the devices.  I have not come across any other way to do it.  HAL + dbus + pmount, with the user added to group "hal", as suggested in Arch's LXDE wiki, apparently does nothing.  UDEV also does nothing.  I'm missing links between the kernel detecting new media, and that information making into the desktop environment, and being used.

Manual editing of fstab has lots of problems.  When I try to access these items through pcmanfm, it will try to mount them, even if they are already mounted.  In the latter case, pcmanfm throws up an annoying error message about the device already being mounted.  Next, fstab entries aren't flexible.  I would like some indication of media presence, for instance, show a device in the left panel only when there is some media present, or change its appearance.  But pcmanfm always lists all the entries in /etc/fstab whether or not any media is present.  And, the exact device isn't consistent.  For flash drives, /dev/sdf1 is most common, but sometimes /dev/sdf is the correct device.  To cover both possibilities takes 2 entries in fstab, both of which pcmanfm always displays.  Ugly.

Offline

#4 2010-10-30 15:23:59

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL or UDEV

pcmanfm-0.9.8 uses udisks for mounting, which means you need to have that working. How do oyu start your environment? If via .xinitrc, it should contain this:

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startlxde

Offline

#5 2010-10-31 10:57:17

no_mad
Member
Registered: 2010-10-21
Posts: 19

Re: HAL or UDEV

Tomk: true, changed back to Udev. hope it developes in future to being little bit like Hal letting users mount and automount devices easier, until then it's Ubuntu to their machines who are not capable to handle "terminal" ...and didn't really mean to offend, it's best distro for my own needs this far... I put some time on commenting

bzipitidoo: your comment confirmed it... I didn't actually made this from my own mind, someone else also sees it smile I use Xfce4 and Lxde , possibly changeing fully to later one, feels faster and enough stable.

Gusar: I used .Xinitrc with command: exec ck-launch-session startlxde , then I had this HAL testing, but took that away now I'm back in only Udev system. after I changed to your recommendation, it mounts usb devices to /media . I have to still seek solution for CD/DVD no I can do it only manually, maybe it is something under fstab which needs to change.

Offline

#6 2010-10-31 11:07:57

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: HAL or UDEV

So, are you trying to get udev working?

I wrote the wiki entries on udiskie. I started using it because it worked without any configuration. I couldn't get any of the udev rules to work for me.

I use a window manager and file manager that have no udev or hal or auto-mount support (Window Maker and emelFM2)

I think it's necessary to start DBUS in your .xinitrc file. I have this before calling "udiskie &":

if which dbus-launch &>/dev/null && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    eval $(dbus-launch --sh-syntax --exit-with-session)
fi

Does that work for you?

Offline

#7 2010-11-05 16:10:23

bzipitidoo
Member
Registered: 2010-01-29
Posts: 33

Re: HAL or UDEV

Gusar:  You are right, I start LXDE with inittab and xinit.  And use HAL.  Had "exec ck-launch-session startlxde" in xinitrc.  Changed it to the line you suggested.  Also commented out my additions to fstab.  But, still no automount.

I wonder... I've been mounting by device name (sdf1, etc).  Maybe I should use mounting by device ID?  Not sure where in the configuration that would be.

I haven't given udev a proper try.  Udev is present, but I haven't written any rules for it.  A problem with moving away from HAL was that X used it to detect the mouse and keyboard.  With recent changes in X, maybe I can ditch HAL.

Offline

#8 2010-11-05 16:19:02

bzipitidoo
Member
Registered: 2010-01-29
Posts: 33

Re: HAL or UDEV

Forgot HAL does one other thing:  shutdown.  Won't have shutdown in the Logout dialog without HAL, or so I think.

Since upgrading to 2.6.35, shutdown has been random.  Sometimes the computer shuts off automatically, like it should, and sometimes it doesn't and I have to hold down on the power button for 4 seconds.  Seems to be about 50/50 whether it will shut off.

Offline

#9 2010-11-05 17:56:56

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL or UDEV

If you use pcmanfm-0.9.8, then no, you don't use HAL. With that version you need to get udisks running. That command should do the trick.

You don't need HAL for X anymore since 1.8. Arch has xorg-server-1.9 so you definitely don't need HAL for that.

About shutting down, I'm not sure, but it's possible the latest lxsession can use consolekit for that and as such doesn't need hal anymore either.

Offline

#10 2010-11-06 17:17:31

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: HAL or UDEV

hmm does mounting or even automounting work in the latest pcmanfm release? i can't see any removable device in pcmanfm when i start my window manager with dbus and conolekit nor when hal is running in the background yikes

Offline

#11 2010-11-06 20:46:58

TigTex
Member
From: Portugal
Registered: 2008-06-19
Posts: 301

Re: HAL or UDEV

arch0r wrote:

hmm does mounting or even automounting work in the latest pcmanfm release? i can't see any removable device in pcmanfm when i start my window manager with dbus and conolekit nor when hal is running in the background yikes

Same here... with or without hal, have to use "mount". xinitrc - exec dbus-launch ck-launch-session startlxde
doesn't mount / automount.

Last edited by TigTex (2010-11-06 20:47:27)


.::. TigTex @ Portugal .::.

Offline

#12 2010-11-07 00:03:31

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL or UDEV

Ok, so I actually went and installed pcmanfm-0.9.8. A slightly long post follows, so here's the tl;dr version: I had no success, I went back to pcmanfm-0.5.2.

I don't use lxsession, I start an openbox session, so I changed my .xinitrc to

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session

Well first, this post is correct, consolekit-0.4.2 doesn't work, the session is listed as not active. So I install consolekit-0.4.1 and indeed the session is now listed as active. No devices appear in pcmanfm though. I look around in AUR and see "desktop-privileges". Looks good, it might do the trick. Well, it doesn't. LXPolkit is also there, that might work. I set it up to get started together with the environment, which it does, but still, no devices in pcmanfm.

Playing around a bit more, I discover having both ck-launch-session and dbus-launch in .xinitrc like listed above is what makes udisks work on the commandline, doing 'udisks --mount /dev/sdb1' gets the thing mounted in /media. So that is correct. But pcmanfm is not phased by it.
Then I discover there's no "permissions" column in pcmanfm detailed list view, and I see no way to select which columns you want there. That's when I said "Screw it!" and went back to pcmanfm-0.5.2 and HAL. That works. So I'm sticking with it.

Offline

#13 2010-11-07 08:41:14

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: HAL or UDEV

do i have to give the user special permissions or add it to an extra group to exec udisks --mount /dev/sdb1?

Offline

#14 2010-11-07 10:35:21

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: HAL or UDEV

arch0r wrote:

do i have to give the user special permissions or add it to an extra group to exec udisks --mount /dev/sdb1?

Nope. Consolekit takes care of that. Check with ck-list-sessions that the session is marked as active. And make sure dbus is started *after* ck in your .xinitrc, that's important. Too bad pcmanfm still doesn't work.
Oh well, pcmanfm-0.5.2 and HAL do work. I'll try upgrading from that again when pcmanfm-1.0.0 is released.

Offline

Board footer

Powered by FluxBB