Comment 8 for bug 878113

Revision history for this message
müzso (bit2) wrote :

This is not a launcher or Unity bug. And it's still relevant for the latest Ubuntu version (13.04).
Take a look at the *.desktop file of jEdit (it's a text editor written in Java and ships in Ubuntu's universal repository).

First of all: create a copy of jedit.desktop and modify all the relevant entries. Most of them are relevant. :-)
Now the problematic entry is StartupWMClass. If you don't set up this correctly, Unity won't be able to "identify" the process/window that is launched by the executable specified by the "Exec" entry.
You can start up SQuirreL and use xprop to get the correct value. I'll help you: it's "net-sourceforge-squirrel_sql-client-Main"

So a proper squirrel.desktop file looks like this:

[Desktop Entry]
Name=SQuirreL
GenericName=SQuirreL SQL Client
Comment=Browse/edit SQL databases
Exec=/opt/SQuirreLSQLClient/squirrel-sql.sh %U
Icon=/opt/SQuirreLSQLClient/icons/acorn.png
Terminal=false
Type=Application
Categories=Development;
StartupNotify=true
MimeType=text/x-sql;
StartupWMClass=net-sourceforge-squirrel_sql-client-Main
Keywords=Programming;Java;SQL

(Of course assuming that SquirreL is install in /opt/SQuirreLSQLClient)