![在 Linux 中运行 startx 时出现错误](https://linux22.com/image/1281288/%E5%9C%A8%20Linux%20%E4%B8%AD%E8%BF%90%E8%A1%8C%20startx%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF.png)
当我尝试使用命令运行 Xserver 时,startx
出现下面提到的错误
xauth: creating new authority file /oracle/oracle10g/.serverauth.22555
Fatal server error:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
giving up.
xinit: unable to connect to X server
xinit: No such process (errno 3): unexpected signal 2.
Couldnt get a file descriptor referring to the console
我该如何纠正这个问题?
答案1
您是否将 DISPLAY 环境变量设置为 DISPLAY=localhost:0.0 之类的值?您是 root 用户吗?如果您是 root 用户并以普通用户身份登录,则无法启动 X
答案2
如果已经有另一个 X 会话正在运行,则必须在不同的显示器编号上运行您的会话。尝试以下操作:
startx -- :5
(此处“5”可以是任何未使用的数字。)