Fedora Linux Support Community & Resources Center
  #1  
Old 4th November 2012, 01:29 AM
Crowhill Offline
Registered User
 
Join Date: Sep 2011
Posts: 20
linuxfirefox
Automatically mount (i.e. automount) all external devices

Hey hey!

In F17-Gnome (a fresh install), mounting is taken care of by Nautilus. That is, I insert an external device (e.g. Harddrive or USB) and it shows up as munted in Nautilus. Now, I'm using F17-LXDE (a fesh install), where the mounting is done by PCmanFM.

This is all good but nowhere near perfect.

I want F17 to automatically mount all external devices, whether Nautilus or PCmanFM are running or not. This is because if I want to access an external device from, say Ranger, I first have to start Nautilus or PCmanFM for a fraction of a second just to get the device mounted. That's rediculously stupid.

Imagine you have a minimal F17 installation (from the NetInstall image).

a) How do you go about setting up automounting of external devices? (As a rule, you cannot use Nautilus, PCmanFM, ...)

b) How do you get the devices to show up under "/media", instead of under "/run/media"?

c) I've asked question a) in the ArchLinux forum, where I learned that Udiskie can be helpful. (See https://bbs.archlinux.org/viewtopic.php?pid=1128066.) Why does "sudo yum search udiskie" produce no hits at all?

Thanks in advance,
Crowhill
Reply With Quote
  #2  
Old 4th November 2012, 01:15 AM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141
linuxchrome
Re: Automatically mount (i.e. automount) all external devices

a) for things that are always plugged in, make an entry for it in /etc/fstab

b) dunno

c) no one has built an rpm package of udiskie for Fedora. You'll have to download the package from here, and install it yourself (it's in Python, so don't know if you'll have to compile or not, but probably so).

You could also try autofs, it's in the Fedora repos:
Quote:
Name : autofs
Arch : x86_64
Epoch : 1
Version : 5.0.6
Release : 8.fc16
Size : 463 k
Repo : updates
Summary : A tool for automatically mounting and unmounting filesystems
License : GPLv2+
Description : autofs is a daemon which automatically mounts filesystems when you use
: them, and unmounts them later when you are not using them. This can
: include network filesystems, CD-ROMs, floppies, and so forth.
Reply With Quote
  #3  
Old 4th November 2012, 08:52 AM
Crowhill Offline
Registered User
 
Join Date: Sep 2011
Posts: 20
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

Quote:
a) for things that are always plugged in, make an entry for it in /etc/fstab
Unfortunately, this won't be of much help in my case but thanks for the hint.

Quote:
b) dunno
Let's hope I can get it to work or the F18-team takes care of this very non-standard behavior.

Quote:
c) no one has built an rpm package of udiskie for Fedora. You'll have to download the package from here, and install it yourself (it's in Python, so don't know if you'll have to compile or not, but probably so).
I'm wondering whether F17 is going to fall appart after I install it ... well, it's Linux, so I'm going to give it a try.

Quote:
You could also try autofs, it's in the Fedora repos:
This is interesting. In the documentation it says:

Quote:
The automount utility can mount and unmount NFS file systems automatically (on-demand mounting), therefore saving system resources. It can be used to mount other file systems including AFS, SMBFS, CIFS, and local file systems.
I guess, my situation falls into the
Quote:
... and local file systems.
category.

Since autofs is supported by F17, I'll give it a try - thank you for the hint.

Also, since autofs is not yet installed on my system, I'm wondering how PCmanFM mounts external devices. I mean, what's the action that's triggered when PCmanFM starts?

Thanks,
Crowhill
Reply With Quote
  #4  
Old 4th November 2012, 10:52 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

It also doesn't work well for non-linux native filesystems - ownership and permissions must also be set in the fstab entry, and those may not be appropriate for all users.

If there is only one user, this shouldn't be an issue.
Reply With Quote
  #5  
Old 4th November 2012, 11:04 AM
Crowhill Offline
Registered User
 
Join Date: Sep 2011
Posts: 20
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

Quote:
Originally Posted by jpollard View Post
It also doesn't work well for non-linux native filesystems - ownership and permissions must also be set in the fstab entry, and those may not be appropriate for all users.

If there is only one user, this shouldn't be an issue.
What is "It" - autofs or udiskie?

Anyway, I tried out autofs and ended up wrongly unmounting my home directory. Since I don't know how to revert this action and since my install is fresh, I reinstalled the whole F17-LXDE release.

PCmanFM, when started, automatically mounts external devices. How does it do it? If I figure this out, I don't need autofs or udiskie.

Cheers,
Crowhill
Reply With Quote
  #6  
Old 4th November 2012, 11:21 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

"It" is the fstab entry - this mounts devices during boot time, but there is no way to know which user is supposed to have ownership access at that time.

I THINK (not sure though) that pcmanfm scans the /proc/partition list and tries to mount anything not already mounted...
Reply With Quote
  #7  
Old 4th November 2012, 11:58 AM
Crowhill Offline
Registered User
 
Join Date: Sep 2011
Posts: 20
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

This page lists options to enable automounting. I executed
Code:
sudo yum search udevil
but without luck.

Quote:
Originally Posted by jpollard View Post
"It" is the fstab entry - this mounts devices during boot time, but there is no way to know which user is supposed to have ownership access at that time.

I THINK (not sure though) that pcmanfm scans the /proc/partition list and tries to mount anything not already mounted...
This certainly makes sense as way to automount external devices.

Let's assume that
Code:
sudo fdisk -l
produces an entry that looks like

Quote:
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 63901439 31949696 c W95 FAT32 (LBA)
but
Code:
df -h
doesn't list /dev/sdc1 (/dev/sdc is not mounted). How difficult is it to write a Bash script, call it mount.sh, that takes a partition as argument and mounts it in a specific directory, say /media. That is, can something like

Code:
#!/bin/bash
mount $1 /media
work if I then execute it by

Code:
sudo ./mount.sh /dev/sdc1
for example? Since I seem to have no control over the mount command (see above), I'm asking before doing.

Thanks,
Crowhill

Last edited by Crowhill; 4th November 2012 at 12:08 PM.
Reply With Quote
  #8  
Old 4th November 2012, 12:45 PM
george_toolan Online
Registered User
 
Join Date: Dec 2006
Posts: 1,755
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

I have a "fresh" install of the Fedora 17 DVD on my netbook. I just added a few DEs.

When I insert a removable drive it is automatically mounted by Gnome. There's no need for Nautilus or any other file manager.

When I insert a removable drive with LXDE it is automatically mounted and I get a "Removable medium is inserted" requester.

Apparently pcmanfm is already running in the background? There's no need to open the File Manager.
Quote:
pcmanfm --desktop --profile LXDE
When I insert a drive with XFCE it automatically appears on the left side of the desktop where it can be mounted manually. To mount it automatically you can change the XFCE settings for "Removable Drives and Media".
Attached Thumbnails
Click image for larger version

Name:	lxde_removable_medium.png
Views:	32
Size:	19.2 KB
ID:	23970   Click image for larger version

Name:	xfce_removable_media.png
Views:	30
Size:	52.1 KB
ID:	23971  
Reply With Quote
  #9  
Old 4th November 2012, 01:23 PM
Crowhill Offline
Registered User
 
Join Date: Sep 2011
Posts: 20
linuxfirefox
Re: Automatically mount (i.e. automount) all external devices

Quote:
Originally Posted by george_toolan View Post
When I insert a removable drive it is automatically mounted by Gnome. There's no need for Nautilus or any other file manager.

When I insert a removable drive with LXDE it is automatically mounted and I get a "Removable medium is inserted" requester.

Apparently pcmanfm is already running in the background? There's no need to open the File Manager.

When I insert a drive with XFCE it automatically appears on the left side of the desktop where it can be mounted manually. To mount it automatically you can change the XFCE settings for "Removable Drives and Media".
For me (equipped with F17-LXDE, "pure" openbox), the automounting happens if PCManFM is running. Then, the windows for which you attached thumbnails show up.

However, if PCManFM is closed, the automounting is no longer happening.

Now, I don't like PCManFM (nor Nautilus). Therefore, let's say I'm working with a terminal, I cannot access external devices unless I first start PCManFM (or Nautilus). This is rather annoying.

There's a low-resource way to run PCManFM in the "background" (no windows flying around)?

Crowhill
Reply With Quote
Reply

Tags
automatically, automount, devices, external, mount

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to automount devices from GUI? Tetsuro Using Fedora 5 12th June 2011 10:12 AM
changing mount point of automatically mounted devices (ipod) dsmyth Using Fedora 3 25th February 2010 07:13 AM
Non-root cannot automount USB or CD/DVD devices mbratch Using Fedora 12 24th December 2007 07:38 PM
usb devices no longer automount th350urc3 Using Fedora 2 9th June 2007 06:40 AM
devices don't automount weinerdogus Using Fedora 2 1st April 2006 12:38 AM


Current GMT-time: 08:32 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat