xrandr,Can't open display
时间: 2024-06-04 20:08:22 浏览: 646
无法显示打开的窗口
The error message "Can't open display" usually means that the X11 server is not running or is not accessible. X11 is the graphical environment used by most Linux systems.
To resolve the issue, you may need to start the X11 server or set the DISPLAY environment variable correctly. Here are a few things you can try:
1. Check if the X11 server is running by running the "ps aux | grep Xorg" command. If it's not running, start it with the "startx" command.
2. Make sure you have permission to access the X11 server. You can try running "xhost +" to allow all users to connect to the X11 server.
3. Set the DISPLAY environment variable to the correct value. For example, if you're trying to run xrandr on a remote server, you'll need to set DISPLAY to the IP address of the machine you're connecting from, followed by ":0". Like this: export DISPLAY=192.168.1.100:0
Hopefully one of these solutions will help you fix the "Can't open display" error.
阅读全文