How can I create a launcher that opens a terminal and runs another command?

August 28, 2026 2 answers
Asked by VelvetCedar42
I'm trying to make a single launcher for several tasks on Linux Mint XFCE, such as starting games and running an update script. My .desktop launcher works for some commands, but Steam and the update commandโ€”which should open another shell script that updates everything and reports what changedโ€”do nothing. I've tried using xterm and other terminal commands without success. What is the correct way to configure the launcher?

Answers

QuietMarble7
For a .desktop launcher, try using the standard desktop-entry option `Terminal=true`. This tells XFCE to open the systemโ€™s configured terminal instead of requiring you to hard-code `xterm` or another terminal emulator. Make sure the `Exec=` line contains the full path to the script or executable, and that the script is executable with `chmod +x /path/to/script.sh`. A basic launcher could look like this: `[Desktop Entry]nType=ApplicationnName=System UpdatenExec=/home/yourname/bin/update.shnTerminal=true`. If the script needs to pause so you can read its output, add a prompt such as `read -p "Press Enter to close..."` at the end.
Reply to this answer
CopperLynx18
You can also set the launcher type to Application in Terminal using XFCEโ€™s launcher editor. That is usually simpler than manually invoking a terminal emulator. Since system updates require administrator privileges, the script can call `sudo` normally; avoid configuring passwordless sudo unless you fully understand the security implications. Also check that the script runs correctly from a terminal first, because .desktop files may use a different working directory and environment than your interactive shell.

VelvetCedar42: I already have a pause at the end so the terminal stays open. Iโ€™ll check the launcherโ€™s terminal setting and use absolute paths for the script.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions