2

Is somehow possible to run a "Desktop Entry" from another "Desktop Entry"?

Searching inside the freedesktop Desktop Entry Specification the answer seems "No".

What I want to do is to create a single "Desktop Entry" name "WorkStack" so that when it's called, it opens all the Application stack I use to work.

I know I could just refer to the applications in the stack with the bash executable location, but I would like to refer to them with the "Desktop Entry"

1

You may use dex. It is a Python program meant to "generate and execute DesktopEntry files of the Application type" (quoting its manual).

Just put in your custom desktop entry a key along the lines of:

Exec=dex /path/to/application1.desktop /path/to/application2.desktop ...

(You may then be required to run update-desktop-database from desktop-file-utils, or some equivalent utility provided by your desktop environment, to have your custom desktop entry show up in menus and other places).

Note that, as far as I can tell, while your desktop environment's application launcher may allow you to open a file or URL by typing application-name /path/to/file, dex doesn't allow for arguments to be passed to desktop entries from the command line.

As an alternative to dex, you may be able to use some command line utility provided by your desktop environment (e.g. gtk-launch) as discussed, for instance, in this answer on U&L and some of the answers to this question on Ask Ubuntu.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.