Cannot find wayland-0 socket under non-root user

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cannot find wayland-0 socket under non-root user

ソリューションへジャンプ
11,537件の閲覧回数
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

タグ(4)
1 解決策
11,425件の閲覧回数
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

元の投稿で解決策を見る

1 返信
11,426件の閲覧回数
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