Skip to main content

Removable disk automounter for udisks

Project description

udiskie is a simple daemon that uses udisks to automatically mount removable storage devices. This daemon comes with optional mount notifications and gtk tray icon. It also provides a user level CLI for mount and unmount operations.

Dependencies

Permissions

udiskie requires permission for the following PolicyKit actions:

  • org.freedesktop.udisks.filesystem-mount for mounting and unmounting

  • org.freedesktop.udisks.luks-unlock to unlock LUKS devices

  • org.freedesktop.udisks.drive-eject to eject drives

  • org.freedesktop.udisks.drive-detach to detach drives

These are usually granted when using a desktop environment. If your login session is not properly activated you may need to customize your PolicyKit settings. Create the file /etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla with the following contents:

[udiskie]
Identity=unix-group:storage
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach
ResultAny=yes

This configuration allows all members of the storage group to run udiskie.

Alternatively, change the setting for allow_inactive to yes in the file /usr/share/polkit-1/actions/org.freedesktop.udisks.policy:

<action id="org.freedesktop.udisks.filesystem-mount">
    ...
    <allow_inactive>yes</allow_inactive>
    ...
</action>

...

<action id="org.freedesktop.udisks.luks-unlock">
    ...
    <allow_inactive>yes</allow_inactive>
    ...
</action>

...

<action id="org.freedesktop.udisks.drive-eject">
    ...
    <allow_inactive>yes</allow_inactive>
    ...
</action>

...

<action id="org.freedesktop.udisks.drive-detach">
    ...
    <allow_inactive>yes</allow_inactive>
    ...
</action>

Usage

The following entry points are defined:

  • udiskie to run the automount/notification daemon

  • udiskie-mount user level mount/unlock operations

  • udiskie-umount user level unmount/lock/eject/detach operations

See the man pages for further instructions

Contributing

udiskie is developed on github. Feel free to contribute patches as pull requests as you see fit.

Try to be consistent with PEP 8 guidelines as far as possible and test everything. Furthermore, your commit messages should start with a capitalized verb for consistency. Unless your modification is completely trivial, also add a message body to your commit.

Where possible dependency injection should be used to keep the module easily testable.

Project details


Release history Release notifications | RSS feed

This version

0.5.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

udiskie-0.5.3.tar.gz (20.3 kB view details)

Uploaded Source

File details

Details for the file udiskie-0.5.3.tar.gz.

File metadata

  • Download URL: udiskie-0.5.3.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for udiskie-0.5.3.tar.gz
Algorithm Hash digest
SHA256 2038080a6881967b83a23ea6670f8cabf1f730c4a90ca5430649bb5fac77c165
MD5 bcb35491cbe11cf2a2e9a088f8ef7da8
BLAKE2b-256 a134f8252315e5b38c62f6d7029d50eb702f35ff54bb8dfbbfb3821b6a6ca47c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page