I am having an issue with the AppImage. When I attempt to run it as a normal user I have permissions issues uploading the sketch and the debugger fails to connect for the same reason.
When I attempt to run the image with sudo and the --no-sandbox flag I get an issue stating
[user@box arduino-ide_2.3.2_Linux_64bit]$ sudo ./arduino-ide --no-sandbox
Arduino IDE 2.3.2
Checking for frontend application configuration customizations. Module path: /home/user/Downloads/arduino-ide_2.3.2_Linux_64bit/resources/app/lib/backend/electron-main.js, destination 'package.json': /home/pnhearer/Downloads/arduino-ide_2.3.2_Linux_64bit/resources/app/package.json
[16849:0824/154234.117876:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[16849:0824/154234.117914:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
Segmentation fault
So it seems the issue is the missing variable, but I have validated that it is there. and I don't get this XServer error when running normally only under sudo. I will not that xwayland is enabled. Thanks in advance
Hi @pnhearer.
It is a bad idea. sudo
should only be used for specific administrative actions. You should never run an application with sudo
. Beyond the security risk of giving an application persistent superuser permissions during normal everyday usage, it is also going to cause a lot of problems with the application functionality because you are now using it as the root user instead of as your normal user account.
So instead of wasting time on a hacky workaround, focus your efforts on solving the root problem:
Please tell us which specific boards you are having the upload problems with.
Please also tell us about your debugger setup. Do you have external debug probe hardware connected between your computer and the board, or are you using a board that has an internal or on-board debug probe?
The board i have is from the Opla IOT kit. It's the wifi 1010 board.
The debugger is simply what is default in the IDE.
I'm a little perplexed by the statment of wasting time fighting alterior problems but maybe I am missing something. If my problem seems to be a permissions issue for the app, the next logical step for me would be to attempt priv escalation for the app to give it the tty access it needs but I am here asking help so clearly I havent found a solution yet.
Nope. You should instead configure your normal user account so that it has the specific privileges that are needed rather than giving the app the keys to the castle.
In order for the Arduino development software to upload to the Arduino board, your Linux user account must have write permission for that device.
Standard user accounts don't have this permission by default. This error can occur when you attempt an upload without the necessary permissions. So it is necessary to configure your system to allow the upload. This is done by creating a special file.
I'll provide instructions you can follow to create that udev rules file:
- Open a command line terminal.
- Type the following command:
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"' | sudo tee --append /etc/udev/rules.d/60-arduino.rules && sudo udevadm trigger && sudo udevadm control --reload-rules
- Press the Enter key.
- If prompted for it, enter your Linux account password and press the Enter key.
The command should complete successfully. Now try uploading again. Hopefully the error will no longer occur.
Since the MKR WiFi 1010 board doesn't have any internal or on-board debug probe, you would need to obtain an exrternal hardware debug probe before you could use the Arduino IDE 2.x integrated sketch debugger with this board. You can learn about that here:
https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-debugger
As an alternative to the debugger, you can take the traditional approach and add strategic Serial.print
calls in your code, then use the Arduino IDE Serial Monitor to get an idea of what is happening in your program.