When I create an xdg-desktop file with Terminal=true, this has the effect of:

  • launching a new terminal window
  • running the command in that terminal (from Exec=command)

What is the equivalent CLI invocation?

(I tried nohup command >/dev/null 2>&1 & but this is not equivalent for commands that actually run in the terminal.)


The closest command-line equivalent is to invoke the terminal emulator from the command line with the appropriate arguments to have it run the specified command.

For most terminal emulators, this ends up looking like this:

terminal --command='<some command>'

Certain terminal emulators (such as Xterm) don't need the argument, you just pass the command as if you're invoking it via a wrapper script, some others require a different option to specify the command.

Depending on your terminal emulator and desktop environment, the above may not exactly replicate Terminal=true, but it is generally the closest you can get.

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.