« Help Doesn't Hang on Windows | Main | Don't Destroy Your Customization Work! »

Tuesday, July 21, 2009

Creating a Desktop Shortcut on Linux

Here is how I created a desktop shortcut on my Linux platform.

When you install Thingamablog on Windows you get a nice shortcut with an icon. But I installed Thingamablog on my Linux computer by unzipping a file and then running the .jar file. No icon; no shortcut. So I made one. I use the KDE desktop, so I don't know if this would work on a Gnome desktop or not.

First, I wrote a bash file to run the program. Here it is:

#!/bin/bash
# Contains all the switches to run thingamablog
cd /home/brian/apps/thingamablog/thingamablog-1.1b6
java -jar thingamablog.jar

I put that into a file named "thingamablog" in the directory where the jar file resides. Then I created a shortcut to an application by right clicking on the desktop and choosing "Create New=>Link to Application...". In the dialog box click on the Application tab and browse to the bash file you created. Change the name of the shortcut to whatever you want, and then click on OK to create the shortcut.

Double click the shortcut to run the application. It works for me. Unfortunately, it has an ugly gear icon in it.

I wanted a nice icon for my shortcut, so I made one. The application icons in Linux are stored (on my system) in the directory

/usr/share/icons/hicolor

in directories named after their sizes. I created four icons of different sizes with the same image,

  • thing-logo48.png
  • thing-logo32.png
  • thing-logo22.png
  • thing-logo16.png

The icons must be in .png or .xpm format.

Then I copied them into the proper directories as root, like this:

% su
% <enter password>
% cd /usr/share/icons/hicolor
% cp /home/brian/images7/created/thingamablog/thing-logo48.png 48x48/apps/
% cp /home/brian/images7/created/thingamablog/thing-logo32.png 32x32/apps/
% cp /home/brian/images7/created/thingamablog/thing-logo22.png 22x22/apps/
% cp /home/brian/images7/created/thingamablog/thing-logo16.png 16x16/apps/

Change the locations to the directories where you have the images saved. Once the images are saved, right click on the shortcut and select Properties. Then click on the icon in the upper left to post the icon chooser. The thingamablog logos should be in the list. Select the one you want to use (I put the 48x48 on the desktop) and you are done.

In case you don't want to create your own, here are mine. Just right click on the images and download them.

 

That is all there is to it.

Posted by Brian S. Kimerer at 10:07 PM

This site and all of its contents are copyright Brian S. Kimerer 2009