Reliable alert dialogs from the shell

Posted by intuited on Ask Ubuntu See other posts from Ask Ubuntu or by intuited
Published on 2011-03-02T20:41:22Z Indexed on 2011/03/02 23:33 UTC
Read the original article Hit count: 426

Filed under:
|
|
|
|

I'd like to have a message pop up in response to various system events, mostly in order to be able to set reminders for myself from a shell session. There are a few ways to do this; zenity seems to be the most polished. However, I've found at least two problems with zenity:

  1. Messages do not appear on all workspaces. I tried using the gtk option --screen to control this, but they just appear on the current workspace regardless. So if I am switching workspaces as the message comes up, I will not see it.

  2. Messages do not appear above all other windows. Specifically, if I am using guake, a new zenity message will appear below the guake window and I won't be able to see it.

I tried a few other apps a while back. Both gmessage and xmessage exhibited problem 1; gmessage also exhibited problem 2. I did find that kalarm, which can be scripted from the command line, worked acceptably, but I'm trying to avoid running the KDE stack if possible, and would prefer something lightweight with zenity's versatility.

It seems that it might be possible to arrange for these problems to be resolved by setting the WM_CLASS, but I'm in a bit over my head there. It might also be possible to make modifications to the window after it launches with a script, but again I'm not sure where to look for resources on that.

© Ask Ubuntu or respective owner

Related posts about xorg

Related posts about notification