Being a newbee with Ubuntu, I still struggle quite a lot with setting up desktop icons to my apps. I am currently trying to setup a desktop icon to Arduino IDE and I don't know enough to properly set it up. Here's the current setup.
I have installed Arduino-1.6.7 in a folder by that name in my home folder. At present, the only way I can run it is to go to the terminal, CD to the
Arduino-1.6.7 folder and then run it with $ ./arduino. This works but obviously, I would rather run it with a simple icon.
I have tried to use this method, but when I browse to /usr/share/applications, there is no icon for Arduino.
Thank you for being part of the village that raises this idiot.
Best Answer
Ubuntu has something called a
.desktop
file, which acts as a shortcut to whichever app you want. You can specify an icon you want, the name of the shortcut, the description that appears when you hover over the shortcut, and a lot of other stuff. It's not the easiest setup, but it's not hard, either. Here's how to do it.gedit ~/Desktop/Arduino.desktop
.In the text editor window that opens, paste this:
Edit the
Exec
,Path
, andIcon
fields to point to the appropriate locations.Save the file and close Gedit.
Now, go to your Desktop folder and test the shortcut bu double-clicking it. If it works, you can drag the icon to your launcher to have it there, as well.
NOTES:
You may get a warning when you try to use the
.desktop
file, telling you it is not trusted, or something similar. If you see this, right click on the file, go toProperties >> Permissions
and check the box that says something likeAllow executing file as program
. The warning will be gone.Remember to use absolute paths in the desktop file. Don't use relative paths. An example of an absolute path is
/home/username/arduino-1.6.7/
. A relative path is something like~/arduino-1.6.7
(the~/
points to your user folder) or./arduino-1.6.7
(./
means whatever folder you're currently in, which would be the Desktop in this case).If you need any help, comment.