Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-11-2008, 10:34 PM
|
#1
|
|
LQ Newbie
Registered: Jun 2008
Posts: 3
Rep:
|
is Thunar the only solution?
hi guys, i'm a puzzled man. let me explain. i'm a fluxbox and thunar user and every time i insert a cd or usb, i only have to open thunar and the newly inserted device pops up automagically in the thunar menu. one click and i can access the files as a common user.
now, this makes me suspect that there is maybe a simple terminal command to have access to the new inserted devices without the help of thunar and without being root or modifying fstab, since i've been able to mount/umount everything as a common user, but with thunar, and thunar must be using some unknown command (for me). any thoughts wd be really appreciated 
|
|
|
|
06-11-2008, 11:10 PM
|
#2
|
|
Member
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977
Rep:
|
Thunar uses the HAL daemon to mount and dismount removable media automatically. I don't know if there is a CLI way to control HAL, I haven't seen one yet.
|
|
|
|
06-12-2008, 12:03 AM
|
#3
|
|
Member
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364
Rep:
|
This one intrigued me. So i thought i'd have a little look.
I think you are looking for exo-mount, exo-umount and exo-eject.
However when i had a little play with a usb stick which was mounted at /media/disk and done a quick "exo-umount /media/disk" it says "exo-unmount: Must specify HAL device UDI or device file." So the next thing would be to work out the UDI.
But for me that will be another day.

Last edited by snowtigger; 06-12-2008 at 12:05 AM.
Reason: spelling
|
|
|
|
06-12-2008, 07:56 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2008
Posts: 3
Original Poster
Rep:
|
thanks my friend, that's new for me, and i just tested it and got the same answer from the sytem, so what's next? doesn't matter, for at least i have a clue right now, i'm going to investigate ex-mount/umount 
|
|
|
|
06-12-2008, 08:45 PM
|
#5
|
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,965
|
Set udev rules.
http://www.reactivated.net/writing_udev_rules.html
For example, I have this on my /etc/udev/rules.d/99-usb-storage.rules file:
Code:
KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="DataTraveler 2.0", NAME+="kingston%n", GROUP="usb", MODE="0775"
ACTION=="add", NAME=="kingston[1-9]", RUN+="/bin/mkdir -p /mnt/kingston%n"
ACTION=="add", NAME=="kingston[1-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="ext2", RUN+="/bin/mount -t ext2 -o rw,noauto,nodev,nosuid,noexec,noatime,users,group /dev/kingston%n /mnt/kingston%n"
ACTION=="add", NAME=="kingston[1-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="ext3", RUN+="/bin/mount -t ext3 -o rw,noauto,nodev,nosuid,noexec,noatime,users,group /dev/kingston%n /mnt/kingston%n"
ACTION=="add", NAME=="kingston[1-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,users,group,umask=000 /dev/kingston%n /mnt/kingston%n"
ACTION=="add", NAME=="kingston[1-9]", RUN+="/bin/chmod 0775 /mnt/kingston%n"
ACTION=="add", NAME=="kingston[1-9]", RUN+="/bin/chown root:usb /mnt/kingston%n"
ACTION=="remove", NAME=="kingston[1-9]", RUN+="/bin/umount -l /mnt/kingston%n"
ACTION=="remove", NAME=="kingston[1-9]", RUN+="/bin/rmdir /mnt/kingston%n"
When the usb key is plugged, this automatically creates a mount point under /mnt, mount the device under it selectively, depending on the detected filesystem (I use many usb storage devices, with different filesystems), and when I plug it off, it forces the umount of the device (yeah, it's ugly, but as long as you use sane mount options you are not going to have a problem, in any case you can always make a manual sync before you unplug).
Other than that, you could very well use ivman as well, which is a dbus/hal based program that can automatically mount and umount removable devices.
|
|
|
|
06-12-2008, 09:38 PM
|
#6
|
|
LQ Newbie
Registered: Jun 2008
Posts: 3
Original Poster
Rep:
|
thank you i92, i'm going to test both options, at first sight it seems the udev rules strategy is a little bit difficult, but, i know from experience that with some time i will become familiarized with it. i don't know about ivman, but then again, yet another clue to investigate, learn and possible solve the problem of automounting via CLI or something simple without gui help.
|
|
|
|
06-12-2008, 09:42 PM
|
#7
|
|
Member
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977
Rep:
|
The udev method is great for USB devices. It is actually very simple to add, assuming your distro already uses udev, which most do. The only drawback with it is the lack of support for CD/DVD automounting.
|
|
|
|
06-12-2008, 09:51 PM
|
#8
|
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,965
|
Quote:
Originally Posted by elliott678
The udev method is great for USB devices. It is actually very simple to add, assuming your distro already uses udev, which most do. The only drawback with it is the lack of support for CD/DVD automounting.
|
That's true as far as I know. In that case, ivman is what I'd use if I wanted to automount a cdrom. However, it failed for me in lots of colorful ways in the past, forcing me to umount -l the drives and confusing the system and lots of programs.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:12 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|