This post will explain about how to create desktop launcher in Unity Desktop and also access same launcher from Dash Home. Here we are using the Ubuntu 16.04 LTS Desktop edition. Many people wants to keep the Desktop launcher/Desktop shortcuts so that they can readily access applications by just clicking on its Desktop icons.
Before doing practical let us tell you that there are many ways to achieve this. To make the life easier we are only bringing two simple methods for creating the desktop launcher.
Create Desktop Launcher through GUI
This section is for readers who like the GUI way. Abbreviation of GUI is “Graphical User Interface”.
(a) You have to first install the package called gnome-panel. So open the terminal and use given below commands.
sudo apt update sudo apt install gnome-panel
Now run the next command in terminal.
gnome-desktop-item-edit --create-new ~/Desktop
You will see new Window is opened with vacant field. It is pretty much easy to fill these field.
In above screen you can see the window has 5 options. Are you wondering what is 5th option we are talking then answer is you can customize the icon also. This is at top right hand side of icon section. In below we are specifying which you can write.
Type: It offers 3 type that is Application, Application in Terminal and Location. Here we are selecting “Application” which is default one.
Name: Write the name of launcher.
Command: Write the command name. You can also write absolute path of command with some arguments.
Comment: Write your own comments.
In our sample practical, we are creating the ‘Terminal’ desktop icon. The given below information is same of above shared screenshot.
– We have selected the Application Type
– We have written the name of launcher as “MyTerminal” in ‘Name’ section
– We also know that by using command
gnome-terminal new terminal will be opened hence using it in ‘Command’ section.
– In ‘Comment’ section we have just written some description reference.
(b) After providing all information, click OK button to save. You will get the ‘Desktop Launcher’ on your system Desktop now. In below screenshot, we have shown our ‘Desktop Launcher’
That’s it. Do Double click on the icon, it should work for you.
Create Desktop Launcher via command line
This method is for who loves working in terminal. And actually this is the basic way of creating Desktop Launcher. You can read our post on Shotcut Installtion in which we have written about creating desktop launcher.
(a) Open the terminal and by using your favourite file editor create new file with extension
sudo vi ~/Desktop/MyTerminal.desktop
Paste the given below contents and modify the parameters.
#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=gnome-terminal Name=MyTerminal Exec=gnome-terminal Comment=Example Desktop Launcher For terminal
Basically edit only below parameters in file.
Type= Application (Keep the value ‘Application’ as it is)
Icon= Name of icon file having .svg extension. By default location of icon is /usr/share/icons/Humanity/apps/[font_size]. Save your customize icon .svg file in default location and in ‘Icon’ only give file name.See above sample.
Name= Give the name of your Desktop Launcher
Exec= Give the command name which will open the application.
(b) Give executable permission to your .desktop file. In our example, we will use below given command hence replace file name ‘MyTerminal.desktop’ with your desktop file name.
sudo chmod +x MyTerminal.desktop
Now check, launcher will be available in Desktop. Do double click on desktop launcher to open the application.
Desktop launcher in Dash home
This is very simple to get desktop launcher in Dash home. You only have to copy the .desktop file in /usr/share/applications/ .
note: Replace MyTerminal.desktop with your .desktop file in given below command.
sudo cp ~/Desktop/MyTerminal.desktop /usr/share/applications/
Now open the ‘Dash home’ by pressing “Alt+F2” keys and type your launcher name. It should be there for sure.
See our launcher in ‘Dash Home’.