LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-08-2007, 01:12 PM   #1
g0ng
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Rep: Reputation: 0
Automount usb drives in specific path


Hi there.

I have a small problem and can't find the solution though I search a lot.

I have a usb drive with my mp3s. When I turn ot on I want to be mounted in /mp3 and preferable open a window in gnome with it's contents.

I have debian unstable, gnome and kernel 2.6.19-2. I have setup udev so as to have the disk shown as /dev/mp3 instead of /dev/u[ab]1. I did this because sometimes I may have another usb disk pluged and occupy /dev/uba1

I know of usbmount but it doesn't do what I want. It mounts the plugged-in disk in one of the available paths you give it.

What I really want is something like that: whenever the disk is plugged execute mount /dev/mp3 (which is of course in fstab)

How can I do it?
 
Old 02-12-2007, 08:26 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
When I turn ot on I want to be mounted in /mp3 and preferable open a window in gnome with it's contents.
AFAIK this is not one but two things: automount stuff and show filemanager in Gnome.

For the automount there's hotplugging:
http://www.qsl.net/n0nb/linux/debianhotplug.html
...or Udev with custom rules:
http://www.disaggregate.com/blog/tec...es/000013.html
http://wiki.archlinux.org/index.php/...es_to_a_device
http://ubuntuforums.org/showthread.php?t=168221

And for the Gnome-open-window thing I don't know if it picks up the mount changes (FAM, Dbus or whatever else). If it doesn't, I do know it works with HAL (the horror, the horror...): just needs some custom rules to mount it under a name you want. Apart from the mind-blistering horror of having to add yet another service plus a cartload of dependencies for something as simple as automounting devices the (big) difference is that with Udev you can make it run scripts which allows for way more fine-grained control over whatever you want control over.
Something I haven't figured out yet how to do with HAL.


Just my thoughts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to automount windows drives in FC6? S_VIN Fedora 3 11-24-2006 06:13 AM
KDE automount failing to moutn drives mhowell Debian 1 06-25-2006 08:45 AM
Optical drives don't automount in Slack 10.1 thorney Linux - Newbie 1 08-06-2005 09:26 AM
Automount in LE 2005 cannot access cdrom drives grimlaur Mandriva 6 05-28-2005 07:32 PM
automount cdrom and pen drives mokojin Slackware 3 10-31-2004 03:56 PM


All times are GMT -5. The time now is 11:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration