1 查看DISPLAY是否设置:env| grep DISPLAY

如未设置则,export DISPLAY=192.168.0.9:0.0 (斜体字修改为自己的服务器的ip)

2   root用户执行 xhost +

3  切换到oracle用户安装即可

-------------------------------------

https://wiki.archlinux.org/index.php/Running_X_apps_as_root

Running X apps as root

 

By default, and for security reasons, root will be unable to connect to a non-root user's X server. There are multiple ways of allowing root to do so, if it is necessary.

The most secure methods

The most secure methods are simple. They include:

  • kdesu (included with KDE)
$ kdesu name-of-app
  • gksu (included with GNOME)
$ gksu name-of-app
  • bashrun (in community)
$ bashrun --su name-of-app
  • sudo (must be installed and properly configured with visudo)
$ sudo name-of-app
  • sux (wrapper around su which will transfer your X credentials)
$ sux root name-of-app

These are the preferred methods, because they automatically exit when the application exits, negating any security risks quite completely.

Alternate methods

These methods will allow root to connect to a non-root user's X server, but present varying levels of security risks, especially if you run ssh. If you are behind a firewall, you may consider them to be safe enough for your requirements.

  • Temporarily allow root access
  • xhost
$ xhost +

will temporarily allow root, or anyone to connect your X server. Likewise,

$ xhost -

will disallow this function afterward.

Some users also use:

$ xhost + localhost

(Your X server must be configured to listen to TCP connections for xhost + localhost to work).

  • Permanently allow root access
Method 1: Add the line

session optional pam_xauth.so

to /etc/pam.d/su and /etc/pam.d/su-l. Then switch to your root user using 'su' or 'su -'.

Method 2: Globally in /etc/profile

Add the following to /etc/profile

export XAUTHORITY=/home/non-root-usersname/.Xauthority

This will permanently allow root to connect to a non-root user's X server.

Or, merely specify a particular app:

export XAUTHORITY=/home/usersname/.Xauthority kwrite

(to allow root to access kwrite, for instance.)

"xxadmin" user: No protocol specified 错误的更多相关文章

  1. type 'simple Class' does not conform to protocol 'Example Protocol'错误

    在看swift教程中"接口和扩展"这小部分. 在编写时提示"type 'simple Class' does not conform to protocol 'Examp ...

  2. workspace路径有中文情况会报java.net.MalformedURLException: unknown protocol: d错误

    原因及描述:java读取xml文件时如果出现中文字符就会出现这类错误 解决方法:   1.将中文路径改为英文路径 2.读取file时"file:///d:/" 而不是"d ...

  3. 检查DISPLAY设置时Xlib出现No protocol specified错误

    退出到root用户,执行xhost +命令后,再次切换到Oralce用户,执行runInstaller命令,错误消失

  4. java解析XML saxReader.read(xml) 错误:org.dom4j.DocumentException: no protocol

    java解析XML saxReader.read(xml) 错误:org.dom4j.DocumentException: no protocol 完整错误信息: org.dom4j.Document ...

  5. 【故障处理】ORA-28040: No matching authentication protocol

    [故障处理]ORA-28040: No matching authentication protocol 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者 ...

  6. ORA-28040: No matching authentication protocol

    1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 告警日志中频繁出现Using depr ...

  7. Socket错误详解及处理方法

    例如错误代码10061, 说明服务器已经找到,但连接被服务器拒绝, 连接失败原因可能是: 端口号设置错误: 2.服务器没有处于监听状态 (即ServerSocket –>Active=true) ...

  8. 一个基于protocol buffer的RPC实现

    Protocol Buffer仅仅是提供了一套序列化和反序列化结构数据的机制,本身不具有RPC功能,但是可以基于其实现一套RPC框架. Services protocol buffer的Service ...

  9. nodejs 访问mysql

    安装 $ npm install mysql 简介 这个一个mysql的nodejs版本的驱动,是用JavaScript来编写的.不需要编译 这儿有个例子来示范如何使用: var mysql = re ...

随机推荐

  1. 2.CSS 颜色代码大全

    确实使用,不用重复造轮子了!!! 摘自:http://www.cnblogs.com/circlebreak/p/6140602.html

  2. apk重签名的两种方法

    因为robotium要求被测应用和测试代码要有一致的签名, 所以需要将apk包重签名. 方法一:通过re-sign.jar来产生debug key的apk(不适用于jdk 7以上) re-sign.j ...

  3. c++中stl----vector

    1 vector是啥玩意 (1)可以使用下标访问个别的元素 (2)迭代器可以按照不同的方式遍历 (3)可以在容器的末尾增加或者删除元素 2 容器大小和容器的容量区别 (1)大小是元素的个数,容量是分配 ...

  4. ubuntu的 mysql 存储目录迁移

    1:sudo service MySQL stop#迁移前必须先停止mysql 2:创建mysql 存放的 目标文件夹 一般 默认的 mysql 存储目录在  /var/lib中 看清楚  文件的权限 ...

  5. 让webStorm支持自动监听编译scss文件

    前提概要 今日,重装了两波系统,,,之前安装的各种环境都忘光了,重新又踩一次坑的感觉很不舒服,所以记录一下配置自动编译scss一路遇到的坑 一.webstrom run的时候控制台输出的错误中文提示乱 ...

  6. 洛谷 - P1829 - Crash的数字表格 - 莫比乌斯反演

    求: \(S(n,m)=\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{m}lcm(i,j)\) 显然: \(S(n,m)=\sum\limits_{i=1}^{n}\ ...

  7. 洛谷P3312 [SDOI2014]数表(莫比乌斯反演+树状数组)

    传送门 不考虑$a$的影响 设$f(i)$为$i$的约数和 $$ans=\sum\limits_{i=1}^n\sum\limits_{j=1}^nf(gcd(i,j))$$ $$=\sum\limi ...

  8. 在iOS11 自定义titleview问题(位置 按钮点击)

    喜欢交朋友的加:微信号 dwjluck2013 1.在自定义titleview的.h文件 里重写 intrinsicContentSize 属性 @property(nonatomic, assign ...

  9. 自定义的cell上面有图片时,如果产生了重用,图片可能会错乱问题

    当被重用的cell将要显示时,会调用这个方法,这个方法最大的用武之地是当你自定义的cell上面有图片时,如果产生了重用,图片可能会错乱(当图片来自异步下载时及其明显),这时我们可以重写这个方法把内容抹 ...

  10. [软件工程基础]2017.11.04 第八次 Scrum 会议

    具体事项 项目交接燃尽图 每人工作内容 成员 已完成的工作 计划完成的工作 工作中遇到的困难 游心 #10 搭建可用的开发测试环境:#9 阅读分析 PhyLab 后端代码与文档:#8 掌握 Larav ...