June 20, 2006

Dock any application to the system tray

Author: Shashank Sharma

Wouldn't it be nice if you could dock any application, and not just those that support the docking feature, into the system tray? A simple point-and-click operation is all it takes, thanks to a couple of helpful applications called KDocker and Alltray.


Don't be misled by the name -- KDocker works equally well in GNOME and KDE. I installed it to my Ubuntu desktop with apt-get, but you might need to grab the source package from the SourceForge page. Once installed, KDocker is available under Applications -> Accessories. When you launch KDocker, an xkill-like cursor appears, and clicking on any application sends it to the system tray. Removing an application from the system tray is just as easy -- right-click on its icon and select Undock.

If you accidentally launch KDocker, or realize that you don't really want to dock Impress while working on a presentation, just right-click anywhere and the xkill type cursor will go away.

There is no limit to the number of applications you can dock. Right-clicking on any docked application will give you several choices under the options tab. A docked application when minimized, by default, is sent to the system tray.

You can also run KDocker from a shell, where you can use an extensive array of switches to control KDocker's behaviour. For example, if you don't like the icon that KDocker detects for an application, you can use kdocker -i <iconfile> <applicationname> to select a custom icon for that application.

In case you were wondering, the application window for all programs has an icon on the top left corner. It's from here that KDocker detects the icons.


Like KDocker, Alltray works in KDE, GNOME, Fluxbox, and other environments. Again, there is no limit on the number of applications that can be docked. The downloads page lists several packages available as .rpm and .deb packages. To use apt-get under Ubuntu, you need to add this repository to your sources.list file.

Once installed, Alltray too is available under Accessories. When you launch it, a little window in the middle of the screen displays the message Please click on the window you would like to dock. (Cancel with <c>)

Unlike KDocker, Alltray offers no options once you have docked the application, apart from Undock and Exit. The man page lists all available switches, in case you have to use Alltray from a shell. When you click the close button on any docked application, it minimizes back to the system tray, so as long as an application is docked, you cannot close it by clicking on the cross area, and you cannot change this behaviour. You must choose File -> Quit or right-click on the icon in the system tray and choose Exit to close the application.

An irritating fact is that once you launch either KDocker or Alltray, you cannot use Alt-Tab to cycle to the application you wish to dock. They only dock the current window.

While both programs work seamlessly, KDocker scores more points because of all the useful options it offers.

Shashank Sharma is studying for a degree in computer science. He specializes in writing about free and open source software for new users.

Click Here!