If you’r an Ubuntu user and have upgraded to 11.04 and use the new desktop environment Unity, you might have noticed that some applications that implement the GTK status icon doesn’t show up in the notification area – or tray or systray as it also may be called.
The reason for this is that Ubuntu now utilise a “whitelist” for which applications can be displayed in the notification area. You can (maybe not that) easily add any application to the whitelist by invoking the command
gsettings in the following way:
- gsettings set com.canonical.Unity.Panel systray-whitelist [‘app-1’, ‘app-2’, ‘app-3’]
Now, this can be quite a difficult command to remember and since you will need to first grab the whitelist, alter it, and then put it back. Since I’m lame at Bash I thought it would be a nice misson to create a Bash script that makes this interference simpler, just to pick up some more Bash knowledge. So I did!
The script can be used like this:
- # Add MyApplication to whitelist
- systray-whitelist add MyApplication
- # Remove MyApplication from whitelist
- systray-whitelist remove MyApplication
- # Show applications in whitelist
- systray-whitelist show
And that’s that.