Thursday, 6 December 2012

Create Custom Launchers in Fedora

I just finished installed SmartGit on my new OS, like I did the last one

SmartGit is a simple bash script that I had to run from the command line. This time I decided I wanted a program launcher from my applications menu and my 'favourites bar' (or whatever that thing on the left hand side of the desktop is called!) 

So first I moved the smartgit folder from ~/Downloads/ to /usr/local/ and made the .sh script executable

sudo cp -R ~/Downloads/smartgit-3_0_11/ /usr/local/
chmod +x /usr/local/smartgit-3_0_11/bin/smartgit.sh
view raw clf1.sh hosted with ❤ by GitHub


Then to create a launcher I made a new .desktop file:


sudo touch /usr/local/share/applications/smartgit.desktop
view raw clf2.sh hosted with ❤ by GitHub


and added the following:

Encoding=UTF-8
Version=1.0
Type=Application
Exec=/usr/local/smartgit-3_0_11/bin/smartgit.sh
Name=SMARTGIT
Comment=custom launcher for smartgit.sh
NoDisplay=false
Categories=Application;Programming;Utility;
Icon=/usr/local/smartgit-3_0_11/bin/smartgit-128.png
[Desktop Entry]
view raw clf3.sh hosted with ❤ by GitHub


Of course the 'Icon' can be anything you like - I chose the one which comes with the program out of sheer non-inventivenessIn Applications it will appear under All and Accessories. Right click and 'Add to Favourites' and it will appear on your side bar.