4 Easy Ways to Create Desktop Shortcuts on Ubuntu

Written by

Reviewed by

Last updated: July 24, 2024

Expert verified

SVG Image

TL;DR

To create desktop shortcuts on Ubuntu, follow these steps:

  1. Press Ctrl + Alt + T to open the Terminal.
  2. Run nano ~/.local/share/applications/shortcut_name.desktop.
  3. Enter the shortcut details in the nano editor.
  4. Press Ctrl + O to save and Ctrl + X to exit nano.
  5. Make the shortcut executable with chmod +x ~/.local/share/applications/shortcut_name.desktop.
  6. Create a link on the desktop with ln -s ~/.local/share/applications/shortcut_name.desktop ~/Desktop.
  7. 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:

  1. 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.

  1. 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.

  1. Press Ctrl + O to save the file, and then press Ctrl + X to exit the nano editor.
use ubuntu terminal to create desktop shortcuts on ubuntu
  1. Run the command below to make the shortcut executable.
chmod +x ~/.local/share/applications/shortcut_name.desktop
  1. Type and press Enter to create an executable shortcut on the desktop.
ln -s ~/.local/share/applications/shortcut_name.desktop ~/Desktop
  1. You’ll see a shortcut created for the application on your Ubuntu desktop.
shortcut created for application on ubuntu desktop
  1. To securely launch the created desktop shortcut, right-click on it and click Allow Launching.
securely launch created desktop shortcut on ubuntu
  1. Now, you can easily launch the Terminal app via your Ubuntu desktop.
launch terminal app via 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:

  1. Navigate to the Search bar in the Application menu and look for “Files” or “Nautilus,” then open the file manager.
use nautilus file manager creating desktop shortcuts on ubuntu
  1. Navigate to the Computer folder, then go to /usr/share/applications or /usr/local/share/applications.
navigate to computer folder in nautilus file manager
  1. 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.
locate desired desktop file in computer folder
  1. Now, head back to the Home folder, and click the Desktop folder in the right pane of the file manager window.
click the desktop folder in home folder
  1. Right-click on an empty area in the Desktop folder and select Paste.
paste file in desktop folder
  1. Right-click on the created desktop shortcut and select Properties.
right click and select properties
  1. In the Permissions tab, check the Allow executing file as program option.
allow executing file as program option in permissions

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.

  1. To install GNOME Tweaks, run the following command in the Terminal:
sudo apt install gnome-tweaks
  1. Wait for the installation to complete, and enter your admin password if prompted.
use gnome tweaks to create desktop shortcuts on ubuntu
  1. Navigate to the App tab at the corner, search for GNOME Tweaks, and double-click it.
search for gnome tweaks in app tab
  1. In the app, choose the Icons style. By default, the desktop icons will be enabled.
choose the icons style to enable desktop icons
  1. 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    
  1. Save the .desktop file to your Desktop folder and exit.
create a new file in text editor
  1. Now, navigate to the directory where you have saved this text file.
navigate to the directory where text file was saved
  1. 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.
to make it executable allow it in permissions tab
  1. 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.
a small cross on icon and an error message
  1. To fix this, right-click the shortcut icon and select Allow Launching.
select allow launching
  1. Once done, double-click on the icon and launch the application via the shortcut created on the Ubuntu desktop.
created desktop shortcuts on ubuntu using gnome tweaks

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.

  1. Install the Desktop Icons GNOME Shell extension from the GNOME Extensions website.
install the desktop icons gnome shell extension
  1. Then, execute the command below to install the GNOME Extensions on your Ubuntu system:
sudo apt install gnome-shell-extensions
  1. Once the GNOME extension is installed, navigate to the Application menu and search for the extensions.
navigate to the application menu
  1. 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.
find the desktop icons ng ding
  1. 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.
customize the shortcuts on ubuntu desktop

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.

fix shortcut not working error

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.

incorrect icon to customized icon

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:

  1. Right-click on the Shortcut: Select Properties.
  2. Change the Icon: Click on the current icon image and choose a new one from your files.
  3. 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:

  1. Right-click the Shortcut: Select Properties.
  2. Find Keyboard Shortcut Option: Look for the option to assign a keyboard shortcut.
  3. 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:

  1. Customize Your Shortcuts: Take advantage of the advanced features and customization options that these tools provide.
  2. Install Tools Like Alacarte: Alacarte is a menu editor for GNOME that helps manage shortcuts.
  3. 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:

Frequently Asked Questions

How do I remove a desktop shortcut on Ubuntu?

To remove a desktop shortcut on Ubuntu, follow these steps:
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?

Yes, you can create desktop shortcuts for websites in Ubuntu. One way to do this is by using your web browser to create a .desktop file for the website. Here’s how to do it using Google Chrome:
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?

To backup your desktop shortcuts on Ubuntu, follow these steps:
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?

Yes, you can create a desktop shortcut for a specific file or folder in Ubuntu. One simple way to do this is by creating a symlink (symbolic link) using the 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.

Ojash

Author

Ojash is a skilled Linux expert and tech writer with over a decade of experience. He has extensive knowledge of Linux's file system, command-line interface, and software installations. Ojash is also an expert in shell scripting and automation, with experience in Bash, Python, and Perl. He has published numerous articles on Linux in various online publications, making him a valuable resource for both seasoned Linux users and beginners. Ojash is also an active member of the Linux community and participates in Linux forums.

Akshat

Reviewer

Akshat is a software engineer, product designer and the co-founder of Scrutify. He's an experienced Linux professional and the senior editor of this blog. He is also an open-source contributor to many projects on Github and has written several technical guides on Linux. Apart from that, he’s also actively sharing his ideas and tutorials on Medium and Attirer. As the editor of this blog, Akshat brings his wealth of knowledge and experience to provide readers with valuable insights and advice on a wide range of Linux-related topics.

Share this article
Shareable URL
Prev Post

How to Check Memory in Linux [8 Easy Ways]

Next Post

How to Navigate Vim Page Down and Up Controls in 8 Easy Ways

Leave a Reply

Your email address will not be published. Required fields are marked *

Read next