install the ARDUINO 1.8.5 IDE on a Raspberry Pi via apt install or git clone?

hi,
How to install the ARDUINO 1.8.5 IDE on a Raspberry Pi via apt install or git clone?
(Raspbian Jessie)

Are there any disadvantages or limitations compared to the PC/Windows version?

tito-t:
via apt install

Not recommended because you will get an extremely outdated version of the Arduino IDE.

tito-t:
git clone?

You can clone the source code for the IDE and then build it, following these instructions:

It seems like a lot of trouble unless you're interested in actually modifying the IDE source code.

My recommendation is to simply download the official Linux ARM build of the latest IDE release from here:
http://www.arduino.cc/en/Main/Software
That's going to be the easiest and fastest method.

tito-t:
Are there any disadvantages or limitations compared to the PC/Windows version?

Nope.

thank you, indeed I'm not interested in a complete re-build.
apt of course had been fine, because (given that) apt update and upgrade work then as expected.

About the download: there is a tar file, but how exactly to download and to process that?
Which are the terminal commands for that?
I am just using apt install or git clone so far to install Raspi packages, no idea how to work with tar files.

wget http://downloads.arduino.cc/arduino-1.8.5-linuxarm.tar.xz
tar -x -f arduino-1.8.5-linuxarm.tar.xz

thanks again! I'll immediately start this task!

Just in case anything fails, hangs up or gets (partially) corrupted now or any time in the future:
how do I have to make a clean uninstall and purge of this package?

update:
download and unzip were ok.

IDE is starting,
blink.ino upload (AVR) and run ok !

in /home/pi now there are 2 new folders,
1st Arduino-1.8.5, and 2nd Arduino (with empty subfolder: libraries)

About my arbitrary libs:
can I just c+p my libs from my Windows portable\libraries folder into the /home/pi/Arduino/libraries folder without messing up the Windows path names then for Linux?

tito-t:
Just in case anything fails, hangs up or gets (partially) corrupted now or any time in the future:
how do I have to make a clean uninstall and purge of this package?

The commands above only download the .xz file and extract it. So to undo that you would only need to delete the downloaded file and the folder that was extracted from it. There is an installation script that comes with the Arduino IDE. The comment in that script says:

This script adds a menu item, icons and mime type for Arduino for the current

user. If possible, it will use the xdg-utils - or fall back to just creating

and copying a desktop file to the user's dir.

If called with the "-u" option, it will undo the changes.

It's not absolutely necessary to run that installation script but it looks like it does provide a way to undo any changes the script makes.

tito-t:
download and unzip were ok.

IDE is starting,
blink.ino upload (AVR) and run ok !

Glad to hear!

tito-t:
in /home/pi now there are 2 new folders,
1st Arduino-1.8.5

That's the IDE installation folder.

tito-t:
and 2nd Arduino (with empty subfolder: libraries)

That's called the sketchbook folder (File > Preferences > Sketchbook location).

tito-t:
About my arbitrary libs:
can I just c+p my libs from my Windows portable\libraries folder into the /home/pi/Arduino/libraries folder without messing up the Windows path names then for Linux?

That will be fine. There is no problem with paths. Everything is compatible with any OS.

thanks, so far everything works fine, and if there are no changes made (or needed) to system entries by just download+extract, I'll dispense with the setup.sh and keep it the way it is and start the IDE from my file manager.

I now installed also the Due core, and all is running like a charme so far, even the Arduino Serial console window.

Again, thank you very much, that really helped me a lot!

hi,
there are some issues about the Arduino settings/preferences on Jessie:

1st, the popup window for file-> preferences is too large, I can't see the lowest bottom lines and cannot even access the OK/Cancel buttons of that window (my HDMI TFT is 640x480), because there are not even scroll bars in that window,

and 2nd, I can't even see and can't find the path to preferences.txt, e.g. to adjust the start window size settings of the IDE editor window.

so my questions:
1st, why are there no vertical and horizontal window-scroll bars in the preferences pop-up window and how to fix this, and
2nd, which is the Linux path to the file preferences.txt?

tito-t:
2nd, which is the Linux path to the file preferences.txt?

/home/{username}/.arduino15 (a.k.a. ~/.arduino15)

/home/pi/arduino15 ?
there is not such a folder, just
/home/pi/arduino-1.8.5 and
/home/pi/arduino

home/pi/.arduino15

Maybe the . makes it hidden from you?

what does this dot mean? is it part of the dir name?
if so, then a dir named ".arduino15" eventually does not show up in the file manager next to /home/pi/arduino-1.8.5 and /home/pi/arduino

tito-t:
what does this dot mean? is it part of the dir name?

Yes, that's what I'm trying to tell you. Assuming the user name is "pi", the path to preferences.txt is:
home/pi/.arduino15/preferences.txt
Exactly like that.

no, sorry, I don't see a directory like that, just /home/pi/arduino-1.8.5 and /home/pi/arduino, nothing which is named similar to a arduino15 or .arduino15

View > Show Hidden

aaarrrghhh... WTF! :stuck_out_tongue_closed_eyes:
YES!!

But why in the world is that directory hidden by the Arduino developers...?!?

Anyway, the good news is: I could adjust the default editor window size, thanks a lot!

But can you please suggest to the developers
1st, to un-hide the .arduino15 folder by default (or integrate it to 1 of the other Arduino folders), and
2nd, to provide scroll-bars for the standard preferences window?

tito-t:
1st, to un-hide the .arduino15 folder by default, and

There's no way for Arduino to unhide the .arduino15 folder by default. That's the default behavior of the File Manager for any folder/file that starts with ".". You'd need to talk to the developers of File Manager about changing the default behavior. Window and I believe macOS also hide some folders by default, which I find quite annoying. Naming the .arduino15 folder this way is a standard convention. You probably noticed a lot of other hidden folders appeared after you changed that selection. So it's not as if Arduino came up with some goofy idea to make their program hard for people to use.

tito-t:
2nd, to provide scroll-bars for the standard preferences window?

The issue of File > Preferences not being friendly to low resolution displays has been brought up before and some work was done to make it work down to 800x600 resolution:

but I think 600 pixel height was decided as the smallest feasible to try to support. You'll note the comment:

in this case, we should split the preferences into two tabs (argh) or make the window scrollable (even worse).

You're welcome to open an issue report here requesting that the Preferences dialog be made scrollable:

ok, thanks for your reply.
I'am still just curious

  • why Arduino named it .arduino15 and not just arduino15
  • why making it invisible is supposed to be an advantage for Arduino users
  • why they called it arduino15 any way (what is "15" ?? and why not a folder or sub-folder called "settings" etc fot that stuff?)
  • and why not integrate the settings folder containing "preferences.txt" into either the ~/Arduino-1.8.5 folder or into the sketchbook folder however it ist named?

Of course, if you are not a developer, perhaps a developer might kindly answer and change these questions and issues 8)

tito-t:

  • why Arduino named it .arduino15 and not just arduino15

I don't have a precise answer for this other than "it's what everyone does". I'm sure with some research you'd find some answers since this is done by pretty much every Linux application.

tito-t:

  • why making it invisible is supposed to be an advantage for Arduino users

Again, it's just how things are done. 99.99% of Arduino users would never need to access that folder. Of the 0.01% that do need to access it, 99% will be advanced enough users to know how to access hidden folders.

tito-t:

  • why they called it arduino15 any way (what is "15" ??

The folder was originally named .arduino but then some major changes were made in Arduino IDE 1.5.x and so they created a new folder so that the new system would not interfere with the Arduino IDE 1.0.x installations. So the "15" stands for 1.5.

tito-t:
and why not a folder or sub-folder called "settings" etc fot that stuff?)

If it was named "settings" then how would you know which application that folder was associated with and how would they be sure it wouldn't conflict with another application that also chose such a generic folder name?

tito-t:

  • and why not integrate the settings folder containing "preferences.txt" into either the ~/Arduino-1.8.5 folder

There are security reasons why the application should not write to the application folder by default. However, if you prefer that system you can simply use the Arduino IDE in portable mode, which will cause preferences.txt and all other files that would otherwise be saved to the .arduino15 folder to instead be saved under the portable folder:
https://www.arduino.cc/en/Guide/PortableIDE

tito-t:
or into the sketchbook folder however it ist named?

Because the sketchbook folder is for the user's files and having the Arduino IDE install all it's files into that folder will only pollute it and cause confusion and troubles ("Hey, what are all these weird files in my sketchbook? I guess I'll delete them!").

tito-t:
if you are not a developer

I'm just a fellow Arduino user who tries to help people out here on the forum.

tito-t:
perhaps a developer might kindly answer and change these questions and issues 8)

With the exception of the Arduino Create forum section, Arduino employees never read the Arduino forum.

Maybe another forum member who is more knowledgeable about Linux development will comment here with some better explanation of the whys of the .arduino15 folder. Personally, I'll take the viewpoint that it is what it is and any change to it would cause way more trouble than it's worth. After years you're the only person I have every encountered that thought it was a problem.