Arduino IDE on Ubuntu 24.04

There are some well documented problems in starting the Arduino IDE in Ubuntu 24.04. I recently installed Ubuntu 20.04 on a revived PC and downloaded the Arduino IDE 2.3.3 Appimage from the Arduino website. I moved the downloaded file to a folder I keep in my home directory called Applications and changed the permissions to make it executable. Double clicking on the application failed to make it start, so, opening a terminal I entered the path to the Appimage [ ./Applications/arduino-ide_2.3.3_Linux_64bit.AppImage ] and pressed enter. This produced an error indicating a problem with a "sandbox" file.

Off to Google. I found references to the source of the problem being with AppArmor and various "fixes". The easiest solution was to run the Appimage with the --no-sandbox option at the end of the command (i.e. ./Applications/arduino-ide_2.3.3_Linux_64bit.AppImage --no-sandbox ) which was frowned upon for security reasons, but I also found a solution involving creating an AppArmor profile for Arduino as follows:

1. Open a text editor (Kate in my case) and enter the following:

abi <abi/4.0>,
include <tunables/global>
profile arduino /home/robert/Applications/arduino-ide_2.3.3_Linux_64bit.AppImage flags=(unconfined) {
  userns,
  include if exists <local/arduino>
}

Change the path after "profile arduino" to match the location of your Appimage.

2. Save the file to the /etc/apparmor.d directory - I called mine arduino233. Kate prompts for the sudo password to save it in that location.

3. Restart AppArmor with sudo service apparmor reload.

4. Now, double-clicking the Appimage successfully starts the Arduino IDE.

Check out the range of Arduino clone boards at the Bitsbox microcontroller section.