0

I have an app in /usr/local/AppDir/ called App. I start this app from within the /usr/local/AppDir with the following command.

sudo ./App

How can I create a desktop shortcut that starts this app?

2 Answers2

1

Use a *.desktop file. Look into it's documentation or at this answer. For Exec= use your path /usr/local/AppDir/App and if you need sudo, do something like gksudo /usr/local/AppDir/App. gksudo asks for the sudo passphrase in a graphical Window.

0

Make a text file on your desktop with name app.desktop or something_you_like.desktop and add following data to it.

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=sudo /usr/local/AppDir/App
Name=App
Comment=comment here
Icon=icon path here

Save the file and add make it executable by executing following command in terminal :

cd Desktop
chmod +x app.desktop