linux下xhost命令报错:unable to open display的解决办法

   linux下执行xhost命令报错:unable to open display,解决方法,linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”

  linux下的操作步骤如下:

  1、复制代码:

  复制内容到剪贴板

  [root@localhost ~]# vncserver

  New 'localhost:1 (root)' desktop is localhost:1

  Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/localhost:1.log

  [root@localhost ~]# export DISPLAY=localhost:1

  [root@localhost ~]# xhost +

  access control disabled, clients can connect from any host

  在设置xhost时,出现unable to open display 的问题一般都能用上述方法搞定


  2、以root用户登录

  输入命令xdpyinfo,记录下里面的name of display:后的字符串,如 name of display:127.0.0.1:1.0

  在执行xhost +命令(使得所有客户都可以访问)

  返回信息为: access control disabled,clients can connect from any host

  如果xhost +不能执行,可以输入命令export DISPLAY=:0执行一下

  再执行xhost +

  xhost + ip (name表示那个ip机器可以使用该服务)

  以oracle用户登录

  如果前面root登录下执行xdpyinfo后的name of display:后的字符串是127.0.0.1:1.0

  那么在该oracle用户下执行一下export DISPLAY=:1.0

  然后再执行xdpyinfo命令,如果能出现信息说明你已经成功了

  这样估计就可以解决linux下安装oracle出现的xhost问题


  3、电脑上下载安装Xshell 5


  4、选择需要连接到哪一个Linux系统


  5、输入用于连接的用户名和密码


  6、输入用于连接的密码


  7、单击这里的确定,开始连接


  8、连接成功


  9、命令startx提示信息

时间: 2024-08-02 20:13:32

linux下xhost命令报错:unable to open display的解决办法的相关文章

tail命令报错No space left on device解决办法

# tail -f ../logs/catalina.out tail: cannot watch `../logs/catalina.out': No space left on device df -h 查看有剩余空间 df -i 查看inode也有剩余空间 最终解决: # vim /etc/sysctl.conf 添加以下: fs.inotify.max_user_watches = 32768 生效: # sysctl -p /etc/sysctl.conf 再次测试: # tail .

linux下使用jstack报错,牛人速来支援

问题描述 linux下使用jstack报错,牛人速来支援 jstack -F 20940 Attaching to process ID 20940, please wait... sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library names (libjvm.so, libjvm_g.so, gamma_g

Mybatis报错: org.apache.ibatis.exceptions.PersistenceException解决办法_Mysql

Mybatis报错: org.apache.ibatis.exceptions.PersistenceException解决办法 一.问题描述 写好配置文件用JUnit进行测试,一运行就报错: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiat

在linux下的weblogic报错,但是 在window下的tomcat不报错!!十万火急!

问题描述 对URL参数加密之后再重定向跳转的时候就报错了!报错信息SecurityHelper类packagecom.huarun;importjava.security.*;importjavax.crypto.*;importjavax.crypto.spec.*;publicclassSecurityHelper{privatefinalstaticintITERATIONS=20;publicstaticStringencrypt(Stringkey,StringplainText)th

求助Linux下安装JDK报错

问题描述 各位大侠Linux下安装JDK时出现以下错误error:Faileddependencies:glibc>=2.1.2-11isneededbyjdk-1.5.0_19-fcs.i586sh-utils>=2.0-1isneededbyjdk-1.5.0_19-fcs.i586fileutils>=4.0-8isneededbyjdk-1.5.0_19-fcs.i586gawk>=3.0.4-1isneededbyjdk-1.5.0_19-fcs.i586textutil

报错“Device is not STOR_DEV_REP_IS_SNAPABLE”的解决办法

故障现象: 报错信息 (hwprov.log): DoSnapshotResourcesExist: Calling FindNextMirrorReplica... FindNextMirrorReplica: Entering. FindNextMirrorReplica: No local mirror replicas were found for />, so now looking for remote mirror replicas. FindNextMirrorReplica:

嵌入式linux系统中,lsusb出现unable to initialize libusb: -99 解决办法 【转】

转自:http://cpbest.blog.163.com/blog/static/41241519201111575726966/ libusb是linux系统中,提供给用户空间访问usb设备的API,方便从linux内核中获取或设置usb设备的信息.lsusb这个用户空间程序,也正是依赖libusb提供的接口API来实现对系统当前的usb总线的扫描,从而显示当前系统存在的usb设备的.   在嵌入式linux中,输入lsusb命名,出现unable to initialize libusb:

Linux 下部署activeMQ报错。

问题描述 activeMQ和spring结合使用,配置文件如下:<?xmlversion="1.0"encoding="UTF-8"?><!--LicensedtotheApacheSoftwareFoundation(ASF)underoneormorecontributorlicenseagreements.SeetheNOTICEfiledistributedwiththisworkforadditionalinformationregard

linux下启动mysql报错问题总结

mysql Starting MySQL..The server quit without updating PID file 1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限 解决方法 :给予权限,执行 "chown -R mysql:mysql /var/data" "chmod -R 755 /usr/local/mysql/data"  然后重新启动mysqld! 2.可能进程里已经存在mysql进程 解决方法:用命