tapas_mishra
December 24th, 2009, 01:06 PM
I was having some problem on access a remote machine via VNC so got a lot of error messages it is working fine right now I am mentioning the errors and how I solved them then the actual issue for which I am posting is at bottom
the remote machine did not had an X environment and no physical access to it so I installed the GNOME then
I got following error
[root@some machine ~]# vncviewer localhost:0
VNC Viewer Free Edition 4.1.2 for X - built Mar 24 2009 19:52:30
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com (http://www.realvnc.com/) for information on VNC.
vncviewer: unable to open display ""
the mistake was I was doing it as root Ubuntu does not allow to have a GUI to root
I have forgoten but some where I read that it is possible to give a GNOME login session to root also on Ubuntu some one may post the method here as I forgot right now
then
I tried the following
tapas@tapas-laptop:~$ vncviewer IP of remote machine
IP of remote machine 5900
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.(Socket.java:372)
at java.net.Socket.(Socket.java:186)
at rfbProto.(rfbProto.java:93)
at vncviewer.connectAndAuthenticate(vncviewer.java:19 3)
at vncviewer.run(vncviewer.java:122)
at java.lang.Thread.run(Thread.java:619)
java.net.ConnectException: Connection refused
did some changes on the remote machine again
added a vncuser tapas on remote machine
for using vnc
in /etc/sysconfig/vncservers
VNCSERVERS="1:tapas"
note that tapas is username of vncuser who will be logging in to use vnc
then
VNCSERVERARGS[1]="-geometry 640x480"
also did # service vncserver start
went to /home/tapas/.vnc and edited
xstartup
removed the comment from these two lines
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
also added following lines to the start of the file
( while true ; do xterm ; done ) &
So that xterm session is available
restarted vncserver
service vncserver restart
vnc server was listening to the incoming vnc requests which was verified by following out put
[root@localhost ~]# netstat -tualp | grep Xvnc
tcp 0 0 *:5801 *:* LIST EN 15604/Xvnc
tcp 0 0 *:5802 *:* LIST EN 26836/Xvnc
tcp 0 0 *:5901 *:* LIST EN 15604/Xvnc
tcp 0 0 *:5902 *:* LIST EN 26836/Xvnc
tcp 0 0 *:6001 *:* LIST EN 15604/Xvnc
tcp 0 0 *:6002 *:* LIST EN 26836/Xvnc
tcp 0 0 *:6001 *:* LIST EN 15604/Xvnc
tcp 0 0 *:6002 *:* LIST EN 26836/Xvnc
then on the remote machine I checked again I had forgotten to mention following
exec gnome-session
in /home/tapas/.vnc/xstartup file
tapas being vncuser
now over ssh it worked
but it crashed first here is what I did
ssh -X IP of remote server
then
vncviewer localhost:1I got a window which asked me password not the username I did enter and then pressed enter I guess that was vncpassword
for a second I got a screen of some size which I do not know and some thing kept happening in background and then display crashed
though there was nothing and I got following message on command line
Thu Dec 24 16:43:35 2009
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Thu Dec 24 16:43:48 2009
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Value in failed request: 0x400
Serial number of failed request: 523
I repeated the above step did ssh on remote and then again vncviewer localhost:1
it worked
if you do not use
ssh -X IP of remote and do ssh remote IP and then execute vncviewer localhost:1then you will get an error
[tapas@remote IP ~]$ vncviewer localhost:1
VNC Viewer Free Edition 4.1.2 for X - built Mar 24 2009 19:52:30
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
vncviewer: unable to open display "
here is my problem
1) Why did it crashed
2)If I try to access it in mozilla I am getting message
RFB 003.008
Any guesses as to what should I do to access it using mozilla.
I would also like to mention that I am able to transfer display in opera via vnc
the remote machine did not had an X environment and no physical access to it so I installed the GNOME then
I got following error
[root@some machine ~]# vncviewer localhost:0
VNC Viewer Free Edition 4.1.2 for X - built Mar 24 2009 19:52:30
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com (http://www.realvnc.com/) for information on VNC.
vncviewer: unable to open display ""
the mistake was I was doing it as root Ubuntu does not allow to have a GUI to root
I have forgoten but some where I read that it is possible to give a GNOME login session to root also on Ubuntu some one may post the method here as I forgot right now
then
I tried the following
tapas@tapas-laptop:~$ vncviewer IP of remote machine
IP of remote machine 5900
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.(Socket.java:372)
at java.net.Socket.(Socket.java:186)
at rfbProto.(rfbProto.java:93)
at vncviewer.connectAndAuthenticate(vncviewer.java:19 3)
at vncviewer.run(vncviewer.java:122)
at java.lang.Thread.run(Thread.java:619)
java.net.ConnectException: Connection refused
did some changes on the remote machine again
added a vncuser tapas on remote machine
for using vnc
in /etc/sysconfig/vncservers
VNCSERVERS="1:tapas"
note that tapas is username of vncuser who will be logging in to use vnc
then
VNCSERVERARGS[1]="-geometry 640x480"
also did # service vncserver start
went to /home/tapas/.vnc and edited
xstartup
removed the comment from these two lines
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
also added following lines to the start of the file
( while true ; do xterm ; done ) &
So that xterm session is available
restarted vncserver
service vncserver restart
vnc server was listening to the incoming vnc requests which was verified by following out put
[root@localhost ~]# netstat -tualp | grep Xvnc
tcp 0 0 *:5801 *:* LIST EN 15604/Xvnc
tcp 0 0 *:5802 *:* LIST EN 26836/Xvnc
tcp 0 0 *:5901 *:* LIST EN 15604/Xvnc
tcp 0 0 *:5902 *:* LIST EN 26836/Xvnc
tcp 0 0 *:6001 *:* LIST EN 15604/Xvnc
tcp 0 0 *:6002 *:* LIST EN 26836/Xvnc
tcp 0 0 *:6001 *:* LIST EN 15604/Xvnc
tcp 0 0 *:6002 *:* LIST EN 26836/Xvnc
then on the remote machine I checked again I had forgotten to mention following
exec gnome-session
in /home/tapas/.vnc/xstartup file
tapas being vncuser
now over ssh it worked
but it crashed first here is what I did
ssh -X IP of remote server
then
vncviewer localhost:1I got a window which asked me password not the username I did enter and then pressed enter I guess that was vncpassword
for a second I got a screen of some size which I do not know and some thing kept happening in background and then display crashed
though there was nothing and I got following message on command line
Thu Dec 24 16:43:35 2009
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Thu Dec 24 16:43:48 2009
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Value in failed request: 0x400
Serial number of failed request: 523
I repeated the above step did ssh on remote and then again vncviewer localhost:1
it worked
if you do not use
ssh -X IP of remote and do ssh remote IP and then execute vncviewer localhost:1then you will get an error
[tapas@remote IP ~]$ vncviewer localhost:1
VNC Viewer Free Edition 4.1.2 for X - built Mar 24 2009 19:52:30
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
vncviewer: unable to open display "
here is my problem
1) Why did it crashed
2)If I try to access it in mozilla I am getting message
RFB 003.008
Any guesses as to what should I do to access it using mozilla.
I would also like to mention that I am able to transfer display in opera via vnc