Kirsle.net logo Kirsle.net

Zenity and GNOME 3

July 18, 2011 by Noah
Another mini rant about GNOME 3.

To add to the reasons why GNOME 3 impacts other areas of the Linux ecosystem in ways I wish it wouldn't, they have changed the behavior of zenity and removed a feature just because it no longer makes sense for GNOME 3.

Zenity, btw, is a command line program for displaying simple dialog boxes and things that may be useful for bash scripts. It can pop up alerts, progress bar windows, open/save dialogs, etc.

One feature it used to have was --notification, which let you put an icon in the Notification Area ("system tray") on your desktop. But now, since GNOME 3 doesn't have the same concept of the Notification Area as other desktop environments, Zenity's --notification option no longer puts an icon in the Notification Area.

Now it uses GNOME 3's style of notification... which is, the same behavior as notify-send - it pops up a Growl-like black bubble in the corner of your screen with a temporary message (like "New updates are available").

This sucks.

I was playing with writing a desktop Google Voice app for Linux, which would have an icon in the Notification Area and notify about new texts and things. I was going to just use Tk for the GUI (even though it's ugly as sin on Linux) and use Zenity only for the notification icon. But I can't do that now! Now I might as well make my GUI in GTK+ so I can use the Gtk2 module for the notification icon.

GNOME developers, the universe does not revolve around GNOME. If Zenity's --notification is just going to duplicate the functionality of notify-send, you might as well just have switched to notify-send and leave Zenity how it was before.

More Bad Changes

Today (8/14/11) I discovered something else GNOME changed in Zenity.

I'd written a Perl script a while back that would act as a super simple front-end to Mednafen, an NES and GameBoy emulator. It just used Zenity to open a file select dialog to let you browse for a ROM to load.

But now, Zenity's file selection dialog doesn't have any way of letting you specify which directory it should look in by default. It used to start in whatever the script's current working directory was, but now it ignores all that and always starts in the "Recently Opened Files" list.

Do we need to fork Zenity now? This is so ridiculous.

Tags:

Comments

There are 3 comments on this page. Add yours.

Avatar image
Jorge posted on October 14, 2011 @ 18:18 UTC

Completely agree! They destroyed Zenity's use. I had it in many scripts which are useless now, as I was specially using notification and file selection on a custom folder. Is this evolution, GNOME3?

Hope someone makes a fork soon.. Other alternative would be XFCE.

Avatar image
Cava posted on October 23, 2011 @ 16:54 UTC

I ran into the same issue of zenity file-selection no more using the current directory by default. By looking at the source code (fileselection.c), I discovered that it could be workarounded by using the --filename option. For it to work, it must be followed by a directory path ending with a /, eg. zenity --file-selection --save --filename="$HOME/Documents/"

br - David

Avatar image
Mono posted on December 19, 2011 @ 22:29 UTC

This regression is the kind of crap that drove me to OS X a few years ago... Too bad that Apple's behaviour makes me sick nowadays so I started using lunix again, only to find that some projects are in even worse state than when I left.... Very sad when ambitious (and clueless) developers start breaking even the scripts we wrote for ourselves as users....

Add a Comment

Used for your Gravatar and optional thread subscription. Privacy policy.
You may format your message using GitHub Flavored Markdown syntax.