Mounting filesystems as a user with udevil

From Void Linux Wiki
Jump to: navigation, search

Udevil is a command line Linux program which mounts and unmounts removable devices without a password, shows device info, and monitors device changes. It can also mount ISO files, nfs://, smb://, ftp://, ssh:// and WebDAV URLs, and tmpfs/ramfs filesystems.

It integrates well with spacefm.

Currently in Void some small changes to the config file are needed for it to work. It will complain that it can not run mount. ( possibly due root shell being dash and bin being a symlink?)

So we need to let udevil know where mount is:

in /etc/udevil/udevil.config lines 267>>279
uncomment and change path in lines 276>>278

# Use the settings below to change the default locations of programs used by
# udevil, or (advanced topic) to redirect commands to your scripts.
# When substituting scripts, make sure they are root-owned and accept the
# options used by udevil (for example, the mount_program must accept --fake,
# -o, -v, and other options valid to mount.)
# Be sure to specify the full path and include NO OPTIONS or other arguments.
# These programs may also be specified as configure options when building
# udevil.
mount_program   = /usr/bin/mount
umount_program  = /usr/bin/umount
losetup_program = /usr/sbin/losetup
# setfacl_program = /usr/bin/setfacl

This configuration file is well commented with many features.