Desktop shortcuts in Linux Mint work differently than Windows

A desktop shortcut in Linux Mint is a small file that points to a program, document, or folder. Unlike Windows, where you right-click and create a shortcut, Linux Mint requires you to either create a .desktop file manually or copy an existing one from your applications menu. The shortcut then sits on your desktop and launches whatever it points to when you double-click it.

The method you use depends on what you want to shortcut. If you want quick access to an installed program, the fastest route is to drag it from the applications menu. If you want to shortcut a document, folder, or a program that is not in the menu, you will need to create or edit a .desktop file using a text editor.

Key Takeaways

  • The simplest method is to open the applications menu, find the program you want, right-click it, and select "Add to Desktop."
  • For programs not in the menu or for documents and folders, you can create a .desktop file in a text editor and save it to your desktop with executable permissions.
  • Desktop files must have the correct format with a [Desktop Entry] section, a Name, and an Exec line pointing to the program or file.
  • After creating a .desktop file, you must mark it as executable before it will launch when clicked.

The fastest way: drag from the applications menu

Open the applications menu by clicking the grid icon in the taskbar (usually at the bottom left). Search for or browse to the program you want to shortcut. Right-click the program name and select "Add to Desktop." The shortcut appears immediately on your desktop.

This method works for any installed program that appears in the applications menu. If the program does not show up there, it may not be installed, or it may be a command-line tool that does not have a menu entry. In that case, use the manual .desktop file method instead.

Creating a .desktop file for programs not in the menu

Open the file manager and navigate to your Desktop folder. Right-click in the empty space and select "Create Document" or "New File," then choose "Empty File." Name it something descriptive followed by .desktop — for example, MyProgram.desktop.

Right-click the file you just created and select "Open With" and then choose a text editor like gedit or mousepad. Type the following structure into the file:

[Desktop Entry] Type=Application Name=Program Name Exec=/path/to/program Icon=program-icon Terminal=false

Replace "Program Name" with what you want the shortcut to be called. Replace "/path/to/program" with the actual command or full path to the program. If you do not know the path, open a terminal and type which programname (replace programname with the actual name). The terminal will show you the full path. Set Terminal=true only if the program needs to run in a terminal window. Save the file when you are done.

Making the .desktop file executable

A .desktop file will not launch until you mark it as executable. Right-click the .desktop file on your desktop and select "Properties." Click the "Permissions" tab. Check the box next to "Allow this file to be run as a program" or "Execute." Click "Close."

Now when you double-click the shortcut, it will launch the program. If nothing happens, double-check that the Exec path is correct by opening a terminal and typing the command directly to see if it works.

Creating shortcuts to documents and folders

For a document or folder, the process is similar but the .desktop file structure is different. Create a new .desktop file on your desktop as described above. Use this structure instead:

[Desktop Entry] Type=Link Name=Folder Name URL=file:///home/username/path/to/folder Icon=folder

Replace "Folder Name" with what you want to call it. Replace the URL with the actual path to your folder or document. To find the path, open the file manager, navigate to the folder, right-click it, and select "Properties." The location is shown at the top. Copy it and paste it into the URL line, adding file:// at the start. Save the file and mark it executable as described above.

Troubleshooting shortcuts that do not work

If you double-click a shortcut and nothing happens, the most common cause is an incorrect Exec path or missing executable permissions. Open a terminal and type the command from the Exec line directly to see if it works. If you get a "command not found" error, the path is wrong. Use which programname to find the correct path, then edit the .desktop file and update the Exec line.

If the shortcut has executable permissions but still does not launch, open the file with a text editor and check for typos in the [Desktop Entry] section. The section header and all field names must be spelled exactly as shown. Save the file, close it, and try again. Some programs require additional flags or options in the Exec line — check the program's documentation if a simple path does not work.

Organizing and managing desktop shortcuts

Desktop shortcuts can clutter your workspace quickly. Consider creating a folder on your desktop called "Shortcuts" and moving your .desktop files into it. You can still double-click them from inside the folder. Alternatively, you can delete shortcuts you no longer use by right-clicking them and selecting "Move to Trash."

If you want a shortcut to appear in the applications menu instead of on your desktop, place the .desktop file in ~/.local/share/applications/ instead of on your desktop. Open the file manager, press Ctrl+H to show hidden files, navigate to .local/share/applications, and paste your .desktop file there. It will appear in the applications menu after you refresh or log out and back in.

Frequently Asked Questions

Can I create a shortcut to a website?

Yes. Create a .desktop file and use Type=Link with a URL field pointing to the website, for example URL=https://www.example.com. Set Icon to a web browser icon like "firefox" or "chromium". When you click it, the website will open in your default browser.

What if the program name has spaces in it?

Spaces are fine in the Name field. In the Exec line, if the path contains spaces, wrap it in quotes: Exec="/path/to/my program". If you are unsure, use the full path from the which command and add quotes around it.

Why does my shortcut open a terminal window?

You likely set Terminal=true in the .desktop file. Change it to Terminal=false and save the file. The shortcut will now launch the program without showing a terminal window.

Can I change the icon for a shortcut?

Yes. In the .desktop file, change the Icon line to point to an icon file or icon name. You can use Icon=/path/to/icon.png for a specific file, or Icon=firefox for a named icon from your system's icon theme. Save the file and the icon will update.

Do I need to restart Linux Mint after creating a shortcut?

No. Desktop shortcuts work immediately after you mark them executable. If you place a .desktop file in the applications menu folder, you may need to log out and back in or refresh the menu for it to appear.