52

My question is simple. Is there any fast and easy way of creating .desktop files for shortcuts?

For example, I think you can right click and create .desktop shortcuts in Linux Mint.

I already know how to create them from a text editor like this:

[Desktop Entry] Type=Application 
Name=Eclipse Comment=Eclipse IDE
Icon=/home/jahedev/dev/eclipse-std/icon.png
Exec=/home/jahedev/dev/eclipse-std/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
Name[en_US]=Eclipse

So are there any GUI apps that can do this?

2

5 Answers 5

33

Have a look at my project, Arronax:

launcher creation dialog

It's available as a plugin for Nautilus and as a standalone application.

To install, open a terminal and type:

sudo add-apt-repository ppa:diesch/stable 
sudo apt-get update
sudo apt-get install arronax
nautilus -q
3
  • How do I install this? I couldn't figure out the PPA stuff, and when I download the tarball all I get is a bunch of python files with no explanation.
    – Jack M
    Apr 16, 2018 at 21:34
  • That's the most comprehensive GUI I've seen around there, thanks! (supports categories, MIME types, etc.)
    – Attila
    Dec 24, 2022 at 2:21
  • FYI - As of now, the PPA hasn't been updated to work with any Ubuntu newer than 22.10. Installing onto 23.10 from the .debs on his page throws Python errors.
    – Cliff
    Dec 29, 2023 at 4:19
23

You can try alacarte (Main Menu):

Alacarte is an easy-to-use menu editor for GNOME that can add and edit new entries and menus. It works with the freedesktop.org menu specification and should work with any desktop environment that uses the spec.

By default, is not installed. From terminal, you can install it using the following command:

sudo apt-get install alacarte
2
  • 1
    This does not appear to be an application for creating .desktop files.
    – Jack M
    Apr 16, 2018 at 21:41
  • @JackM - It seems Alacarte does create .desktop files, namely in ~/.local/share/applications, only with odd names like alacarte-made.desktop, alacarte-made1.desktop, alacarte-made2.desktop etc, as stated in a comment under this answer.
    – cipricus
    May 14, 2019 at 8:55
17

On Ubuntu 12.04 or 14.04 there's gnome-desktop-item-edit which comes as part of the gnome-panel package:

enter image description here

You could integrate this into your file manager with the following script:

#!/bin/bash

gnome-desktop-item-edit --create-new ~/.local/share/applications

Generic installation instructions for Nautilus scripts: How can I install a Nautilus script?

11

For the Xfce desktop environment there is exo-desktop-item-edit, it works similar to it's Gnome counterpart:

exo-desktop-item-edit --create-new ~/.local/share/applications

Screenshot

1
1

For those looking for a minimalistic option, you can take a look at desktop-entry-creator that I created.

s

On Ubuntu you can install it by first installing the dependencies:

sudo apt install python3-dev libcairo2 libcairo-dev python3-cairo libgirepository-1.0-1 libgirepository1.0-dev libcairo-gobject2

and then install the app from PyPI using pip (or your favourite tool):

python3 -m pip install --user desktop-entry-creator

For the first time you can launch it from the CLI by running:

desktop-entry-creator

and for future runs, you can create a desktop file for it from within itself!

You must log in to answer this question.