Monday, November 23, 2009

Getting Creative with Application Icons on Moblin

After installing Skype and discovering the world of .desktop files located in /usr/share/applications/ I decided that I wanted a cooler icon for Google Chrome (chromium) than the standard "Web Browser" icon that Moblin assigned Chrome after it installed through the "Moblin Application Installer." BTW - if you know how I can contribute to the addition of Skype to the Moblin Application Installer please let me know, I would love to help.

Basically all I did was grab a .png of the Google Chromium logo and make four files out of it - the same file but in four different sizes: 16x16, 32x32, 64x64 and 48x48. The first three I placed in their respective folders inside the /usr/share/icons/hicolor/ folder. Then I placed the 48x48 in the /usr/share/icons/ folder.

Once those are in place edit the chromium-browser.desktop file just as you did the skype.desktop file in my prior post. For example mine looks like this:

[Desktop Entry]
Version=1.0
Name=Google Chrome
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=chromium-browser --enable-plugins --enable-extensions --enable-user-scripts --enable-printing
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chrome
Categories=Network;
MimeType=text/html;
StartupWMClass=Chromium
StartupNotify=true

X-Desktop-File-Install-Version=0.15

That main thing you're look for is that it says Icon=chrome. This is because all of the files that I placed in the hicolor and icons folders are named "chrome.png" so the desktop file will look for them in those folders (automatically) and will find them named "chrome" and use them. According to the Moblin dev site you do not need to include the ".png" -- so I did not.

Finally - reboot. Now, doesn't that look sweet?

No comments: