Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues


From Void Linux Wiki
Revision as of 17:09, 30 March 2018 by Fleg (talk | contribs) (xfce4 - gvfs is required for automonted volumes to show up in Thunar, added a remark about it.)
Jump to navigation Jump to search


autofs is a kernel-based automounter for Linux. It can automatically perform predefined mount operation upon directory access.

It is possible to configure it to mount USB devices.

Install autofs package:

$ xbps-install autofs

Edit /etc/autofs/auto.master and apped /media:

/media  /etc/autofs/auto.media --timeout=10

--timeout=10 defines when to unmount inactive resource in seconds.

Create file /etc/autofs/auto.media with content:

sdb1  -fstype=auto,async,nodev,user,noexec,nosuid,umask=002  :/dev/sdb1
sdb2  -fstype=auto,async,nodev,user,noexec,nosuid,umask=002  :/dev/sdb2
sdb3  -fstype=auto,async,nodev,user,noexec,nosuid,umask=002  :/dev/sdb3
sdb4  -fstype=auto,async,nodev,user,noexec,nosuid,umask=002  :/dev/sdb4

and start autofs service.

$ ln -s /etc/sv/autofs /var/service/

To mount directory, simply access it. Directory will not exist before and will be created by the automount while handling access request. Resource will be unmounted when not used for defined timeout of seconds.

Example usage:

$ ls /media
$ ls /media/sdb2
foo   bar
$ ls /media
$ sleep 10
$ ls /media

enlightenment DM

The englightenment file manager has to be manually enabled as to automount volumes on insert.

xfce4 DM

XFCE4 uses Thunar as file manager, thunar-volman is the volume manager permitting automount of CD,DVD,USB,SDCARD etc.

If volumes don't show in Thunar after being inserted, check if you have gvfs installed.

Standalone Thunar

This description is incomplete

It is possible to use the standalone Thunar with thunar-volman plugin to control removable devices.

Install thunar-volman, gvfs and ConsoleKit2 packages.

Update startup script to run Thunar in daemon mode. Additionally, use dbus-launch ck-launch-session to run your window manager. For example:

$ tail -n2 ~/.xsession
thunar --daemon &
exec dbus-launch ck-launch-session i3

DMs operating with SpaceFM

Minimalist environments employing SpaceFM file manager may enable a simple automount configuration by installing udevil.