aix开启图形化界面_AIX上启动xmanager界面

在aix上安装oracle,用图形界面进行安装,首先的一点是要让oracle用户能启动xwindow。由于之前一直在HP平台下,对AIX还不是很熟悉,此文章是以为记。

我们假定root可以启动xclock:

我们用xstart通过root登录之后,我们查看通道:

# echo $DISPLAY

localhost:10.0

#

此时,运行xclock可以启动:

然后我们su到oracle用户:

# su - oracle

$

进行环境变量设置:

##用上面观察到的通道进行设置:

export DISPLAY=localhost:10.0

?

##设置XAUTHORITY,注意路径为刚刚root用户下的这个文件,

##root用户的这个文件是在/.Xauthority,如果是之前测试的是别的用户,如user123,那么该文件一般在/home/user123/.Xauthority:

export XAUTHORITY=/.Xauthority

?

$ echo $DISPLAY

localhost:10.0

$ echo $XAUTHORITY

/.Xauthority

$

此时,在oracle用户下运行xclock就能运行。如果此时还报错:

X connection to localhost:10.0 broken (explicit kill or server

shutdown)

这一般是.Xauthority这个文件的权限问题了。我们回到root用户,将这个文件设置成755的权限,让oracle能访问就可以了。

更进一步的研究发现,.Xauthority这个文件其实是在用户用xstart登录的时候自动创建的。如果我们直接是oracle用户开启xstart登录,在xstart登录的时候,我们在xstart的log中可以看到(见下粗体部分):

[01:28:44] Stop timer (TIMER_SHUTDOWN).

[01:28:44] Connection closed.

[01:26:37] Connecting to '192.168.1.64'...

[01:26:37] Connected.

[01:26:37] Version exchange initiated...

[01:26:37] server: SSH-2.0-OpenSSH_5.2

[01:26:37] client: SSH-2.0-nsssh2_3.0.0010 NetSarang Computer,

Inc.

[01:26:37] SSH2 is selected.

[01:26:37] Algorithm negotiation initiated...

[01:26:37] key exchange: diffie-hellman-group14-sha1

[01:26:37] host key: ssh-dss

[01:26:37] outgoing encryption: aes128-cbc

[01:26:37] incoming encryption: aes128-cbc

[01:26:37] outgoing mac: hmac-sha1

[01:26:37] incoming mac: hmac-sha1

[01:26:37] outgoing compression: none

[01:26:37] incoming compression: none

[01:26:37] Host authentication initiated...

[01:26:37] Hostkey fingerprint:

[01:26:37] ssh-dsa 1024

cd:38:5b:87:87:76:d2:5a:51:f7:18:b4:d0:02:47:dc

[01:26:37] Accepted. Verifying host key...

[01:26:38] Verified.

[01:26:38] User authentication initiated...

[01:26:38] Sent user name 'oracle'.

[01:26:38] Sent password.

[01:26:38] Access granted.

[01:26:38] Sent X11 forwarding request...

[01:26:38] Succeeded.

[01:26:38] Sent the command line.

[01:26:38] /usr/bin/X11/xterm -ls -display $DISPLAY

[01:26:38] Start timer (TIMER_SHUTDOWN, 180).

1356-364 /usr/bin/X11/xauth: creating new authority file

/home/oracle/.Xauthority

[01:26:38] An X11 channel (id=1) has opened.

[01:26:38] Stop timer (TIMER_SHUTDOWN).

input method doesn't support my preedit type

[01:27:26] An X11 channel (id=2) has opened.

[01:27:32] An X11 channel (id=2) has closed.

[01:27:44] An X11 channel (id=1) has closed.

[01:27:44] All X11 channels are closed.

[01:27:44] Start timer (TIMER_SHUTDOWN, 60).

也就是说,在/home/oracle下创建了这个文件,而这个文件的宿主是oracle的,我们不需要去export

root的这个文件,也不需要改root的这个文件的权限让oracle用户去读。

而且,让人生气的是,当我们用root用户再次登录的时候,.Xauthority这个文件的之前我们给了755的权限,再次登录的时候,再次变成了600的权限:

# ls -l? ? ? ? ? ? ? ?

total 308

drwxrwxr-x? ? 3 root? ? ?system? ? ? ? ? 256 Oct 13 10:55

.SPOT

-rw-------? ? 1 root? ? ?system? ? ? ? ? 106 Nov 17 01:32

.Xauthority

-rw-------? ? 1 root? ? ?system? ? ? ? ?8716 Nov 17 01:35

.sh_history

这个文件应该是每次某个用户登录的时候,如果没有,则创建之,如果有,则重写之,权限为600。

所以,最简单的方式还是直接用oracle用户启动xstart(而不是通过root启动xstart在su到oracle),自动在oracle用户的主目录下生成.Xauthority文件,然后export一下DISPLAY之后,就能直接用了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值