Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a problem with the manual installation of Eclipse Juno. After unpacking the tarball to /opt, adding a symlink from /usr/local/bin and adding the following to a new file /usr/share/applications/eclipse.desktop:

[Desktop Entry]
Version=1.0
Name=Eclipse
GenericName=Integrated Development Application
Comment=Eclipse Juno
Exec=/usr/local/bin/eclipse
TryExec=/usr/local/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Development;IDE;

I still get this weird behavior from the dash:

Huge icon in Unity dash

Eclipse runs just fine and the icon is clickable but as you can see the size is a bit off. How can i fix this? Shouldn't Unity automatically scale the icon?

share|improve this question
3  
Useful Info: This problem exists in Ubuntu 12.10 only. It is working fine in Ubuntu 12.04 or lesser. –  saji89 Jan 19 '13 at 16:12

6 Answers 6

  • Create a link to ecplise icon.xpm in your share folder:

ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse4.xpm

for your user only or

sudo ln -s /opt/eclipse/icon.xpm /usr/share/icons/eclipse4.xpm

for all users

  • In your eclipse.desktop file (in ~/.local/share/applications or /usr/share/applications), replace Icon=/opt/eclipse/icon.xpm by Icon=eclipse4. You don't need to add the .xpm suffix.

If necessary, also update Icon[en_US] line with the same value.

The file eclipse.desktop may have a different name depending on the tool you used to create it.

Edit: Improve answer thanks to Pius, QD. and iAm comments

share|improve this answer
1  
That's the answer. I would only add that you don't have to copy the file but can rather make a soft link like QD. mentioned below. + If you used Main Menu application to create the .desktop file, you can find it in ~/.local/share/applications. On my machine it was called alacarte-made.desktop so be aware that it's name has nothing to do with the application launched. –  Pius Jan 1 '13 at 10:04
    
Actually, the best way is to put eclipse4.xpm into /usr/share/icons folder, because using ~/.local/* location works for a single user only. –  iAm May 13 '13 at 6:30

It seems Unity cannot resize xpm files correctly.

As a workaround, you can convert your icon to png.

sudo apt-get install imagemagick
convert /opt/eclipse/icon.xpm /opt/eclipse/icon.png

Don't forget to update your .desktop file.

share|improve this answer

this may help you...

enter image description here

you can save image and change icon to this.

I scaled image icon.xpm size to 48 x 48 pixel which is in eclipse application

It looks well:

enter image description here


48x48 may look a little blurry on higher (or even medium) resolution. You may use 512x512 (even though it's a little bit an overkill) to ensure your system resizes it to whatever is used. PNGs are resized properly, so you can always supply it with a bigger image than actually displayed.

512x512 icon version can be found here: Eclipse icon

The image is taken from Eclipse help page: Eclipse help page

share|improve this answer

I had the same problem but solved this buy copying icon.xpm to /usr/share/pixmaps and referencing the icon in that folder.

share|improve this answer
    
And what version of Ubuntu you was using? When you say referencing the icon in that folder, What folder and how did you reference the icon? Please, edit your answer adding the requested information. –  Lucio Feb 16 '13 at 2:37

@Tawane I add symlink into ~/.local/share/icons/ which maybe makes it more easy:

ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse.xpm
share|improve this answer

The icon in the eclipse directory (eclipse.xpm) has a size of 256x256. Replace it with a smaller one (48x48 works for me).

share|improve this answer
2  
I believe this started with Ubuntu 12.10, before 12.10 xpm icons were resized properly. –  Peter van der Does Nov 16 '12 at 13:15
1  
Oh. I first saw this after upgrading to 12.10 and eclipse Juno and thought perhaps it was because of the new eclipse version. I will check of the problem still persists (after all the updates that came in the meantime). If it does, I will file a bug against Ubuntu 12.10. –  Axel Nov 16 '12 at 13:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.