xhost: unable to open display ":0.0"

简介: -bash: xhost: 未找到命令原因是因未没有安装相关的包(其他类似command not found命令没有可以用这种方式解决)yum whatprovides "*/xhost" 安装对应版本

[root@lepus client]# DISPLAY=:0.0
[root@lepus client]# export DISPLAY
[root@lepus client]# xhost +
xhost: unable to open display ":0.0"

yum search tigervnc-server
yum -y install tigervnc-server.x86_64
vncserver
New 'lepus:1 (root)' desktop is lepus:1

再次执行,可以
[root@lepus ~]# DISPLAY=lepus:1
[root@lepus ~]# export DISPLAY
[root@lepus ~]# xhost +
access control disabled, clients can connect from any host

目录
相关文章
|
6月前
|
存储 Android开发
/storage/emulated/0/bluetooth/Screenshot.competeordersb.png: open failed: EACCES (Permission denied)
/storage/emulated/0/bluetooth/Screenshot.competeordersb.png: open failed: EACCES (Permission denied)
116 1
|
网络协议
VFS: Cannot open root device "nfs" or unknown-block(0,255)错误解决
VFS: Cannot open root device "nfs" or unknown-block(0,255)错误解决
522 0
|
存储 运维 Java
Unable to open socket file: target process not responding or HotSpot VM not loaded
在说问题之前,还是那句话,linux 系统一切皆文件。之所以这个错误,那肯定是某些文件有问题。经过查阅相关资料了解到如下: 1.java进程在启动时,在%TEMP%/hsperfdata_%USERNAME%路径下创建进程的临时文件。 %TEMP% 在windows系统中表示 windows的临时目录。一般在C:\Users\用户名\AppData\Local\Temp %TEMP% 在linux 系统中,一般在/tmp目录下
6095 0
|
NoSQL MongoDB 数据安全/隐私保护
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
1110 0
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
|
Ubuntu
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
172 0