 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

4th November 2012, 01:29 AM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 20

|
|
|
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
|

4th November 2012, 01:15 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
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.
|
|

4th November 2012, 08:52 AM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 20

|
|
|
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.
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
|

4th November 2012, 10:52 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150

|
|
|
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.
|

4th November 2012, 11:04 AM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 20

|
|
|
Re: Automatically mount (i.e. automount) all external devices
Quote:
Originally Posted by jpollard
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
|

4th November 2012, 11:21 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150

|
|
|
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...
|

4th November 2012, 11:58 AM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 20

|
|
|
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
"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 produces an entry that looks like
Quote:
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 63901439 31949696 c W95 FAT32 (LBA)
|
but 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.
|

4th November 2012, 12:45 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,755

|
|
|
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".
|

4th November 2012, 01:23 PM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 20

|
|
|
Re: Automatically mount (i.e. automount) all external devices
Quote:
Originally Posted by george_toolan
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
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
|
|
|
Current GMT-time: 08:32 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|