Ubuntu – how to permanantly install arduino ide 1.6.5

arduinosoftware installation

I downloaded the zip file arduino-nightly-linux32.tar.xz from here to my desktop.(YOU MAY NEED 64-bit. Ask your computer what it is: 32-bit or 64-bit):

I double clicked the arduino-nightly-linux.tar.xz icon and it opened a window that showed the .tar.xz file. I clicked the the extract button at the top of the window and extracted the contents of the arduino-nightly-linux.tar.xz archive to my desktop.

Once it was extracted, I could see and open the folder on my desktop (with all my other stuff), but could not run Arduino from there. I opened a terminal (Crtl+Alt+T)…

Note: capitalization matters in the terminal and depends on what YOUR machine calls the files/locations you are using…

I typed: cd Desktop and it gave me this prompt: jay@jay:~/Desktop$

I Typed on the line after the $ ls -- I click Enter and it LISTED every file and folder on my desktop.

I could see Arduino-nightly in the list (it was blue for some reason). If you DON'T see it in the list, you are in the WRONG directory and you need to "cd" to the directory it IS IN.

then I typed on the line after Desktop$ cd Arduino-nightly and it gave me this:

jay@jay:~/Desktop/arduino-nightly$

after the $ on that line, I typed ./arduino

but after doing steps mentioned above I programmed my arduino once after that I closed the application and now I cannot find it. each time when I want to open the arduino application I have to give command in terminal. how to permanantly install it?

Best Answer

Why not just install from the repositories?

sudo apt-get install arduino

Otherwise download the package, then in the directory of the download:

tar -xf arduino-1.6.5-r5-linux64.tar.xz
cd arduino-1.6.5-r5/
./arduino

To install it permamently (sort of) copy the contents of "arduino-1.6.5-r5" directory to somewhere (maybe $HOME/arduino") and then copy the arduino.desktop file into $HOME/.local/share/application, edit it to contain the right pathes and you have it installed for your user "permanently".

#/usr/bin/env bash
# set variables for download
URL=https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
DOWNLOAD="$HOME/Downloads/arduino-nightly.tar.xz"

# download file via wget from $URL to $DOWNLOAD
wget "$URL" -O "$DOWNLOAD"

# extract file to $HOME directory
tar xf "$DOWNLOAD" -C "$HOME"
# use sed to modify the provided arduino.desktop 
# file and redirect the result into $HOME/.local.share/applications
# to be able to start from dash
# sed's replace command s/searchpattern/replacepattern/
# the slashes are replaced by '#' to not need to escape slashes in path
# replace placeholder "FULL_PATH" with install directory 
sed "s#FULL_PATH#$HOME/arduino-nightly#" "$HOME/arduino-nightly/arduino.desktop" >"$HOME/.local/share/applications/arduino.desktop"

The script downloads the latest nightly build (website states hourly), extracts it to $HOME/arduino-nightly (that folder is in the tar, so I just used that) and copies the desktop file while modifying it. After logoff and logon you should be able to start it via the dash normally.

Related Question