Some launchers create separate icon for running, some running apps icons don't have "Add as launcher" option.

Asked by Ivan

1. If I run NetBeans IDE (6.9) or (GO-OO 3.2) ('/usr/bin/ooffice'), their icon appear in AWN, but in the menu popping up by right-clicking these icons, there is no "Add as launcher" option.

2. If I manually create launchers for those mentioned applications, a new icon is created for running instances, a launcher icon only launches, but does not take care of what's next.

One might guess that the cause is Java, but it seems that it isn't, as Eclipse demonstrates no problems of this kind.

3. Another problematic application is MySQL workbench (5.2.22 RC). It has "Add as launcher" option which seems to work, but next time the launcher created is used to launch the application - the application runs with a separate icon anyway.

Any ideas on how to solve this problem?

OS is Arch Linux. DE/WM is XFCE/XFWM. Everything is of latest stable releases for today.

Question information

English Edit question
Needs information
Awn Edit question
moonbeam Edit question
Last query:
Last reply:
Revision history for this message
Mark Lee (malept) said :

moonbeam: here's the info I have regarding MySQL workbench on Ubuntu (which also has this problem).

Desktop file: /usr/share/applications/MySQLWorkbench.desktop

WM_CLASS(STRING) = "mysql-workbench-bin", "Mysql-workbench-bin"
WM_NAME(STRING) = "MySQL Workbench"

Ivan: if you could also provide this information, that would be excellent. You want to provide the path to the desktop file, the Exec line in said file, and the WM_CLASS/WM_NAME lines from running `xprop` and clicking on the MySQL Workbench window when the cursor turns into a plus sign.

You should probably also do that for NetBeans and

Revision history for this message
Ivan (ivan-mashchenko) said :

All the parameters you've requested for MySQL Workbench are exactly the same as you've given.

For NetBeans I've got a very custom location, I've just put it there manually.
Desktop file: n/a.
It used to makes sense in my particular environment (planned to be replaced with more canonical anyway). Anyway I believe this does not matter as Eclipse Helios feels itself pretty comfortable in a similar location, and shows no problems with awn.

xprop for NetBeans:

WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "java-lang-Thread"
WM_NAME(STRING) = "NetBeans IDE 6.9"

And for
Desktop file: unknown

xprop for
WM_CLASS(STRING) = "VCLSalFrame.DocumentWindow", " 3.2"

Then I've found the same problem with Mozilla Thunderbird 3.1.
Desktop file: /usr/share/applications/thunderbird.desktop
WM_CLASS(STRING) = "Mail", "Lanikai"
WM_NAME(STRING) = "Inbox - <email address hidden> - Lanikai"

Chromium gives us the same problem.
Desktop file: /usr/share/applications/chromium-dev.desktop
WM_CLASS(STRING) = "chromium", "Chromium"
WM_NAME(STRING) = "Google - Chromium"

Revision history for this message
Michal Hruby (mhr3) said :

Awn matches apps against desktop files, if there isn't one then of course it won't work. We care about the "Exec" line from the desktop file, it doesn't matter how you run the app yourself. Also "StartupWMClass" is good to know, I'm quite sure that if you edit the thunderbird desktop file and use StartupWMClass=Lanikai, then it'll work fine.

Revision history for this message
Ivan (ivan-mashchenko) said :

Thsnks, Michal. I didn't knew about desktop files. Specifying StartupWMClass in .desktop files has solved all the problems with all applications I've listed with exception of

Even after creating a desktop file for OpenOffice,

1. If I launch OpenOffice from outside AWN, its icon shown in AWN does not offer "Add as launcher" option.

2. If I create a launcher manually, the first OpenOffice window launched is managed correctly, but newer created windows (via the application's File-New or via a terminal command) create new icons in AWN dock.

WM_CLASS is same for all those windows and initial one - I'e checked this, the reason is somewhat else.

Revision history for this message
moonbeam (rcryderman) said :

Open office is very nasty to deal with for a variety of reasons. Can I get the names of the desktop files used for the various open office apps in Arch?

In general the StartupWMClass will work in most problem situations though as you've noticed Open Office is the bane of my existence. It's probably just a case of getting the desktop file names used Arch, as OO handling is _heavily_ special cased.

Revision history for this message
Ivan (ivan-mashchenko) said :

In Arch I have only one desktop file related to OpenOffice - ooo-extension-manager.desktop (Exec=unopkg gui %U). I've tried to create my own ooffice.desktop to solve the problem, but it not helped for OpenOffice (while creating them manually worked for NetBeans, for example). A thing to mention is that I have not mainstream packages, but Go-OpenOffice instead (a custom build from SuSE).

Revision history for this message
Tim Wahrendorff (tim.timwahrendorff) said :

I have the same problem in ubuntu 10.10 with awn trunk and netbeans 6.9.

I already tried to create the desktop file for netbeans in /usr/share/applications, it looks like this after some testing, but it does not work:
 #!/usr/bin/env xdg-open

[Desktop Entry]
Comment=netbeans IDE
#WM_CLASS(STRING)="sun-awt-X11-XFramePeer", "java-lang-Thread"
#WM_NAME(STRING)="NetBeans IDE 6.9"

Ivan, how did you get it to work? What have I done wrong? frustrating that one program keeps popping up twice in my awn panel..

Revision history for this message
Tim Wahrendorff (tim.timwahrendorff) said :

very strange.
if I start netbeans, it creates a second icon for netbeans.

If I now restart awn, the second icon is gone and I can access netbeans through the starter. but if I close netbeans and start it up again, I have the second icon again, until I restart awn while netbeans is running... !?

Revision history for this message
Ivan (ivan-mashchenko) said :

Tim, I can't remember details already. But it was ok with NetBeans (but, I suppose, it would conflict with other Swing or NetBeans Platform-based apps). I've given up using AWN as lots of everyday applications are still not ready for it (yes, I say applications themselves are not ready, not AWN) and it looks ugly for me to have some apps minimizing here and some there, as well as having separate dock icons for a launcher and for an instance. (seeming impossible to minimize to its launcher) and Skype (using notification area (which ideally should not be used at all when a dock is used)) are the most notable examples. I am going to come back when all the applications go dock-friendly (I hope, someday). Good luck.

Revision history for this message
Derek White (d-man97) said :

@Tim - I solved NetBeans by using sun-awt-X11-XFramePeer in the .desktop, instead of (the more generic) java-lang-Thread.

Can you help with this problem?

Provide an answer of your own, or ask Ivan for more information if necessary.

To post a message you must log in.