How to Create Custom Desktop Shortcuts with Cinnamon Desktop on Linux Mint
Categories:
4 minute read
Linux Mint, known for its user-friendly experience, offers the Cinnamon desktop environment as one of its most popular choices. Cinnamon is designed to be intuitive and easy to use, making it ideal for both beginners and advanced users. One useful feature of Cinnamon is the ability to create custom desktop shortcuts, also known as launchers. These shortcuts provide quick access to applications, scripts, and files, improving efficiency and workflow.
In this guide, we will explore different methods to create and customize desktop shortcuts on Linux Mint using the Cinnamon desktop environment.
Understanding Cinnamon Desktop Shortcuts
A desktop shortcut in Cinnamon is essentially a .desktop file, a small configuration file that contains metadata about an application, script, or command. These files are typically stored in ~/.local/share/applications/ for user-specific shortcuts or /usr/share/applications/ for system-wide shortcuts.
Each .desktop file follows a standard format defined by the
Desktop Entry Specification, which includes:
- Name: The display name of the shortcut
- Exec: The command to execute when clicked
- Icon: The icon displayed for the shortcut
- Terminal: Whether to run the application in a terminal
- Type: Defines the shortcut type (e.g., Application, Link, or Directory)
- Categories: Specifies the menu category in which the application appears
Now, let’s dive into the step-by-step process of creating custom desktop shortcuts.
Method 1: Creating a Desktop Shortcut via GUI
If you prefer a graphical approach, Cinnamon provides a built-in way to create and manage desktop shortcuts.
Steps
Right-click on the Desktop
- Select Create a new launcher here from the context menu.
Fill in the Launcher Details
- Name: Enter the name for your shortcut (e.g., “My App”).
- Command: Click on Browse or manually enter the command for the application or script.
- Comment: Add an optional description.
- Icon: Click on the icon button to select a custom icon.
- Run in Terminal: Check this if the application requires a terminal.
Click OK to create the launcher.
- Cinnamon will create a
.desktopfile in~/Desktop/. - If you see a warning about an untrusted application, right-click the new shortcut, go to Properties > Permissions, and check Allow executing file as a program.
- Cinnamon will create a
Method 2: Manually Creating a .desktop File
For more control, you can manually create a .desktop file using a text editor.
Steps
Open a Terminal and Navigate to the Desktop
cd ~/DesktopCreate a New
.desktopFiletouch myapp.desktopEdit the File Using a Text Editor
nano myapp.desktopAdd the following content:
[Desktop Entry] Version=1.0 Type=Application Name=My App Exec=/path/to/executable Icon=/path/to/icon.png Terminal=false Categories=Utility;- Replace
/path/to/executablewith the actual command or script. - Replace
/path/to/icon.pngwith the path to an icon file.
- Replace
Save the File and Exit
- In
nano, pressCTRL + X, thenY, andEnterto save.
- In
Make the Shortcut Executable
chmod +x myapp.desktopTest the Shortcut
- Double-click the shortcut on the desktop.
- If prompted, select “Trust and Launch.”
Method 3: Creating a System-Wide Shortcut
If you want your shortcut to be available system-wide, store it in /usr/share/applications/.
Steps
Create a
.desktopFile in**/usr/share/applications/**sudo nano /usr/share/applications/myapp.desktopAdd the Shortcut Configuration
[Desktop Entry] Version=1.0 Type=Application Name=My App Exec=/path/to/executable Icon=/path/to/icon.png Terminal=false Categories=Utility;Save and Exit
Update System Menus
sudo update-desktop-databaseFind Your App in the Start Menu
- Open the Cinnamon menu and search for “My App.”
- If needed, drag it to the desktop or panel for quick access.
Customizing Desktop Shortcuts
Changing Icons
- Right-click the
.desktopfile. - Select Properties > Icon and choose a new icon.
Running Scripts with Shortcuts
If launching a script, use:
Exec=bash -c "gnome-terminal -- /path/to/script.sh"
Ensure the script is executable:
chmod +x /path/to/script.sh
Adding Environment Variables
For applications requiring environment variables:
Exec=env VAR_NAME=value /path/to/executable
Troubleshooting Common Issues
Shortcut Won’t Launch
Ensure the file has execution permissions (
chmod +x filename.desktop).Check the
Execpath for typos.Verify the
.desktopfile syntax using:desktop-file-validate myapp.desktop
Missing Icons
- Ensure the icon file exists at the specified path.
- Use an absolute path instead of a relative one.
Application Opens in a Terminal Unnecessarily
- Set
Terminal=falsein the.desktopfile.
Conclusion
Creating custom desktop shortcuts in Linux Mint with the Cinnamon desktop environment is a simple yet powerful way to enhance usability. Whether using the GUI, manually crafting .desktop files, or creating system-wide launchers, these methods allow for a highly personalized experience. With a little customization, you can streamline your workflow and access your favorite applications and scripts with ease.
If you found this guide helpful, feel free to share it with fellow Linux Mint users and explore more customization options available in Cinnamon!
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.