LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-22-2012, 05:09 PM   #1
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Rep: Reputation: 10
Question AutoFS: any way to show the mount dir *before* it is mounted?


AutoFS is great for automatically mounting and unmounting media, but doesn't work very well with graphical file managers - the directory where a drive will be mounted doesn't show up when the drive is plugged in, so you have to enter it into the file manager's location bar every time. There is the "--ghost" option, but that only makes the directory stay present after the drive has been unmounted - it doesn't make it show up beforehand.

Is there any way to make the directory appear as soon as the relevant device is plugged in, so that file managers can easily be used to access it?

NB: I know one possible solution is to use a direct mapping. But that's useless to me, because it can handle only one drive at a time; an indirect mapping can handle as many as I want.
 
Old 05-22-2012, 06:48 PM   #2
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
set a bookmark for the share in your file manager and then use that to access the share via autofs.

but there is also some confusion here as a directory is a file and a file's contents can't be shown without mounting the file system where the directory resides.

Also, 'plugging in' a drive is handled by udev and the drive should show up in /media when plugged in if there are recognizable file systems on the drive. The name of the mount point in /media is usually the label for the partition.

autofs works well for remote file systems that you want to access transparently but not have tied to your machine all the time like for NAS using SMB or NFS shares. It mounts them when you use them and then dismounts them after a time out of non use that you can specify.

You can use a file browser's capability to browse the network to see what servers are on your LAN and what they have for share - with nautilus, that mounts them via gvfs. Those can also be bookmarked and the credentials for access saved.
 
Old 05-22-2012, 07:30 PM   #3
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Original Poster
Rep: Reputation: 10
Thanks. That's not quite what I was looking for though... Better would be a way to let the file manager easily access *any* AutoFS mountable medium that is currently plugged in. Is that possible?

(udev/udisks is nice in theory, but often broken in practice, particularly if you don't use a login manager.)
 
Old 05-23-2012, 08:54 AM   #4
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
ok, must be trolling. sorry I didn't catch that.

autofs isn't really intended for plug-in devices

udev works quite well for handling plug-in stuff from anything I can see

discovery of attached storage via plugged in or via LAN attachment is a part of most popular file browsers

using the right tool for the job to be done is important in any effort

customizing the system to avoid login managers is way way out there and doing that really restricts your access to the outside world

computers don't employ ESP so they don't know what you don't tell them
 
Old 05-23-2012, 10:00 AM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Set the main autofs directory up at a separate location, like /mnt/automount. Then create a second directory containing symlinks to the actual mount directories. Accessing a symlink should act the same as accessing the mount directory itself.
 
Old 05-23-2012, 10:26 AM   #6
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by bryanl View Post
ok, must be trolling. sorry I didn't catch that.
No, not trolling.

Quote:
autofs isn't really intended for plug-in devices

udev works quite well for handling plug-in stuff from anything I can see

discovery of attached storage via plugged in or via LAN attachment is a part of most popular file browsers

using the right tool for the job to be done is important in any effort

customizing the system to avoid login managers is way way out there and doing that really restricts your access to the outside world

computers don't employ ESP so they don't know what you don't tell them
Thanks.

I wouldn't call avoiding login managers "way out there" though. KDM, GDM, and LightDM are all rather heavy for older computers, Slim and WDM don't work with Consolekit, XDM does not work reliably with ConsoleKit, and LXDM is quite buggy in my experience.
 
  


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
Autofs problem - shares are not mounted igor012 Linux - Networking 1 03-21-2012 09:34 AM
Why does AutoFs show ext2? dman777 Linux - Software 2 01-03-2011 09:29 PM
mount --bind; changes to mounted dir do not update original? Solution? chibi Linux - General 1 08-17-2009 07:57 AM
autofs creates mountpoints for things that it hasn't mounted arizonagroovejet Puppy 0 04-20-2009 04:30 AM
cannot edit dir mounted by autofs kazador Linux - Newbie 1 06-29-2006 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:49 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