This is quite a similar problem to this one, but the provided solution doesn't work for me.

I'd like to create a launcher for Unity that starts a java applet (the tantrix.com lobby) with parameters given from a Zenity dialog. This is what my tantrix.desktop file looks like:

[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Tantrix
GenericName=Online Board Game
Comment=tantrix.com Lobby starten
Exec=/home/florian/bin/tantrix guest
Icon=/home/florian/Bilder/Icons/Tantrix.png
Terminal=false
Categories=Game;BoardGame;StrategyGame;
OnlyShowIn=Unity;GNOME;KDE;Xfce;LXDE;
TargetEnvironment=Unity
StartupWMClass=sun-awt-X11-XFramePeer

While this is /home/florian/bin/tantrix:

#!/bin/bash
UN=$1
# PW=$2
PW=`zenity --entry --text="Passwort für $UN:" --hide-text`
exec appletviewer "http://tantrix.com/cgi-bin/gs_logon.cgi?pname=$UN&passwd=$PW&language=german"

But after clicking the icon and passing the zenity input, another icon appears for the appletviewer, and the original one doesn't give the applet focus...

Can't upload images yet, so here it is (The 2nd Icon is the launcher, the 3rd the Java applet (appletviewer) icons)

I also tried different variation, without zenity, putting the appletviewer command directly into the .desktop file, using the 2nd StartupWMClass value (sun-applet-Main) etc...

p.s.: you can try it with the password guest if you like...

Thanks for any help!

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.