PDA

View Full Version : [ubuntu] No icon for running Java application in Unity



cdysthe
May 16th, 2011, 11:51 PM
Hi,

I'm running a Java application (JBidWatcher) quite often. I've added it to the menu using the main menu editor using a custom icon. It can be launched from the Unity launcher and the correct icons shows there, but there's no icon for the running task in the launcher, only a question mark. How can I get the application icon to show for the running task as well?

wojox
May 16th, 2011, 11:57 PM
How was it installed in the system? Your home directory or in the system?

cdysthe
May 17th, 2011, 12:10 AM
How was it installed in the system? Your home directory or in the system?

It's simply a jar file downloaded from the JBidWatcher site. They do not have an installer for Linux (as far as I know). I put it in a folder in my home directory and launch it from a menu entry with a custom icon pointing to a script containing:

java -Xmx512m -jar ~/.jbidwatcher/JBidwatcher.jar

This has worked fine for years under Gnome, but not in Unity it seems. It launches fine and show up with the icon in Unity, but the running task doesn't have the icon.

wojox
May 17th, 2011, 02:14 AM
Go into

.local/share/applications/

See if there is a .desktop file for your Launcher. If there is what ever name it is, open with gedit and post the results.

cdysthe
May 17th, 2011, 03:10 AM
Go into

.local/share/applications/

See if there is a .desktop file for your Launcher. If there is what ever name it is, open with gedit and post the results.

There's a desktop file called "JBidWatcher" in that directory. It contains the following:

http://pastebin.com/kachAdQk

wojox
May 17th, 2011, 03:53 AM
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name[en_US]=JBidWatcher
Exec=/home/christian/.jbidwatcher/jbidwatcher.sh
Comment[en_US]=eBay Auction Sniper
Name=JBidWatcher
Comment=eBay Auction Sniper
Icon=/home/christian/Pictures/Graphics/Icons/jbidwatcher.png

You had two icon references in there. I took one out so edit that file again and put this code in and save. Then take the file and drag and drop into the Dock.

cdysthe
May 17th, 2011, 05:06 AM
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name[en_US]=JBidWatcher
Exec=/home/christian/.jbidwatcher/jbidwatcher.sh
Comment[en_US]=eBay Auction Sniper
Name=JBidWatcher
Comment=eBay Auction Sniper
Icon=/home/christian/Pictures/Graphics/Icons/jbidwatcher.png

You had two icon references in there. I took one out so edit that file again and put this code in and save. Then take the file and drag and drop into the Dock.

Thanks. That worked!