天天看点

【vnc】vncserver: couldn't find "xauth" on your PATH 问题

新安装的了一台redhat 4.7 版本的测试机器,使用vncserver 时遇到vncserver: couldn't find "xauth" on your path 。查看了一下网上的案例,<b>发现自己的机器上没有安装xauth</b>。。

root@rac1:/root#<b>yum install vnc  vnc-server</b>

setting up install process

setting up repositories

reading repository metadata in from local files

parsing package install arguments

resolving dependencies

--&gt; populating transaction set with selected packages. please wait.

---&gt; downloading header for vnc-server to pack into transaction set.

vnc-server-4.0-12.el4.x86 100% |=========================|  11 kb    00:00     

---&gt; package vnc-server.x86_64 0:4.0-12.el4 set to be updated

---&gt; downloading header for vnc to pack into transaction set.

vnc-4.0-12.el4.x86_64.rpm 100% |=========================| 8.6 kb    00:00     

---&gt; package vnc.x86_64 0:4.0-12.el4 set to be updated

--&gt; running transaction check

dependencies resolved

=============================================================================

 package                 arch       version          repository        size 

installing:

 vnc                     x86_64     4.0-12.el4       base              153 k

 vnc-server              x86_64     4.0-12.el4       base              1.2 m

transaction summary

install      2 package(s)         

update       0 package(s)         

remove       0 package(s)         

total download size: 1.4 m

is this ok [y/n]: y

downloading packages:

(1/2): vnc-server-4.0-12. 100% |=========================| 1.2 mb    00:00     

(2/2): vnc-4.0-12.el4.x86 100% |=========================| 153 kb    00:00     

running transaction test

finished transaction test

transaction test succeeded

running transaction

  installing: vnc                          ######################### [1/2] 

  installing: vnc-server                   ######################### [2/2] 

installed: vnc.x86_64 0:4.0-12.el4 vnc-server.x86_64 0:4.0-12.el4

complete!

root@rac1:/root#<b>vncserver</b>

<b>vncserver: couldn't find "xauth" on your path.</b>

<b>在当前路径找不到xauth命令</b>

<b>使用locate whereis 命令查找xauth</b>

root@rac1:/root#locate xauth

/lib64/security/pam_xauth.so

/usr/share/man/man8/pam_xauth.8.gz

/usr/share/doc/pam-0.77/txts/readme.pam_xauth

/usr/share/zsh/4.2.0/functions/_xauth

root@rac1:/root#whereis xauth

xauth:

<b>确认没有安装xauth</b>

root@rac1:/root#<b>yum install xauth</b>

apsara                    100% |=========================|  951 b    00:00     

update                    100% |=========================|  951 b    00:00     

base                      100% |=========================|  951 b    00:00     

extras                    100% |=========================|  951 b    00:00     

---&gt; downloading header for xorg-x11-xauth to pack into transaction set.

xorg-x11-xauth-6.8.2-1.el 100% |=========================| 263 kb    00:00     

---&gt; package xorg-x11-xauth.x86_64 0:6.8.2-1.el.52 set to be updated

 xorg-x11-xauth          x86_64     6.8.2-1.el.52    base              291 k

install      1 package(s)         

total download size: 291 k

(1/1): xorg-x11-xauth-6.8 100% |=========================| 291 kb    00:00     

  installing: xorg-x11-xauth               ######################### [1/1] 

installed: xorg-x11-xauth.x86_64 0:6.8.2-1.el.52

<b>再次执行vncserver</b>

you will require a password to access your desktops.

password: 

verify: 

xauth:  creating new authority file /root/.xauthority

new 'rac1:1 (root)' desktop is rac1:1

creating default startup script. /root/.vnc/xstartup

starting applications specified in /root/.vnc/xstartup

log file is /root/.vnc/rac1:1.log

继续阅读