Skip to content

Instantly share code, notes, and snippets.

@braytac
Created July 16, 2020 13:05
Show Gist options
  • Save braytac/d6b0c263db427f64f46ae752badde853 to your computer and use it in GitHub Desktop.
Save braytac/d6b0c263db427f64f46ae752badde853 to your computer and use it in GitHub Desktop.
my archlinux customiz
/etc/polkit-1/rules.d/10-udisks2.rules
// See the polkit(8) man page for more information
// about configuring polkit.
// Allow udisks2 to mount devices without authentication
// for users in the "wheel" group.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
/etc/udev/rules.d/99-udisks2.rules
# UDISKS_FILESYSTEM_SHARED
# ==1: mount filesystem to a shared directory (/media/VolumeName)
# ==0: mount filesystem to a private directory (/run/media/$USER/VolumeName)
# See udisks(8)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment