IDE 2.3.6 won't run on xubuntu 4.18 linux 24.04.3 LTS

Hi There,

After about 7 hours, I decided to post to the forum. Today I decided it would be a good time to get IDE2+ running on my machine, as I am now retired and looking forward to some new projects. I also have 1.8.19 on here, and it works…though slowly now as regards board and library updates.

First I downloaded the AppImage, followed the instructions to make executable, and update Fuse. Double clicked the file and nothing happens. Checked permissions with >ls -l to verify executable. Search issues. Decided update a running 2.1.x on my laptop, no problem with 2.3.6, except it was manual update, but the AppImage runs.

Back to the desktop, kept searching, many sites, (and a few rabbit holes) later…deleted the AppImage and re-downloaded, followed the instructions again, nothing. Downloaded and extracted the .zip to a home sub-folder, assured executable on the arduino ide file, double clicked, nothing.

Somewhere near the end of the instruction for the AppImage, it says be sure you run the install.sh, well, I have yet to find that?

Searched some more, and got nowhere. Hence a post!

This is obviously a wall within my desktop, but I can’t get over it!

Any ideas?

Thanks, fab

Hi @fabelizer.

I'm going to ask you to provide some additional information that might help us to identify the problem.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Close all Arduino IDE windows if the IDE is already running.
  2. Open a command line terminal in the folder that contains the AppImage file.
  3. Type the following command in the terminal window:
    ./arduino-ide_<version>_Linux_64bit.AppImage
    
    (where <version> is the Arduino IDE version number)
  4. Press the Enter key.
    Debug output should now be printed to the terminal window as Arduino IDE fails to start.
  5. Use the mouse to select all the text in the terminal window. Make sure to scroll all the way up to the top.
  6. Press the Ctrl+Shift+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  7. Open a reply here on this forum topic by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  9. Press the Ctrl+V keyboard shortcut.
    This will paste the output into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to publish the post.

Please let us know if you have any questions or problems while following those instructions.

I think you must mean post_install.sh, not "install.sh":

https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/#linux

Make sure you've run the post_install.sh script to set the correct udev rules. You can find full instructions and download links in our Help Center article on fixing udev rules.

This statement is unfortunately quite vague. However, if you click the provided link you will find instructions for running that script.

But that is a "red herring". Running this script is necessary in the case where uploads are failing. It is exclusively involved in configuring the necessary write permissions for the ports of Arduino boards. It can not help with the problem you are experiencing of Arduino IDE not starting.

I just installed xubuntu 24.04.3LTS and decided to give IDE2.3.6 a try. It failed as @fabelizer noticed. I tried the procedure suggested by @ptillisch and got the following.

 ./arduino-ide_2.3.6_Linux_64bit.AppImage
[38541:0817/104505.758777:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_arduinRqEjxA/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)

I have no clue what all of this means. I'll stay with the legacy IDE as it still works for me.

Hi @oldcurmudgeon. This happens when xubuntu's AppArmor security software blocks the Arduino IDE application from starting.

There is some valuable discussion on this subject here:

In that thread, multiple solutions are described by an Arduino community member:

Create AppArmor Policy

https://github.com/arduino/arduino-ide/issues/2429#:~:text=file)%2C%20you%20can-,create%20an%20AppArmor%20profile,-with%20a%20configuration

You can also create a new AppArmor profile for the Arduino IDE (that allows a non-root user to use the sandboxing in a specific application). If you copy the AppImage file to /usr/local/bin/arduino (this is the new name of the AppImage file), you can create an AppArmor profile with a configuration file, for example, in /etc/apparmor.d/usr.local.bin.arduino, containing:

abi <abi/4.0>,
include <tunables/global>
profile arduino /usr/local/bin/arduino flags=(unconfined) {
  userns,
  include if exists <local/arduino>
}

and reloading all AppArmor profiles with:

sudo service apparmor reload

Now you can run the Arduino IDE without the sandboxing error.

I have verified that the AppArmor policy approach does fix the problem.

Unfortunately since I am not knowledgeable in this area and the AppArmor documentation is absolutely horrendous. For this reason, despite my best efforts, I was not able to effectively analyze the policy provided by the community member. So I can't officially endorse the installation of that policy. However, I don't have any reason to believe it is flawed or dangerous, and I am using it on my own Ubuntu 24.04 machine.

Start IDE With --no-sandbox Flag

https://github.com/arduino/arduino-ide/issues/2429#:~:text=run%20the%20Arduino%20IDE%20with%20the%20--no-sandbox%20option

You could also run the Arduino IDE with the --no-sandbox option, but that is, in my opinion, a potentially very bad idea.

There is more information on the use of the flag here:

https://www.electronjs.org/docs/latest/tutorial/sandbox#disabling-chromiums-sandbox-testing-only

You can also disable Chromium's sandbox entirely with the --no-sandbox CLI flag, which will disable the sandbox for all processes (including utility processes). We highly recommend that you only use this flag for testing purposes, and never in production.

(Arduino IDE 2.x is built on the open source Electron application framework, and inherits the --no-sandbox flag from the framework)


I suspect that this is also the cause of @fabelizer's problem. However, I would recommend @fabelizer verify my suspicion by checking their terminal output before spending any time on pursuing the possible solution I described above on their own system.

I went through the rather tedious process outlined here and now have the IDE working. I can compile some of the examples, so that part is working. Next I'll try uploading and see how that goes.

Thank you @ptillisch.

./arduino-ide_2.3.6_Linux_64bit.AppImage
[10638:0818/163201.769970:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_arduinupNyjs/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)

Yes, I probably did mean the post_install.sh, My machine seems to have the sandbox issue as well.

-fab

OK, it does indeed appear that the problem is caused by AppArmor blocking Arduino IDE from starting. So just create the AppArmor policy as I described in my previous reply and the problem should be solved.

There is something that should be noted. In this line of the provided policy:

the /usr/local/bin/arduino part is the path where the Arduino IDE executable happened to be located on the computer of the person who wrote that. So you should adjust this line to the path of the file on your own computer. That includes the filename. The person who wrote the policy had an executable named arduino (maybe because they made a symlink for convenience?). Your executable is named arduino-ide_2.3.6_Linux_64bit.AppImage and you must use the filename as it is on your system in the path on that line.

EDIT: I missed a / after the ~ in the command - corrected below.

I had the AppImage in my Downloads so I did sudo cp ~/Downloads/arduino-ide_2.3.6_Linux_64bit.AppImage /usr/local/bin/arduino
and then continued on.

For the config file I copied the lines into a local file then did
sudo cp [local file name] /etc/apparmor.d/usr.local.bin.arduino

I did say it was tedious :grinning_face:.

OK…I tried and failed! I think I am in information overload today, and will try again tomorrow!

I really do appreciate all the help thus far, and I am confident I will get this running, however, this whole process is crazy hard compared to the old days!!

@oldcurmudgeon I see you named the copied program into a file named arduino, so for the ‘[local file name]’ I believe you are saying to use whatever name you made the working local file copy of the apparmor.d file?

When I tried this, I think I needed to just use the path to the apparmor.d file I had already made (that also didn’t work), as I used the name I named the actual program (i.e.; arduino2.3.6) That is likely my downfall, as both files, (the copied versions) were created, but I renamed the rules file to my ‘arduino2.3.6’ name. I deleted everything but the original download and unzipped directory, and will try again tomorrow.

I had no idea retirement would be sooo busy!

-fab

It is perfectly fine if you want to do that, but it is also completely unnecessary.

I think that is the best way to do it. This allows you to use your text editor of choice to create the policy file, which might be difficult to do if you tried to save directly into the /etc/apparmor.d folder, where your normal user account does not have write permissions.

You can name the policy file anything you like. It is perfectly fine to name it arduino2.3.6.

I wasn't sure how important the locations and names were, so I tried to make it exactly like the write up. Also I missed a / after the ~ in the command - it should be sudo cp ~/Downloads/arduino-ide_2.3.6_Linux_64bit.AppImage /usr/local/bin/arduino

If you are using a RP Pico you need to run the post install process here
https://support.arduino.cc/hc/en-us/articles/9005041052444-Fix-udev-rules-on-Linux#mbed-os
The description is a bit misleading since it has nothing to do with mbed - it sets up the USB configuration for the processors supported by mbed. I needed to run it to use the @earlephilhower FreeRTOS version.

WOO-HOO! Finally I have a new IDE environment. I have not tried to do anything with it yet, but at least it opens from my user!

I really want to say how grateful I am that @oldcurmudgeon and @ptillisch did not give up on me! I am pretty certain all my previous attempts were pathing errors and/or typos. It was quite the endeavor to get this thing running, but so gratifying to finally have it done!

Kudos!

-fab

Great news! I'm glad it is working now.

Regards, Per

Yes indeed! And, I have messed around with an ESP32, and I can upload, use the serial monitor, updated boards and libraries. So now I just need to learn to program!!:laughing:

Many Thanks!

-fab

Glad you have things working. It was also an interesting exercise for me. I may try this version for a while. I have been avoiding earlier 2.x versions because of incompatibilities with 1.8.19.

Come back if you need programming help.