Awn

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

Asked by Ivan on 2010-07-05

1. If I run NetBeans IDE (6.9) or OpenOffice.org (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

Language:
English Edit question
Status:
Needs information
For:
Awn Edit question
Assignee:
moonbeam Edit question
Last query:
2010-07-07
Last reply:
2010-10-20
Mark Lee (malept) said : #1

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

Desktop file: /usr/share/applications/MySQLWorkbench.desktop
Exec=/usr/bin/mysql-workbench

xprop:
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 OpenOffice.org.

Ivan (ivan-mashchenko) said : #2

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.
Exec=/var/files/app/java/app/netbeans/bin/netbeans
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 OpenOffice.org:
Exec='/usr/bin/ooffice'
Desktop file: unknown

xprop for OpenOffice.org:
WM_CLASS(STRING) = "VCLSalFrame.DocumentWindow", "OpenOffice.org 3.2"
WM_NAME(STRING) = "OpenOffice.org"

Then I've found the same problem with Mozilla Thunderbird 3.1.
Desktop file: /usr/share/applications/thunderbird.desktop
Exec=/usr/bin/thunderbird
xprop:
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
Exec=/usr/bin/chromium-dev
xprop:
WM_CLASS(STRING) = "chromium", "Chromium"
WM_NAME(STRING) = "Google - Chromium"

Michal Hruby (mhr3) said : #3

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.

Ivan (ivan-mashchenko) said : #4

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 OpenOffice.org.

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.

moonbeam (rcryderman) said : #5

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.

Ivan (ivan-mashchenko) said : #6

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 OpenOffice.org packages, but Go-OpenOffice instead (a custom build from SuSE).

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]
Version=1.0
Type=Application
Terminal=false
Name=Netbeans
Name[de_DE]=Netbeans
Comment=netbeans IDE
Icon=/home/tim/Apps/netbeans-6.9/nb/netbeans.png
Exec=/home/tim/Apps/netbeans-6.9/bin/netbeans
#WM_CLASS(STRING)="sun-awt-X11-XFramePeer", "java-lang-Thread"
#WM_NAME(STRING)="NetBeans IDE 6.9"
StartupWMClass=java-lang-Thread

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..

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... !?

Ivan (ivan-mashchenko) said : #9

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. OpenOffice.org (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.

Derek White (d-man97) said : #10

@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.