Issue #19 resolved

Suppress switch doesn't work with systemd

Jason Ryan
created an issue

I have a systemd session without console-kit or any notification daemon and I start udiskie in my .xinitrc with:

/usr/bin/udiskie -s & 

and my USB drives are successfully mounted and unmounted. On umount, though, I get the error message about not having a notification service running:

unmounted device /org/freedesktop/UDisks/devices/sdb1
Traceback (most recent call last):
  File "/usr/bin/udiskie-umount", line 7, in <module>
    sys.exit(udiskie.umount.cli(sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/udiskie/umount.py", line 86, in cli
    unmount(os.path.normpath(path), notify)
  File "/usr/lib/python2.7/site-packages/udiskie/umount.py", line 45, in unmount
    unmount_device(device, notify)
  File "/usr/lib/python2.7/site-packages/udiskie/umount.py", line 29, in unmount_device
    notify(device.device_file())
  File "/usr/lib/python2.7/site-packages/udiskie/notify.py", line 20, in umount
    'drive-removable-media').show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files

Should the -s (or --suppress) switch not prevent this message from occurring?

To test I installed libnotify and, again, the drive is unmounted successfully, but this time I get the notification; again unwanted.

System: Arch Linux

systemd 195-2

udiskie 0.4.1-4

polkit 0.107-4

Comments (4)

  1. Byron Clark repo owner

    The -s option has to be passed to the udiskie-umount command as well. Unmount notifications do not come from the udiskie daemon but from the udiskie-umount command.

    It would probably be preferable to hold options like this in the config file that both udiskie and udiskie-umount read, but that isn't currently implemented.

  2. Jason Ryan reporter

    Thanks Byron: that works.

    Perhaps the man page could be amended to read:

    -s, --suppress
           Suppress pop-up notifications - this switch must be passed to the udiskie- umount command as well.
    
  3. Log in to comment