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

目录
相关文章
|
5月前
|
Java
Unable to find @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest
Unable to find @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest
82 0
|
8月前
|
存储 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)
169 1
|
8月前
|
前端开发 Java 微服务
Unable to find GatewayFilterFactory with name TokenRelay
Unable to find GatewayFilterFactory with name TokenRelay
|
存储 运维 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目录下
6493 0
编译mate-control-center:error: required directory ./help does not exist
编译mate-control-center:error: required directory ./help does not exist
107 0
|
Ubuntu
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
187 0