2

I have been playing around with pam-dbus on a old slow box that is too slow for gnome/kde so I have been using ratpoision as the window manager. I was able to configure it to show a notification on the desktop whenever an authentication attempt was made, but I can't figure out how to approve/disapprove the attempt.

4
  • Someone is actually using pam-dbus? I am considering removing it from Debian... if you still use it, let me know! Commented Jan 12, 2014 at 0:03
  • I haven't got working yet.
    – hildred
    Commented Jan 12, 2014 at 0:10
  • Ok, had to read some of my own code again. Are you running the pam-dbus-notify tool that comes with pam-dbus? Commented Jan 12, 2014 at 1:26
  • galago-project.org/specs/notification/index.php is the homepage listed in aptitude.
    – hildred
    Commented Jan 12, 2014 at 1:40

1 Answer 1

0

pam-dbus uses a feature where a notification contains not only text, but can also allows for Yes-No-interaction. Not all providers of notifications support that feature, if yours does not then you cannot use pam-dbus.

You can check that your notification daemon supports action using this script:

#!/usr/bin/python
import pynotify
pynotify.init("pam-dbus-test")
n = pynotify.Notification("Title","Text")
n.add_action("action", "An action", lambda _: False)
n.show()
5
  • notification-daemon 0.7.6-1
    – hildred
    Commented Jan 12, 2014 at 1:04
  • Traceback (most recent call last): File "/home/ben/testnote.py", line 6, in <module> n.show() glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
    – hildred
    Commented Jan 12, 2014 at 1:44
  • @hildred: Ok, I am surprised that you get any notification at all then. Are you sure that notification-daemon is running (not just installed)? After all, you say that you are not using GNOME. And what exactly does the notification that you see say? Commented Jan 12, 2014 at 11:06
  • Your code works on Debian/Gnome3 libnotify version 0.1.1-3.
    – Braiam
    Commented Jan 12, 2014 at 12:24
  • @JoachimBreitner what??
    – Kaz Wolfe
    Commented Jan 13, 2014 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .