SlackwareThis Forum is for the discussion of Slackware Linux.
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.
The mount will succeed if all of the following conditions are met:
· device is a block device in /dev/
This would require knowing which device node the pendrive was assigned to. It isn't difficult finding that out: A) opening a terminal and running dmesg just after inserting a pen drive, or B) opening a terminal and: "ls /dev/sd* >before"; inserting pen-drive; "ls /dev/sd* >before"; diff <before <after".
The administrator could make small scripts (using pmount) for regular users to use that would make this transparent.
So, unlike what some people are saying, you would not need tons of entries in /etc/fstab corresponding to all kinds of flash drives.
So, when will pmount be able to do things like offer to start Gphoto when a camera is plugged in? ...or trigger initialization of the network stack on wireless USB adapters?
This only vague understanding of what HAL is doing that makes folks think HAL automounts thumbdrives is apparently also making them unable to see that it does indeed have other uses and do other things.
I swear the way some of you guys act, you'd think you'd still be carping about automatic module loading being evil.
I'm encouraged by this thread to do some more work on a program I wrote awhile back which automounts removable devices. It doesn't depend on udev or HAL or even on kernel-2.6. It is designed esepcially for situations like mentioned here, where many users should be able to mount their own device without having any specific entries for them in fstab. Up till now it has been using the regular mount program which brings some difficulties, but I think I'll change it to use a 'promiscuous' version of mount which doesn't check permissions or fstab on its' own. Instead, all the 'policy' code will be written in shell for easier adaptation.
This thread makes me see that there are a few people who need such a tool. I designed it thinking about use in an internet cafe or where many users share the same system and where any unknown USB device could be easily mounted for private or public access.
I wrote it as a solution for kernel-2.4 systems which don't have udev, but it can be adapted for use with udev as well. It doesn't use a daemon -instead it depends on catching kernel events and hooking them to an automounter. It can also handle requests to cxonnect a device to a certain user and can run other commands after mounting the device.
Of course, udev and HAL can work in combination with other programs such as ivman to do much the same thing, but I wanted a program which could be used on low-resource systems. What I wound up with is a program which will automount the device and create desktop icons with only Xlibs as a dependency. It needs to be modularized better so that the user can specify what actions should be performed after mounting. HMMM...
Many people seem to forget that HAL also handles the unmounting and disconnection process. So it's very easy to have entries for /dev/sd{a,b,c} in your fstab file and mount your memory sticks with mount /dev/sda1. [Yet, many of them have to be ejected to be properly disconnected, and some of them have to be ejected as root (as a normal user, the eject operation fails even if you have write permissions on the device file).
I have modified my /etc/fstab file to allow normal users to mount and umount removable devices. Here is how it looks:
Code:
# <filesystem> <mount-point> <type> <options> <dump> <pass>
/dev/hdc /media/cdrom auto noauto,user,exec 0 0
/dev/fd0 /media/floppy auto noauto,owner 0 0
/dev/sda1 /media/sda1 auto noauto,user,exec,umask=000 0 0
/dev/sda3 /media/sda3 auto noauto,user,exec,umask=000 0 0
/dev/sdb1 /media/sdb1 auto noauto,user,exec,umask=000 0 0
I'm not sure what's your point exactly. That's what I said you could do. The problem lies in the "disconnection" part, that is, running "eject" on the device. Sometimes that fails even if your "normal user" has write permissions on the device file. I've had a camera, an MP3 player and a memory stick with that problem. "eject" had to be run as root for it to work.
So, when will pmount be able to do things like offer to start Gphoto when a camera is plugged in? ...or trigger initialization of the network stack on wireless USB adapters?
Most likely never, as that is not what it is intended for. That seems more like udev's territory.
Quote:
Originally Posted by evilDagmar
This only vague understanding of what HAL is doing that makes folks think HAL automounts thumbdrives is apparently also making them unable to see that it does indeed have other uses and do other things.
I swear the way some of you guys act, you'd think you'd still be carping about automatic module loading being evil.
I think HAL is great and even though it may take a little away from stability, I have had no problems thus far (on multiple machines). I notice a big difference in using it, for instance, when I insert my USB mouse on my laptop. Before, I would have to manually configure stuff to be able to use both my mice, but now they both work upon plugging it in. Using cardbus network cards also requires less effort. I no longer have to run dhcpcd or rc.inet1 upon inserting a card. Could I live without it? Sure, but it really doesn't cost that much to use it. If it isn't in the next slackware version I still have my small scripts
Jukebox, Slackware never broke it's philosophy, if you don't need it, just don't install it. There are ton of users like me, that even don't install KDE as we don't use it. Being secure as it is, Slackware was always very up-to-date with software, HAL was a good innovation on the area, why don't include it?
yes i think your right, alot of people like the functionality of HAL. i suppose im just one of those people who like to start from the ground up and do things manually, so i know exactly whats going on, i usually learn more about the things associated too. i figure (rightly or wrongly in this case) more automation brings an increased opportunity for unexpected outcomes (or 'MABAIOUO' for short ) and that bothers me. more parts mean (potentially) more problems. i know that doesnt always follow, but its kind of there in my head.
yes i think your right, alot of people like the functionality of HAL. i suppose im just one of those people who like to start from the ground up and do things manually, so i know exactly whats going on, i usually learn more about the things associated too. i figure (rightly or wrongly in this case) more automation brings an increased opportunity for unexpected outcomes (or 'MABAIOUO' for short ) and that bothers me. more parts mean (potentially) more problems. i know that doesnt always follow, but its kind of there in my head.
I think Slackware is a good balance of having some out-of-the-box conveniences while giving the user good control over everything. The LFS experience would be more like starting everything from the ground up.
It isn't like HAL was added in secret or anything, so anybody who doesn't want it should know to uninstall it.
Just an FYI. Slackware was started by an MSU (Moorhead State University) student across the river from Fargo. An NDSU student from Fargo suggested the name Slackware.
I use Slack on my laptop, someone (a friend) comes up to me with two flash memories and asks me to pass files from one to the other.
They know I'm the go-to guy because I've got Linux and their filthy, virus ridden memory's data can be retrieved ok.
How "convenient" would have been to do that without HAL? Quite easy, buy much nicer WITH than without. Besides, some of my friend have started using Linux just because I've saved so many of their works, and they see it's "just like windows". And yes, they know they're hurting me with those words, it's those kinds of friend... :P
I'm not sure what's your point exactly. That's what I said you could do. The problem lies in the "disconnection" part, that is, running "eject" on the device. Sometimes that fails even if your "normal user" has write permissions on the device file. I've had a camera, an MP3 player and a memory stick with that problem. "eject" had to be run as root for it to work.
I may have misunderstood what you wrote
My point was that, with that fstab file I am mounting and unmounting USB devices (such as memory sticks, cameras, MP3 players) as a normal user. I have deactivated HAL, which was handy but sometimes got in my way. I also didn't want to be root in order to mount something, so I made some changes to fstab.
I don't understand what you mean with "permissions on the device files". You mean /dev/ files? I haven't touched those if that's what you mean. In fact I didn't touched anything else but fstab in order to mount and umount devices as a normal user.
I am doing the mounts from the command line (this is tiring for a lot of mounts but I do it just occasionally).
ive been thinking about this for a while now , and i saw a question on another part of the forum, so i thought what the HAL(!) sorry, anyway,
what is so good about HAL that it was included in slackware? it seems to go against the slackware way. im not trying to be leet here, its just that i can do the same sort of thing with a few simple scripts.
for example, ive got my pen drive and card reader set up so that when i click on a folder on my desktop a simple script is run, which attempts to mount drives/devices (using the UUID's) , then opens my file manager at the correct directory, i can then transfer to or from the device. when im finished, i close the folder and the script continues, and umount unmounts everything for safe disconnection.
the thing is, i now need to install slackware 12 in order to use some programs id like to run, they need updated gtk and some other stuff, but one of the first things im going to have to do when i install slack12 is disable HAL, and it all seems a little bit unecessary.
i still love slackware though, good community too.
just wondered what everyone else thought?
Hey jukebox55, could you PM me instructions on how you did the pen drive mounting script with the folders?
I personally love HAL. I have friends who seem to always try and put linux down, so when I can retrieve damaged files from thier jumpdrives in a matter of minutes, it proves my point. It is also great for the part of my family that believes everything they read on the internet(including pop-ups). Instead of fixing their windows twice a month, I put linux on their machine and I haven't touched it in over a year.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.