45

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?

27

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
| improve this answer | |
  • 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 '18 at 21:34
16

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
| improve this answer | |
  • 1
    This does not appear to be an application for creating .desktop files. – Jack M Apr 16 '18 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 '19 at 8:55
15

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?

| improve this answer | |
6

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

| improve this answer | |
0

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!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy