Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Don't suggest udev scripts. They're an extremely hacky and inflexible solution. The only reason you should be using them to auto-mount devices is if you're stuck with a distribution that doesn't have support for HAL.
If you have HAL, then you can use a volume manager like ivman. This has several advantages over udev scripts:
1) It doesn't run commands as root.
2) It allows you to access more information about the device.
3) It works for things that udev scripts don't, like inserting and removing CDs.
4) You can configure it either system-wide or on a per-user basis.
5) It can distinguish between media types, like data CDs and audio CDs.
Not that this will do the OP any good, since he's using Slackware, which doesn't support HAL. You could alwasy try to add support for it, but as I recall, that's a rather long and complicated process, possibly involving a kernel upgrade.
Don't suggest udev scripts. They're an extremely hacky and inflexible solution. The only reason you should be using them to auto-mount devices is if you're stuck with a distribution that doesn't have support for HAL.
If you have HAL, then you can use a volume manager like ivman. This has several advantages over udev scripts:
1) It doesn't run commands as root.
2) It allows you to access more information about the device.
3) It works for things that udev scripts don't, like inserting and removing CDs.
4) You can configure it either system-wide or on a per-user basis.
5) It can distinguish between media types, like data CDs and audio CDs.
Not that this will do the OP any good, since he's using Slackware, which doesn't support HAL. You could alwasy try to add support for it, but as I recall, that's a rather long and complicated process, possibly involving a kernel upgrade.
HAL is a user space program, so a kernel upgrade is not needed. Also re-compiling the kernel is not needed. Just a long tedious configuration and hope that all programs work the same way. HAL creates extra headaches because it needs a different configuration that may not always work.
With a combination of sysfs and udev, the user can create a script to figure out the type of format of the CD/DVD disc. Scripts have to be polled or looped every few seconds to check if the user has hit the eject button. With udev you can use the su to be used as a different user when running some commands.
I still recommend let the user manually mount the medium instead of using automounters. IMHO, automounters are horrible because they get in the way of certain tasks like installing games and VMware virtual machines accessing storage devices.
HAL is a user space program, so a kernel upgrade is not needed.
Not if you're using a recent kernel, no. But HAL depends on D-Bus, which requires kernel 2.6.10-rc1 or greater. Last I knew, Slackware was still shipping with a 2.4 kernel, so it would require a kernel upgrade.
Quote:
Originally Posted by Electro
With a combination of sysfs and udev, ...
Yes, you can do it that way, but it's terribly hacky and ad hoc. I know, I've done it. Using HAL is much cleaner. If you want to mess with udev scripts and drive polling, you're welcome to it, but I wouldn't want to go back to that.
As usual, there's a lot of possibilities and i can't choose between them.
About autofs:
Quote:
Kernel automounter version 4 support (also supports v3) (AUTOFS4_FS)
The automounter is a tool to automatically mount remote file systems
on demand. This implementation is partially kernel-based to reduce
overhead in the already-mounted case; this is unlike the BSD
automounter (amd), which is a pure user space daemon.
To use the automounter you need the user-space tools from
<ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/>; you also
want to answer Y to "NFS file system support", below.
To compile this support as a module, choose M here: the module will be
called autofs4. You will need to add "alias autofs autofs4" to your
modules configuration file.
If you are not a part of a fairly large, distributed network or
don't have a laptop which needs to dynamically reconfigure to the
local network, you probably do not need an automounter, and can say
N here.
There's no mention of USB and cdrom devices, so i now presume this isn't what i look for.
Also, is there a way to open a (konqueror) window pointing to USB or CDROM when one of this is inserted?
Using HAL or udev.
And is there another "hidden" solution?
The fact is i don't want users to type or do anything when inserting devices. Because they're just users, not Linux-skilled admins.
And i want to use Slackware because it's Slackware.
Last edited by Linux.tar.gz; 01-17-2007 at 03:48 AM.
For me, udev and HAL but the xml rules of HAL give me a headache.
Quote:
Originally Posted by Linux.tar.gz
Also, is there a way to open a (konqueror) window pointing to USB or CDROM when one of this is inserted?
Using HAL or udev.
Its the default behaviour under kde 3.5, it automounts and opens a konqueror.
And that's true that its not the job of udev to mount the media, only to create the /dev node and then through dbus inform HAL that will do whatever you want (mount, syncrhonise,..your imagination limit)
If you're not set on xfce, you might consider checking out a distribution like Elive, which is based on Debian + Enlightenment: http://www.elivecd.org/
It provides support for auto-playing and such. I have an old K6-2 machine and am going to test it further myself. Here's the documentation page regarding auto-play: http://wiki.elivecd.org/index.php/Mo...nts_and_Medias
I run Slackware only and i wanna give XFce to my beloved users.
Following your advice tried to install ivman...
So i installed those packages:
dbus-1.0.2-i386-1
dbus-glib-0.72-i386-1
git-1.4.4.4-i386-1
Linux-PAM-0.99.6.3-i386-1
PolicyKit-0.1-i386-3 (gave a 0.1 version number as it don't seem to be numbered yet)
probe-input.c: In function `main':
probe-input.c:150: erreur: taille de stockage de « id » n'est pas connue
probe-input.c:192: erreur: « BUS_HOST » non déclaré (première utilisation dans cette fonction)
probe-input.c:192: erreur: (Chaque identificateur non déclaré est rapporté une seule fois
probe-input.c:192: erreur: pour chaque fonction dans laquelle il apparaît.)
probe-input.c:150: attention : variable inutilisée « id »
make[5]: *** [probe-input.o] Erreur 1
make[5]: quittant le répertoire « /home/def/hal-0.5.8.1/hald/linux/probing »
make[4]: *** [all-recursive] Erreur 1
make[4]: quittant le répertoire « /home/def/hal-0.5.8.1/hald/linux »
make[3]: *** [all-recursive] Erreur 1
make[3]: quittant le répertoire « /home/def/hal-0.5.8.1/hald »
make[2]: *** [all] Erreur 2
make[2]: quittant le répertoire « /home/def/hal-0.5.8.1/hald »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/def/hal-0.5.8.1 »
make: *** [all] Erreur 2
Now it's late and i go to bed. C ya around and thanx all.
Last edited by Linux.tar.gz; 01-17-2007 at 04:55 PM.
Try using Gentoo. It is easy to install programs and libraries. Also you can choose what features you want it to include during compile time. Gentoo takes a while to setup for desktops, but it is easy to configure. There are tons of wiki pages at gentoo-wiki.com to get you going.
Getting Linux to be friendly for dummies is going to take a lot of time.
Linux.tar.gz, it looks greek to me. Needs to be in English before I can read it.
Try using Gentoo. It is easy to install programs and libraries. Also you can choose what features you want it to include during compile time. Gentoo takes a while to setup for desktops, but it is easy to configure. There are tons of wiki pages at gentoo-wiki.com to get you going.
Getting Linux to be friendly for dummies is going to take a lot of time.
Linux.tar.gz, it looks greek to me. Needs to be in English before I can read it.
No need anything else than Slack. I learn everyday and i have the most stable and robust distro i ever worked with.
Have you considered installing HAL as part of one of the Gnome for Slackware groups? I'm using Freerock (current), and have to say I like it much better than say dropline. Not that I use Gnome...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.