LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-15-2008, 09:23 AM   #31
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73

Quote:
Originally Posted by jschiwal View Post
Code:
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.
 
Old 03-16-2008, 04:23 AM   #32
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Quote:
Originally Posted by shadowsnipes View Post
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.
 
Old 03-16-2008, 05:19 AM   #33
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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...
 
Old 03-16-2008, 10:03 AM   #34
jsmith6
Member
 
Registered: Feb 2006
Distribution: Slackware 13.1 / 13.37
Posts: 91

Rep: Reputation: 16
Quote:
Originally Posted by rg3 View Post
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
 
Old 03-16-2008, 05:05 PM   #35
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
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.
 
Old 03-16-2008, 06:43 PM   #36
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by evilDagmar View Post
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 View Post
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
 
Old 03-16-2008, 07:36 PM   #37
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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?

It's easy as:
# removepkg /var/log/packages/hal*
 
Old 03-16-2008, 08:04 PM   #38
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
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.

Last edited by jukebox55; 03-16-2008 at 08:05 PM.
 
Old 03-16-2008, 08:55 PM   #39
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by jukebox55 View Post
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.
 
Old 03-18-2008, 04:39 AM   #40
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 03-19-2008, 05:41 PM   #41
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Rep: Reputation: 30
I've had this happen to me many times:

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
 
Old 03-21-2008, 08:38 AM   #42
jsmith6
Member
 
Registered: Feb 2006
Distribution: Slackware 13.1 / 13.37
Posts: 91

Rep: Reputation: 16
Quote:
Originally Posted by rg3 View Post
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).
 
Old 03-23-2008, 04:35 PM   #43
barn63
Member
 
Registered: Jan 2006
Location: Macomb, IL
Distribution: Slackware 13.1
Posts: 152

Rep: Reputation: 17
Quote:
Originally Posted by jukebox55 View Post
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?
 
Old 03-23-2008, 05:19 PM   #44
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
message sent barn.
 
Old 03-23-2008, 07:46 PM   #45
Zujin
LQ Newbie
 
Registered: Nov 2004
Location: Lower Alabama
Distribution: Slackware 12.1
Posts: 18

Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/media/.hal-mtab and /media/.hal-mtab-lock SlowCoder Linux - General 2 05-13-2008 04:17 PM
Hal Ephracis Linux - Hardware 4 10-09-2007 01:40 PM
hal... Rayning Slackware 6 07-07-2007 12:49 PM
How to use HAL wesd Linux - Software 1 06-11-2007 04:00 PM
hal krusty_lab Fedora 3 10-10-2005 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration