You are not logged in.

#1 2012-04-14 10:16:39

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 77

udiskie glib error

Dear All,

I have a small problem with udiskie. At the moment I am running X-server + xmonad and everything is working fine but there are few minor glitches I still haven't sorted out and udiskie seems one of them.

I have installed ConsoleKit for permissions. The last line in my .xinitrc is:

exec ck-launch-session dbus-launch ~/.startSession > $HOME/.xmonad.log 2>&1

the .startSession

#Run disk automounting program
udiskie &

#Start dropbox
dropboxd &

#Start xmonad  
xmonad 

When unmounting a device udiskie will prompt me with the following error:

~$udiskie-umount /media/BBCDVD1188/
unmounted device /org/freedesktop/UDisks/devices/sr0
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))
  File "/usr/lib/python2.7/site-packages/udiskie/umount.py", line 51, in unmount
    unmount_device(device)
  File "/usr/lib/python2.7/site-packages/udiskie/umount.py", line 33, in unmount_device
    '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

and then unmount the device obediently. What does this error mean? Is there any way I can get rid of it? Also, I cannot reproduce it at the moment, but I believe that sometimes udiskie will crash whilst unmounting.

I would be obliged for any references, hints or other form of assistance on this.

Last edited by AlmostSurelyRob (2012-04-14 10:17:09)

Offline

#2 2012-04-16 14:47:28

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: udiskie glib error

Hi,

AlmostSurelyRob wrote:

What does this error mean? Is there any way I can get rid of it?

It's trying to show you a notification, but you don't have a notification daemon (like xfce4-notifyd, NotifyOSD etc.) which adheres to the FreeDesktop notification standard installed. You can install one (since I use XFCE, I use xfce4-notifyd which is pretty light) or modify udiskie not to display notifications.

From a quick cursory look at udiskie, to do the latter, you would have to remove:

* pynotify.init [...]
*         try:
            pynotify.Notification('Device unmounted',
                                  '%s unmounted' % (device.device_file(),),
                                  'drive-removable-media').show()
        except gio.Error:
            pass
* import pynotify

in umount.py and mount.py. Use pacman's -Ql option to get the location of the two files.

Offline

#3 2012-04-17 08:10:28

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 77

Re: udiskie glib error

Thanks. That explanation works for me. Now I see that it was quite clear from the error message itself. Sometimes I cannot help thinking that I am not taking the full advantage of my reading skills...

I will play with this a little bit as it seems that xmonad has a notifications as well. There's something called XMonad.UrgencyHook. Perhaps it's going to solve the issue and make udiskie communicate its actions.

Offline

Board footer

Powered by FluxBB