Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1552274
  • 博文数量: 157
  • 博客积分: 1776
  • 博客等级: 上尉
  • 技术积分: 1786
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-19 10:49
文章分类

全部博文(157)

文章存档

2018年(1)

2017年(12)

2015年(6)

2014年(17)

2013年(51)

2012年(65)

2011年(5)

分类: LINUX

2014-03-14 14:44:48

果然革命的道路是曲折的,前两天刚搞定SQL > startup的毛病,今天又出问题了。

在linux系统中用Oracle帐号执行DBCA或其他JAVA图形界面程序时,报错:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0

查了一下解决办法如下:

用root登陆,在#提示符后输入:

xhost local:oracle non-network local connections being added to access control list

敲回车运行后出现(这是我的 centOS 4 的结果,其他系统可能有不同):

non-network local connections being added to access control list
xhost: bad hostname "non-network"
xhost: bad hostname "local"
xhost: bad hostname "connections"
xhost: bad hostname "being"
xhost: bad hostname "added"
xhost: bad hostname "to"
xhost: bad hostname "access"
xhost: bad hostname "control"
xhost: bad hostname "list"

此时再 su - oracle 切换到Oracle用户执行图形界面任务就可以了(我的用户名是oracle)。

PostScripts:

man xhost中有这样一段

A complete name has the syntax ‘‘family:name’’ where the families are as follows:

      inet      Internet host (IPv4)
      inet6     Internet host (IPv6)
      dnet      DECnet host
      nis       Secure RPC network name
      krb       Kerberos V5 principal
      local     contains only one name, the empty string
      si        Server Interpreted

其中local那一行就是用来解决同一台机器的不同用户访问X的问题的。
阅读(1869) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~