Wednesday, August 23, 2017

xhost:  unable to open display "localhost:0.0"


1) just run vncserver on root and oracle user.

# vncserver
New 'oracle.triples.com:1 (root)' desktop is oracle.triples.com:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/oracle.triples.com:1.log
[root@oracle sysconfig]#

2) Make sure 2 processes are running ( with :1 and :2). One is from root and other one is from oracle user.

# ps -ef | grep -i vnc
root      1607     1  0 Aug21 ?        00:00:00 Xvnc :1 -desktop oracle.triples.com:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root      1646     1  0 Aug21 ?        00:00:00 vncconfig -iconic
root      7528 20562  0 08:58 pts/3    00:00:00 grep -i vnc
oracle   28023     1  0 Aug22 ?        00:00:00 Xvnc :2 -desktop oracle.triples.com:2 (oracle) -httpd /usr/share/vnc/classes -auth /home/oracle/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/oracle/.vnc/passwd -rfbport 5902 -pn
oracle   28044     1  0 Aug22 ?        00:00:00 vncconfig -iconic

3) check if vnc service is running

oracle# service vncserver status
Xvnc is running...

4) Download vncviewer and run in Jumphost machine.

5) connect to oracle machine (while connecting use oracle1:1) where :1 is the process that is started with root

6) Now make sure xhost + is running (this should be from vnc viewer)

oracle#xhost +
access control disabled, clients can connect from any host



No comments:

Post a Comment