How to create a desktop short cut Ubuntu use a custom command

i want to create a desktop shortcut that execute a command Line example:

/home/Xerty/document/wine executable.exe

How I can do that ?

0

1 Answer

Not hard. Create a file on your desktop (most likely ~/Desktop) that looks like this. I'll pretend the script is named shortcut-demo and it is in ~/Desktop.

/usr/bin/env bash
/home/Xerty/document/wine executable.exe

Open a terminal and run chmod +x ~/Desktop/shortcut-demo. This makes it executable (so you can run it), the /usr/bin/env bash means it is a Bash script (TBH simple sh would work fine, but I like Bash). The line after that is the command you want to run. You can have multiple commands there.

Note: specify the full path to executable.exe (i.e., /home/cocomac/Downloads/something/executable.exe instead of executable.exe)

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like