Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open display :0.0 #1279

Open
yltx opened this issue Aug 3, 2024 · 3 comments
Open

Cannot open display :0.0 #1279

yltx opened this issue Aug 3, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@yltx
Copy link

yltx commented Aug 3, 2024

Is your feature request related to a problem:

No response

Describe the solution you'd like:

I don't know.

Describe alternatives you've considered:

I don't know.

Additional context:

weston.log
~_AOAM9)~J38PBU30QZ1K

yltx@yltx:~$ cat /mnt/wslg/versions.txt
WSLg (x86_64): 1.0.61+Branch.main.Sha.54f177d201aecda01347f952e01777c75480fc74
Built at: Tue Apr 2 20:52:28 UTC 2024
Mariner: VERSION="2.0.20240112"
DirectX-Headers:
mesa:
pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122
FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33
weston: f227edd681479ec3cb2290a25d84d2d3462aebfa
yltx@yltx:~$ echo $DISPLAY
:0.0
yltx@yltx:~$ ls -la /tmp/.X11-unix
总计 0
drwxrwxrwt  2 root root  40  7 月 31 17:59 .
drwxrwxrwt 12 root root 240  7 月 31 20:15 ..
yltx@yltx:~$ ls -la /tmp/.X11-unix/
总计 0
drwxrwxrwt  2 root root  40  7 月 31 17:59 .
drwxrwxrwt 12 root root 240  7 月 31 20:15 ..
@yltx yltx added the enhancement New feature or request label Aug 3, 2024
@GhostScript0r
Copy link

One not directly relevant comment: This is a bug report but is posted as a feature request because the bug report template contains an error and is therefore no longer available since the last update a month ago. Please fix the template as well.

image

@yltx
Copy link
Author

yltx commented Aug 26, 2024

One not directly relevant comment: This is a bug report but is posted as a feature request because the bug report template contains an error and is therefore no longer available since the last update a month ago. Please fix the template as well.

image

In fact,you don't even have the tag for bug issue.

@ghost
Copy link

ghost commented Sep 6, 2024

ubuntu22.04的wslg是基于systemd的一个bug运行起来的,24.04使用的systemd没有这个bug了反而用不了了,可以使用wslg-links来解决这个问题。#1244

The WSLg in Ubuntu 22.04 runs on a bug related to systemd, while the systemd used in 24.04 no longer has this bug. You can use this wslg-links to resolve this issue temporary. #1244

另外, 如果你是直接安装的24.04版本,还有另一个问题 WSL/issues/468
wslg只对UID=1000的用户生效,直接安装的ubuntu24.04版本默认ubuntu用户的UID为1000(/mnt/wslg/runtime-dir权限决定),导致wsl创建的用户无法使用wslg。
可以使用回复中提到的方法,手动编辑/etc/passwd对调UID,再使用chown切换家目录的所有者。

Besides, if you're using freshly-installed ubuntu 24.04 version, there's another issue mentioned in WSL/issues/468 . You can use the method mentioned in the replies to the issue.

Maybe there is only unstable and insecure method:

manually edit /etc/passwd to swap uid
chown uid for home of swapped user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants