Cannot find wayland-0 socket under non-root user

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot find wayland-0 socket under non-root user

Jump to solution
11,393 Views
pgentili
Contributor III

Hi,

I'm trying to launch a GUI application on my system (iMX8MM, Yocto Sumo) without root permissions.

When I login with my non-root user I have this situation:

  • XDG_RUNTIME_DIR = /run/user/1000
  • wayland-0 does not exists inside /run/user/1000
  • When I try to open any gui aplication I get: failed to connect to Wayland display: No such file or directory
    failed to create display: No such file or directory

The only way I've found to make it work is to chmod /run/user/0 and /run/user/0/wayland-0 and then set XDG_RUNTIME_DIR to /run/user/0. The problem is that the wayland-0 under /run/user/0 is not created until a user login (or at least it seems like that) so I cannot write a systemd service to chmod the directory and the file.

I don't think it is supposed to work this way, what do you think? How should I do it?

Thanks

Paolo Gentili

1 Solution
11,281 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Paolo,

  There is no better way to solve it,  we will have to change it manually. See these 2 links, please!

1.Weston on RPi: running as non-root 

--Non-root user doesn't have permission to connect to Wayland socket.

2. [SPEC-546] Run weston with dedicated 'display' user and group - Automotive Linux 

It is also a kind of way to add user to display group.

Hope above information is helpful to you!

Have a great day!

B.R,

Weidong

View solution in original post

1 Reply
11,282 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Paolo,

  There is no better way to solve it,  we will have to change it manually. See these 2 links, please!

1.Weston on RPi: running as non-root 

--Non-root user doesn't have permission to connect to Wayland socket.

2. [SPEC-546] Run weston with dedicated 'display' user and group - Automotive Linux 

It is also a kind of way to add user to display group.

Hope above information is helpful to you!

Have a great day!

B.R,

Weidong