reltek
Posts: 20
Joined: Wed Jan 13, 2016 3:15 pm

How to create shortcut on the desktop?

Wed Jan 13, 2016 4:16 pm

On Raspbian, How do you create a shortcut on the desktop? I have a program that I wrote within a folder and I want a desktop shortcut for this program. I followed many tutorials online, but none helped so far. They all pretty much told me to create a empty text file and place the following lines in it. So, I did.

[Desktop Entry]
Type=MyProgram
Encoding=UTF-8
Name=MyProgram
Comment=MyProgram
Icon=/usr/MyProgram/MyProgram.ico
Exec=/usr/MyProgram/MyProgram
Terminal=false
Categories=Internet;

Then, they say to place this newly created file in the desktop folder. After doing that, I rebooted RasPI. Now, on the desktop I do see the icon for MyProgram but without that little black and white arrow in the corner to indicate that it is a shortcut. When I double click on the shortcut, MyProgram starts to run. However, my program is starting up as if its starting from the desktop not from within its own folder. I want to be able to click on a shortcut for my program which actually starts from within MyProgram folder. Could someone please help me or point me in the right direction.... Hopefully, this post is not too confusing... :)

reltek
Posts: 20
Joined: Wed Jan 13, 2016 3:15 pm

Re: How to create shortcut on the desktop?

Wed Jan 13, 2016 9:18 pm

:D Solved it...

In addition what I have in the file, you also need to have a working folder. Basically the following line.

path=/home/pi/MyProgram/

Now it works like a real shortcut.

It really is strange no one seem to mention it anywhere about this. I accidentally found out while I was trying different things.

JacKAsterisK
Posts: 1
Joined: Fri Feb 14, 2020 3:27 pm

Re: How to create shortcut on the desktop?

Fri Feb 14, 2020 3:29 pm

That path entry worked, thanks! Also, I had to change the type to Application in my case.

Return to “Raspbian”