TL;DR
To create desktop shortcuts on Ubuntu, follow these steps:
- Press Ctrl + Alt + T to open the Terminal.
- Run nano ~/.local/share/applications/shortcut_name.desktop.
- Enter the shortcut details in the nano editor.
- Press Ctrl + O to save and Ctrl + X to exit nano.
- Make the shortcut executable with chmod +x ~/.local/share/applications/shortcut_name.desktop.
- Create a link on the desktop with ln -s ~/.local/share/applications/shortcut_name.desktop ~/Desktop.
- Right-click the shortcut and select Allow Launching.
Check out our comprehensive guide below to learn more about how to create desktop shortcuts on Ubuntu in four easy ways.
Searching through folders to find your favorite apps can be frustrating. Desktop shortcuts are a great solution. In this post, I’ll show you how to create desktop shortcuts on Ubuntu using different methods, like the terminal, GUI tools like Nautilus and GNOME Tweaks, or third-party apps.
I’ll also help you fix common issues and share tips for customizing your shortcuts. By the end, you’ll quickly access your most-used files and apps, making your Ubuntu experience smoother and more enjoyable.
Desktop Shortcuts and Their Benefits
Desktop shortcuts are icons on your computer’s desktop that provide quick access to files, applications, or folders. They act like a link, allowing you to open the desired item with just a double-click.
Benefits:
- Space Saving: Shortcuts don’t take up much space on your hard drive because they are just links to the actual files or applications.
- Quick Access: Shortcuts let you access your favorite files and applications quickly, saving you time.
- Efficiency: Instead of navigating through multiple folders or menus, you can open programs and files directly from the desktop.
- Organization: You can keep your desktop organized with shortcuts, grouping related items together for easier access.
- Customization: You can create shortcuts for anything you use frequently, tailoring your desktop to fit your workflow.
How to Create Desktop Shortcuts on Ubuntu
To create desktop shortcuts on Ubuntu, you can use several methods. Use the Terminal by opening it with Ctrl + Alt + T
, then create and configure a .desktop
file. With Nautilus File Manager, copy the desired application’s .desktop
file to your desktop and make it executable.
GNOME Tweaks allows you to enable desktop icons and create shortcuts via its interface. GNOME Shell Extensions let you manage and customize desktop icons by installing the Desktop Icons NG extension. Each method offers a unique way to streamline your workflow on Ubuntu.
Let’s have a closer look into each method here:
1. Ubuntu Terminal
Creating desktop shortcuts using the terminal is a powerful method that provides full control over the configuration and customization of your shortcuts. This method is particularly useful for those who prefer a command-line interface and want to automate the process. Here is the step-by-step guide:
- Press Ctrl + Alt + T to open the Terminal app and execute the following command.
nano ~/.local/share/applications/shortcut_name.desktop
Replacing shortcut_name with your desired shortcut name. This command will open a new file named shortcut_name.desktop
in the nano text editor.
- In the nano editor, add the following content to the file, replacing the placeholder values with appropriate details:
[Desktop Entry]
Name=Application
Name Exec=/path/to/application
Icon=/path/to/icon
Type=Application Terminal=false
This text will define the properties of your desktop shortcut, such as its name, execution command, icon path, and its type.
- Press Ctrl + O to save the file, and then press Ctrl + X to exit the nano editor.
- Run the command below to make the shortcut executable.
chmod +x ~/.local/share/applications/shortcut_name.desktop
- Type and press Enter to create an executable shortcut on the desktop.
ln -s ~/.local/share/applications/shortcut_name.desktop ~/Desktop
- You’ll see a shortcut created for the application on your Ubuntu desktop.
- To securely launch the created desktop shortcut, right-click on it and click Allow Launching.
- Now, you can easily launch the Terminal app via your Ubuntu desktop.
2. Nautilus File Manager
Creating desktop shortcuts using the GNOME GUI is a user-friendly method that allows you to easily create and manage shortcuts without needing to use the command line. This method is ideal for users who prefer graphical interfaces. Here is the step-by-step guide:
- Navigate to the Search bar in the Application menu and look for “Files” or “Nautilus,” then open the file manager.
- Navigate to the Computer folder, then go to /usr/share/applications or /usr/local/share/applications.
- Locate the desired application’s .desktop file and right-click on the .desktop file and select Copy. However, if you don’t see the desktop shortcut for an application, you’ll have to create it using the first method explained in the article.
- Now, head back to the Home folder, and click the Desktop folder in the right pane of the file manager window.
- Right-click on an empty area in the Desktop folder and select Paste.
- Right-click on the created desktop shortcut and select Properties.
- In the Permissions tab, check the Allow executing file as program option.
3. GNOME Tweaks
GNOME Tweaks provides an easy-to-use interface for enabling desktop icons and creating shortcuts. It’s perfect for users who prefer managing desktop settings through a dedicated application.
- To install GNOME Tweaks, run the following command in the Terminal:
sudo apt install gnome-tweaks
- Wait for the installation to complete, and enter your admin password if prompted.
- Navigate to the App tab at the corner, search for GNOME Tweaks, and double-click it.
- In the app, choose the Icons style. By default, the desktop icons will be enabled.
- Now, open the text editor and create a new file with a .desktop extension. Add the following appropriate information for the apps to create desktop shortcuts on Ubuntu:
[Desktop Entry]
Name=Application
Name Exec=/path/to/application
Icon=/path/to/icon
Type=Application Terminal=false
- Save the .desktop file to your Desktop folder and exit.
- Now, navigate to the directory where you have saved this text file.
- Then right-click on it, select Properties, go to the Permissions tab, and check the Allow executing file as program option to make it executable.
- Now, you just have to simply drag and drop the file onto your desktop. However, you’ll see a small cross on the icon and an error message.
- To fix this, right-click the shortcut icon and select Allow Launching.
- Once done, double-click on the icon and launch the application via the shortcut created on the Ubuntu desktop.
4. GNOME Shell Extensions
GNOME Shell Extensions enhance the functionality of the GNOME desktop environment, making it easier to manage and customize desktop icons and shortcuts.
- Install the Desktop Icons GNOME Shell extension from the GNOME Extensions website.
- Then, execute the command below to install the GNOME Extensions on your Ubuntu system:
sudo apt install gnome-shell-extensions
- Once the GNOME extension is installed, navigate to the Application menu and search for the extensions.
- Find the Desktop Icons NG (DING) that you installed earlier in the first step. Then, turn it on to enable all the apps and file shortcuts to appear on your Ubuntu desktop.
- You can click the Settings menu to further customize the shortcuts on your Ubuntu desktop. However, to create desktop shortcuts on the Ubuntu desktop, you’ll have to follow the first method outlined in this guide. This is because GNOME will just allow you to view, customize, and use them via Ubuntu Desktop and not create them.
3 Troubleshooting Tips for Desktop Shortcuts on Ubuntu
Here are some common issues that may arise when creating and using desktop shortcuts on Ubuntu, as well as solutions for fixing these errors:
1. Shortcut Not Working
If your desktop shortcut on Ubuntu is not working, it may be because the target file or application has been moved or deleted. To fix this error, navigate to the directory where the shortcut was created. Then, check the command field to ensure that the file path is correct. If the path is incorrect, update it with the correct path. You can use the which
command followed by the name of the application to get the path of a file of a certain application in Linux.
2. Incorrect Icon Image
If the desktop shortcut on Ubuntu has an incorrect or generic icon, you can change it to a custom icon. To do this, right-click on the shortcut and select Properties. In this window, click on the icon just above the Name field and select a new icon from the list. Or you can browse for any image file on your Linux system.
3. Broken Shortcut Link
Sometimes, a shortcut may become broken or inactive due to changes in the system. To fix this, recreate the shortcut file with the .desktop as the steps outlined in the methods section of this article. Here is the syntax for the file content that you’ll need to create using the nano text editor via the Terminal or just a simple gedit text editor from the Application menu in Ubuntu.
[Desktop Entry]
Name=Application
Name Exec=/path/to/application
Icon=/path/to/icon
Type=Application Terminal=false
Advanced Tips and Tricks for Desktop Shortcuts
Creating desktop shortcuts is just the beginning. Enhance your productivity and customize your experience with these advanced tips and tricks. Learn how to personalize icons, assign keyboard shortcuts, create file-specific shortcuts, and use third-party tools for better management.
🖼️ Customizing Shortcut Icons
Make your desktop shortcuts more recognizable and visually appealing by changing their icons.
How-To Customize Shortcut Icons:
- Right-click on the Shortcut: Select Properties.
- Change the Icon: Click on the current icon image and choose a new one from your files.
- Select an Icon: Pick an icon that helps you quickly identify the shortcut.
⌨️ Assigning Keyboard Shortcuts to Desktop Shortcuts
Access your shortcuts even faster by assigning custom keyboard combinations.
How-To Assign Keyboard Shortcuts:
- Right-click the Shortcut: Select Properties.
- Find Keyboard Shortcut Option: Look for the option to assign a keyboard shortcut.
- Enter Key Combination: Type in the key combination you want to use. Now, you can open the shortcut with a quick press of keys.
🛠️ Using Third-Party Tools to Manage Desktop Shortcuts
Enhance your ability to create, edit, and organize shortcuts with more advanced features.
How-To Use Third-Party Tools:
- Customize Your Shortcuts: Take advantage of the advanced features and customization options that these tools provide.
- Install Tools Like Alacarte: Alacarte is a menu editor for GNOME that helps manage shortcuts.
- Open the Tool: Use the tool to create, edit, and organize your shortcuts.
To Wrap Up
To create desktop shortcuts in Ubuntu, you can use several methods that suit different preferences. You might prefer the terminal for control and customization or the Nautilus File Manager for an easy graphical interface. GNOME Tweaks helps manage settings, and GNOME Shell Extensions enhance functionality.
If you’re interested in optimizing your Ubuntu setup further, I suggest exploring:
- Learning how to install a GNOME desktop environment on Ubuntu, which can give you more features and a fresh look.
- Mastering command line usage on Linux to enhance your efficiency and control over the system.
- Understanding how to monitor and manage your system’s memory for better performance and stability.
Frequently Asked Questions
How do I remove a desktop shortcut on Ubuntu?
1. Right-click on the shortcut you want to remove.
2. Select Move to Trash or press the Delete key on your keyboard.
3. If necessary, empty the trash to permanently delete the shortcut.
Can I create desktop shortcuts for websites in Ubuntu?
1. Open Google Chrome and navigate to the website you want to create a shortcut for.
2. Click on the three-dot menu in the top-right corner and select More tools > Create shortcut.
3. Choose a name for the shortcut and click Create.
4. A .desktop file will be created in your desktop folder, and the shortcut will appear on your desktop.
How do I back up my desktop shortcuts on Ubuntu?
1. Open the Nautilus File Manager.
2. Navigate to your desktop folder (usually located at /home/your_username/Desktop).
3. Select all the desktop shortcuts you want to back up.
4. Copy the selected shortcuts to an external drive, a different directory on your computer, or a cloud storage service to create a backup.
Can I create a desktop shortcut for a specific file or folder in Ubuntu?
ln -s /path/to/source /path/to/destination
command in the Terminal app. Alternatively, you can use Nautilus File Manager to create a shortcut by copying the desired file or folder to the desktop and selecting Create link when pasting it.