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. 自适应文案提示框、无数据图片加载<IOS小组件>

    非常感谢,帮助我的朋友们,谢谢你们. 该组件的编写仅仅用来不到4个小时,包括测试与修改bug.为他起名为AdaptivePromptDialogBox(就是自适应文案提示框): 呆毛地址:链接 < ...

  2. C++11: Multi-core Programming – PPL Parallel Aggregation Explained

    https://katyscode.wordpress.com/2013/08/17/c11-multi-core-programming-ppl-parallel-aggregation-expla ...

  3. PHP中正则表达式学习及应用(一)

    1.正则表达式的介绍和作用 什么是正则表达式 在编写处理字符串的程序或网页时,经常会有查找符合某些复杂规则的字符串 的需要.正则表达式就是用于描述这些规则的语法. 例:在判断用户邮件地址格式.手机号码 ...

  4. UVa 557 Burger (概率+递推)

    题意:有 n 个牛肉堡和 n 个鸡肉堡给 2n 个客人吃,在吃之前抛硬币来决定吃什么,如果剩下的汉堡一样,就不用投了,求最后两个人吃到相同的概率. 析:由于正面考虑还要要不要投硬币,太麻烦,所以我们先 ...

  5. Binder使用示例(转载)

    转自:http://blog.csdn.net/new_abc/article/details/8097775

  6. 668. Kth Smallest Number in Multiplication Table

    Nearly every one have used the Multiplication Table. But could you find out the k-th smallest number ...

  7. PTA 4-4 先序输出叶结点 【基础题】

    //二叉树的叶结点:度为0的结点. void PreorderPrintLeaves( BinTree BT ) { if(BT==NULL) //如果传下来根节点就是空,直接返回: return; ...

  8. Unity NGUI学习

    环境 Unity4.3    NGUI v3.68 导入 Project界面->右键->import package->custom package载入安装包即可 untiy4.6用 ...

  9. 阿里云物联网 .NET Core 客户端 | CZGL.AliIoTClient:4. 设备上报属性

    文档目录: 说明 1. 连接阿里云物联网 2. IoT 客户端 3. 订阅Topic与响应Topic 4. 设备上报属性 4.1 上报位置信息 5. 设置设备属性 6. 设备事件上报 7. 服务调用 ...

  10. bzoj5148:[BeiJing2018]Kakuro

    传送门 有上下界最小费用可行流,行列建边变形. 行列建边相信大家都做过,没做过的可以看一下这个题:bzoj3698XWW的难题,对应的我写的题解题解 这个题需要变形一下,不只是单纯的对行列进行连边,首 ...