I cant run arduino on wayland?

as the topic says i cant run arduino-ide as root on wayland it shows me this error

/usr/bin/arduino-ide: line 3: [: =: unary operator expected
Arduino IDE 2.3.3
Skipping frontend application configuration customizations. Running in dev mode.
Starting backend process. PID: 62038
Authorization required, but no authorization protocol specified

[62021:0929/134622.568337:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[62021:0929/134622.568396:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
[1]    62018 segmentation fault  sudo arduino-ide --no-sandbox

and when i run arduino without root it cant upload my codes

void setup() {
  printf("test");
}

void loop() {
  printf("hello world");
}

my simple code for testing arduino if it works or not i pressed reset button but it shows this error

Sketch uses 1948 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 33 bytes (1%) of dynamic memory, leaving 2015 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied

and if i somehow get the port to work it says that stk500 cant sync and programmer is not responding

About my system, So im running Arch linux x86_64 on Hyprland

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

the error i was talking about

Did you make yourself a member of the group. I think that on Arch it is uucp; check with ls -l /dev/ttyUSB0.

There should be no need to run the IDE as root.

Which board do you have? Which board are you compiling for?

1 Like