实用技巧:在Linux下设置xhost方法步骤

第一步:用root登陆linux,启动vnc服务;

第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的);

第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。

linux下的操作日志如下:

[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的问题。使用上诉方法就可以搞定。

Linux解决xhost: unable to open display的更多相关文章

  1. Linux 如何解决 xhost: unable to open display ""

    [root@host02 ~]# vncservice You will require a password to access your desktops. Password: Verify: x ...

  2. 解决xhost: unable to open display ""

    首先安装vncserver,如图: 切换账户:sudo su到root下 执行:export DISPLAY=:0.0 执行:xhost +,如图:

  3. 使用Xmanager连接linux,操作“xhost +”时出现类似“xhost: unable to open display "192.168.1.1811:1.0" ”问题的解决

    远程连接linux服务器时,有的时候需要把服务器上的图形界面投影到本地来进一步操作,比如linux下安装oracle时就需要在oracle用户下允许视图状态投影到本地,这需要使用命令: xhost + ...

  4. ORACLE11g 安装中xhost: unable to open display 问题解决纪实 (go)

    http://blog.csdn.net/mchdba/article/details/62235761 1,Xhosts报错 安装好vncserver,本地pc笔记本能通过vnc viewer远程连 ...

  5. linux上执行 xhost unable to open display

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

  6. linux oracle 10g tar.gz :xhost: unable to open display

    关于这个问题,最总要的一点是要理解xhost的作用,是干什么的,在下面的介绍中可以基本了解到,只要这个问题解决了,oracle就可以顺利安装了(这是建立在我还没碰到其它问题的基础上). 1. 以roo ...

  7. 关于./xhost: unable to open display问题的解决

    看了很多大同小异的帖子,都没能解决这个问题,以下是我的实测经验,注意第三步,很关键. 注:以下操作在确保vncserver.xdpyinfo服务正常的情况下进行 第一步:root登录,启动vncser ...

  8. linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”

    linux 下通过xhost进入图形界面,经常会出现报错“unable to  open display” linux下的操作步骤如下: [root@localhost ~]# vncserver N ...

  9. 完美解决xhost +报错: unable to open display "" 装oracle的时候总是在弹出安装界面的时候出错

    详细很多朋友在装oracle的时候总是在弹出安装界面的时候出错,界面就是蹦不出来. oracle安装 先切换到root用户,执行xhost + 然后再切换到oracle用户,执行export DISP ...

随机推荐

  1. android 实现自己定义状态栏通知(Status Notification)

    在android项目的开发中,有时为了实现和用户更好的交互,在通知栏这一小小的旮旯里,我们通常须要将内容丰富起来,这个时候我们就须要去实现自己定义的通知栏,比如以下360或者网易的样式: 首先我们要了 ...

  2. jQuery基础---Ajax基础教程(二)

    jQuery基础---Ajax进阶 内容提纲: 1.加载请求 2.错误处理 3.请求全局事件 4.JSON 和 JSONP 5.jqXHR 对象 发文不易,转载请注明出处! 在 Ajax 基础一篇中, ...

  3. css3实现图片遮罩效果鼠标hover以后出现文字

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  4. Html遮罩效果

    遮罩效果 <!DOCTYPE html> <html> <head> <title>DIV CSS遮罩层</title> <scrip ...

  5. ArrayList和LinkedList区别

    一般大家都知道ArrayList和LinkedList的大致区别:      1.ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构.      2.对于随机访问 ...

  6. hdu 4710 Balls Rearrangement

    题意就不说了,刚开始做我竟然傻傻地去模拟,智商捉急啊~~超时是肯定的 求出 a ,b 的最小公倍数,因为n够长的话,就会出现循环,所以就不要再做不必要的计算了.如果最小公倍数大于n的话,就直接计算n吧 ...

  7. 如何在linux中设置tab键长度

    1. 创建文件名为 .vimrc 的系统文件 首先切换到用户根目录,然后创建文件. $ cd ~ $ vim .vimrc 2. 在文件中输入下面的内容并保存 set tabstop=4 set sh ...

  8. sql 聚合函数用法,及执行顺序

    聚合函数无法用在where子句中 , 聚合函数包括count avg sum min max 子句执行顺序from -> where -> group by -> having -& ...

  9. Android Studio 没有assets目录的问题

    Where to place the assets folder in Android Studio   If you are having problems with asset files not ...

  10. mysqli扩展库的 预处理技术 mysqli stmt

    问题的提出? 现在需要向mysql数据库添加100个用户,请问如何实现? 思路: 使用for循环100次,向数据库中添加100个用户. 使用批量添加 $sql1=”insert xxx”; $ssql ...