Speaking of which, navigation can be made much easier through shortcuts. It’s the reference point for all your navigation. So as you can see there is quite a lot of useful functionality in the desktop shortcuts on Linux.The desktop is the first thing that greets the user when they login to their computer. A Useful GitHub Shortcut Example…Ī better fleshed out and usable example is below where the shortcut is to GitHub (via firefox) and there are multiple actions for the context menu options for viewing Profile, Issues and Pull Requests. If we create the textfile with the below contents and call it “test.Desktop”, then add it to the /home/.local/share/applications folder, it will appear in the Applications list and also now has a right click context menu which includes “Navigate to Google” (as per the screenshot).Įxec=firefox -new-window Icon=Īnd if I add it to my Dock Toolbar then I get the context menu there too. Which provides an additional menu item for action within the shortcut (in this case it uses Firefox to navigate to Google). Notice the Actions property and associated “ Desktop Action” entry
INSTALL MOZILLA FIREFOX DESKTOP SHORTCUT ICON CODE
Adding Context Menu Actions to the shortcuts…Ĭheck out this example below for a shortcut named Test that launches an application (VS Code in this case). If you add your custom “.desktop” file to one of the above file paths then you can see them in your applications menu, and then you can go further by adding it to your Favourites list (right click icon > Add to Favorties), thus making it appear in your launcher (depending on your distro’s launcher toolbar settings). On Ubuntu checkout here: /usr/share/applications for a list of your shared system applications shortcuts or /home/.local/share/applications for your users application shortcuts list. A good place to find new icons is to poke around in the “.Desktop” files already on your system. Notice that the Icon property has been updated to be Icon=text-html so show its a web link. Firefox) and pass the URL as a parameter as per below:Įxec=firefox -new-window Categories=Application If you want to add a web URL then its possible to use the Type=Application and point to your browser of choice (e.g. As well as the Type=Application option there is also Type=Link for web/document links that can be used with a URL property like this….īut this doesnt work for me in Ubuntu 20.10 and it seems this has been removed from Gnome as per the discussion on this GitHub issue. Taking it further…īut what else can we do with these “.desktop” files? The specification for the files can be found here. The category property is for you to optionally choose which group of application types it sits with in the menus. Just create the file and amend the Exec path to be the application you want to launch, then change the name and optionally the icon etc. In a nutshell that’s it for creating application shortcuts in Ubuntu (and many other Linux distros as this is a shared standard). Just save this file on your desktop with a name “.desktop” extension, eg. In the below example we are launching the Visual Studio Code application which is executed from /usr/share/code/code.
Its the same concept except the Exec path would be the file path to the executable application instead of a script and it would be “terminal=false” as we don’t need to launch the command in the terminal. But lets say that we want to create a shortcut for an application instead of a script.