I need to show the contents of notify-send on the lock screen for one of my scripts.
I see there are many applications at Settings/Notifications/Applications, but notify-send isn't there.
If it was, I would be able to let it show it's contents on lock screen as there is many options for each application, one being that.

But... it would be better to determine for each notify-send call, if it's contents should be shown on screen lock or not.

Anyway, an alternative to notify-send could work too.
Btw, this didn't work here: Show notify-send content in Gnome's lockscreen, nothing happened after running it.

ubuntu 18.04

  • I think that this is related somehow: youtube.com/watch?v=8KMqvAq6WYY
    – shibormot
    Jan 6 at 16:49

1 Answer 1


This workaround worked fine here.
Has nothing to do with notify-send tho.

#!/usr/bin/env python
from gi.repository import Notify
from sys import argv

def notify(title):
  if Notify.init(title):
    n = Notify.Notification.new(title)

def main():

if __name__ == '__main__':

but using gdbus is much better as we can "update" the notification: https://unix.stackexchange.com/a/75411/235896

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.