LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   HAL and the console (https://www.linuxquestions.org/questions/slackware-14/hal-and-the-console-571347/)

kailun 07-22-2007 06:42 AM

HAL and the console
 
I've got automounting working (at least for my cdrom / dvd / optical drive) in KDE.

However, I'm not always in X (my runlevel defaults to console) so I was wondering if the automounting features work outside of KDE? I did try, but nothing happens. What does KDE do to initiate the automount?

As it stands, I can still mount the CD / DVD if I drop into root and issue:

mount -t auto /dev/cdrom /mnt/cdrom

then drop out as my normal user. (I use the '-t auto' because there's no longer an /etc/fstab entry for my optical drive)

Is there a better way of handling it than this (in the console)?

Thanks

MS3FGX 07-22-2007 07:04 AM

HAL does not actually mount anything, or even do anything with connected devices, that is a popular misconception. What HAL actually does is inform the system that a device has been connected to the system, it is up to some software application on the system to be listening for that announcement and act accordingly (in this case, mount the file system on the device). KDE is handling that for you, so once you are outside of X, it no longer happens. HAL is still doing it's thing, but nobody is listening anymore.

To rectify this you need to use a separate HAL event handler like ivman. This works independently without the need of a desktop environment, so will work no matter what runlevel (assuming it is started in that runlevel, obviously).

Unfortunately Slackware does not currently include ivman, so you will need to compile it yourself unless for can find a binary package for it someplace (LinuxPackages.net does not seem to have it). There is a SlackBuild for it, at least.

rworkman 07-23-2007 12:45 AM

Good post, MS3FGX - someone want to sticky this one? I think it's a good candidate. Alternatively, perhaps a link to this in my already-stickied HAL post would be good.

adriv 09-14-2007 04:09 PM

Quote:

Originally Posted by MS3FGX (Post 2832507)
HAL does not actually mount anything, or even do anything with connected devices, that is a popular misconception. What HAL actually does is inform the system that a device has been connected to the system, it is up to some software application on the system to be listening for that announcement and act accordingly (in this case, mount the file system on the device). KDE is handling that for you, so once you are outside of X, it no longer happens. HAL is still doing it's thing, but nobody is listening anymore.

To rectify this you need to use a separate HAL event handler like ivman. This works independently without the need of a desktop environment, so will work no matter what runlevel (assuming it is started in that runlevel, obviously).

Unfortunately Slackware does not currently include ivman, so you will need to compile it yourself unless for can find a binary package for it someplace (LinuxPackages.net does not seem to have it). There is a SlackBuild for it, at least.

Do you NEED ivman when you're not in X?
I can't seem to mount CD's before starting X...

dive 09-14-2007 04:38 PM

Ivman will work in or out of X. An alternative is autofs. I use both those and HAL in kde with no problems at all. Each one works fine depending on how you set them up. I use autofs for auto mounting when I cd into a cd/dvd/phone/thumbdrive from console. Ivman works great for autoplaying DVDs which kde refuses to do properly, and in kde I can just plug in a thumbdrive and open it as a folder or cd into it with terminal.

adriv 09-14-2007 05:01 PM

I believe you when you say it works, but is it really necessary? :)
I mean, suppose X won't start and I want to install a package from a Slackware CD. And ivman is not installed.
How do you do that? Since HAL won't let you mount the 'old-fashioned' way.
I know you can disable HAL and uncomment the line in fstab for cdrom, but that seems like an ugly work-around to me.
Is there another way (out-of-the-box)?

dive 09-14-2007 05:27 PM

mount -t ?

rworkman 09-14-2007 08:56 PM

Quote:

Originally Posted by adriv (Post 2892094)
I believe you when you say it works, but is it really necessary? :)
I mean, suppose X won't start and I want to install a package from a Slackware CD. And ivman is not installed.
How do you do that? Since HAL won't let you mount the 'old-fashioned' way.
I know you can disable HAL and uncomment the line in fstab for cdrom, but that seems like an ugly work-around to me.
Is there another way (out-of-the-box)?

WHERE did this idea that "HAL won't let you mount the 'old-fashioned' way" come from? I'd like to find the individual responsible for that and tenderize them with a clue-cleaver.

onebuck 09-15-2007 09:02 AM

Quote:

Originally Posted by rworkman (Post 2892242)
<snip> I'd like to find the individual responsible for that and tenderize them with a clue-cleaver.

Hi,

I don't think that the udev rules will allow that!


Edit: I was joking about the last sentence that robby posted. I forgot to snip the other. Sorry for mistake.

rworkman 09-15-2007 12:20 PM

For those who want binary packages and don't care to use the "popular" package site, I put ivman and pmount packages in my repo last night. Enjoy! :-)

adriv 09-15-2007 05:06 PM

Quote:

Originally Posted by dive (Post 2892112)
mount -t ?

Nope...
Quote:

Originally Posted by rworkman (Post 2892242)
WHERE did this idea that "HAL won't let you mount the 'old-fashioned' way" come from? I'd like to find the individual responsible for that and tenderize them with a clue-cleaver.

Ehmmm, it just don't work like it used to be.
Quote:

Originally Posted by onebuck (Post 2892653)
I don't think that the udev rules will allow that!

Don't know what the exact cause is (not a programmer, just a hobbyist), but since HAL came along, well...
Quote:

Originally Posted by rworkman (Post 2892822)
For those who want binary packages and don't care to use the "popular" package site, I put ivman and pmount packages in my repo last night. Enjoy! :-)

Thank you very much!
So I guess there is no other way to achieve what I want, without ivman/uncomment the line in fstab?

dive 09-15-2007 05:35 PM

Quote:

Originally Posted by adriv (Post 2893064)
Thank you very much!
So I guess there is no other way to achieve what I want, without ivman/uncomment the line in fstab?

autofs http://www.linuxpackages.net/pkg_details.php?id=8957

onebuck 09-15-2007 05:50 PM

Quote:

Originally Posted by adriv (Post 2893064)
Nope...

Ehmmm, it just don't work like it used to be.

Don't know what the exact cause is (not a programmer, just a hobbyist), but since HAL came along, well...

Thank you very much!
So I guess there is no other way to achieve what I want, without ivman/uncomment the line in fstab?

Hi,

Sorry if you mistook my post. I was joking with robby about his cleaver statement. The udev rules are very important.

I put a reference to link#2 of this thread in the HAL section a 'HAL definition' by MS3FGX within the 'Slackware-Links' which was compiled from 'Slackware LQ Suggestions Links!'.

BCarey 09-15-2007 06:20 PM

Quote:

Originally Posted by adriv (Post 2893064)
Ehmmm, it just don't work like it used to be.

What happens (or doesn't happen) when you try to do it the "old-fashioned way"?

Brian

T3slider 09-15-2007 06:25 PM

I just tried mounting a CD from the console the old-fashioned way by typing the following (as root, since I haven't given my user account permission to mount/unmount):
Code:

$ mount /dev/hda /mnt/cdrom
And it worked perfectly. I didn't have to pass a single option. Wow that's simple. To further prove that HAL doesn't interfere with mounting in any way whatsoever I started X with the CD already in the drive (so KDE wouldn't pop up anything asking me what to do with the CD once I inserted it) and made sure it was unmounted (it was -- ie when KDE started up it didn't automount it). I then typed the exact same thing as root (using su) in a terminal and it worked perfectly.

So either you're doing something incorrectly or your system's toast.

I should also note that my CD drive is still commented out in /etc/fstab.


All times are GMT -5. The time now is 09:36 PM.