sudo apt-get install --no-install-recommends gnome-panel gnome-desktop-item-edit ~/Desktop/ --create-new sudo mv ~/Desktop/name.desktop /usr/share/applications/
Sometimes programs you want to install in Linux come as nicely packaged deb files, making them easy to install. Other times programs come as a folder with a shell script
*.sh inside that you are supposed to run through the command line. This can be annoying, and some of us want to create a launcher icon so that we can search for it in the dashboard or add it to the sidebar.
I’m running Ubuntu 14.04 right now, and here is the easiest way to “install” those kinds of programs without having to manually edit config files or run tons of commands. I’m going to use the installation of the program SmartSynchronize (a file comparison utility) as an example.
- First, download and unzip the program. In the case of SmartSynchronize, we will have a “smartsynchronize” folder as a result.
- Create a new folder called “.bin” inside your home directory, and copy the smartsynchronize folder inside. If you can’t see the folder (folders that start with a dot are hidden folders) then push ctrl-h to view hidden folders.
- Install the ubuntu-panel application. This can be done through the Ubuntu Software Center, or using the command below.
sudo apt-get install --no-install-recommends gnome-panel
- Run gnome-desktop-item-edit with the options below, and use the resulting GUI to create an launcher file. These files end in the “.desktop” extension, but you can’t see the extension if they are on your desktop. They are basically a shortcut to launch a program.
gnome-desktop-item-edit ~/Desktop/ --create-new
- Fill out the information:
- Type: Application
- Name: Don’t use spaces and just type the name of the application. This is the name of the “.desktop” file that will be created in the next step.
- Command: Browse inside the folder you placed in the “.bin” folder, and find file that is used to launch the program. Usually this is a file ending in “.sh” that is inside the downloaded folder called “bin”.
- Comment: This can be anything and isn’t really that useful.
- Icon: Click on the icon to browse for a new icon. Usually the icons are located in the same folder as the file you chose for the command. Just choose the highest resolution icon available.
- You should now have a “<name>.desktop” icon on your desktop. In my case, this created a “smartsynchronize.desktop” folder on my desktop.
- Now all that is left is to copy that file into the correct folder. You need root to do this, so it is easiest to do it using the command line. Just make sure to replace “name.desktop” to the name of the file you created in the last step.
sudo mv ~/Desktop/name.desktop /usr/share/applications/
In Ubuntu 14.04 the changes should be effective immediately. Just search in the launcher for the program name and it should show up. Then you can drag the icon to your launcher if you want.