Cant make a gui icon to start a terminal command

I want to make a link on my desktop that just executes a simple Linux command. When I search the internet all I find are ways to start a GUI interface from within a shell.

Is there a tool to make such a link?

2

2 Answers

put this in a file and fill it out

#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=comand_to_run
Icon=/path/to/icon
Name=name
Type=Application

In standard Ubuntu, such graphical tool is not available. However, you can install and use Alacarte to edit and create new items in the application overview without the need to create or edit the corresponding .desktop files yourself. Search for "alacarte" or "main menu" in the activities overview to find and launch the tool.

That tool will create the launcher in your .local/share/applications menu.

  • Copy the corresponding file over to your desktop to have it on the desktop.

or

  • Move it over to the desktop to have it removed from the application overview.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like