I am getting following error while establishing a VNC connection on the machine [root@xen ~]# 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 for information on VNC. vncviewer: unable to open display "" What should I look in for. -- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-22 08:35 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Tue, Dec 22, 2009 at 3:32 PM, Tapas Mishra <tapas@abhitech.com> wrote:> vncviewer: unable to open display ""this pretty much says it all. Most likekly you need to have X forwarding enabled (if connecting via ssh). Another possibilty is that if you login as normal user and run "su -". In this case, simply run the command as normal user. You don''t need super user priviledge to run vncviewer. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-22 08:38 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Tue, Dec 22, 2009 at 2:05 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Tue, Dec 22, 2009 at 3:32 PM, Tapas Mishra <tapas@abhitech.com> wrote: > > vncviewer: unable to open display "" > > this pretty much says it all. Most likekly you need to have X >I am not clear with this can you tell me some thing about this one> forwarding enabled (if connecting via ssh). >Ya I am doing it via ssh Only> Another possibilty is that if you login as normal user and run "su -". > In this case, simply run the command as normal user. You don''t need > super user priviledge to run vncviewer. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-22 08:51 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Tue, Dec 22, 2009 at 3:38 PM, Tapas Mishra <tapas@abhitech.com> wrote:>> > vncviewer: unable to open display "" >> >> this pretty much says it all. Most likekly you need to have X > > I am not clear with this can you tell me some thing about this oneAre you familiar with X display? X forwarding? If no, you should search for that first.>> >> forwarding enabled (if connecting via ssh). > > Ya I am doing it via ssh Only>From a windows machine?If yes, Google for "windows ssh X forwarding". Something like this http://solaris.reys.net/how-to-x11-forwarding-using-ssh-putty-and-xming/ Another alternative is to edit domU config file to accept vnc connections on all IP instead of localhost. Not secure, but handy for testing purposes. This way you can simply install vnc client on Windows and connect directly. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-22 09:12 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
I do not have any windows machine with me my Xen is on CentOS and rest all are Ubuntu machines I had been able to do a vnc from CentOS to Ubuntu machines but not vice versa I have an understanding of X forwarding but still it I could not do it ,so I wanted to figure out where the error was but I will search more as you said On Tue, Dec 22, 2009 at 2:21 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Tue, Dec 22, 2009 at 3:38 PM, Tapas Mishra <tapas@abhitech.com> wrote: > >> > vncviewer: unable to open display "" > >> > >> this pretty much says it all. Most likekly you need to have X > > > > I am not clear with this can you tell me some thing about this one > > Are you familiar with X display? X forwarding? If no, you should > search for that first. >> I do not have any windows machine with me my Xen is on CentOS and rest all > are Ubuntu machines I had been able to do a vnc from CentOS to Ubuntu > machines but not vice versa I have an understanding of X forwarding but > still it I could not do it ,so I wanted to figure out where the error was > but I will search more as you said >> >> > >> forwarding enabled (if connecting via ssh). > > > > Ya I am doing it via ssh Only > > From a windows machine? > If yes, Google for "windows ssh X forwarding". Something like this > http://solaris.reys.net/how-to-x11-forwarding-using-ssh-putty-and-xming/ > > Another alternative is to edit domU config file to accept vnc > connections on all IP instead of localhost. Not secure, but handy for > testing purposes. This way you can simply install vnc client on > Windows and connect directly. > > Thanks for these linksbut can you point me to the right log file which I should check in the case of failures of X forwarding on SSH that should be able to help me a bit. http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-22 09:30 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Tue, Dec 22, 2009 at 4:12 PM, Tapas Mishra <tapas@abhitech.com> wrote:> I do not have any windows machine with me my Xen is on CentOS and rest all > are Ubuntu machinesLet me rephrase the question. Where are you ssh-ing the server from? A Windows notebook? Mac? Ubuntu? Once you have that, you can search Google on how to enable ssh forwarding when using that particular CLIENT OS. Most linux distros that I know of already enable X forwarding on server side, so it''s usually just a matter of configuring the client.> Thanks for these links > but can you point me to the right log file which I should check in the case > of failures of X forwarding on SSH that should be able to help me a bit.not much. Basically when you have that error unable to open display "", and you''re connecting via ssh, then most likely its ssh forwarding problem. Sometimes it''s as simple to fix as running "ssh -X" instead of just ssh. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-22 09:33 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
> > Let me rephrase the question. Where are you ssh-ing the server from? A > Windows notebook? Mac? Ubuntu? Once you have that, you can search > Google on how to enable ssh forwarding when using that particular > CLIENT OS. Most linux distros that I know of already enable X > forwarding on server side, so it''s usually just a matter of > configuring the client. >Ok I am using a Ubuntu Laptop as client _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-23 01:29 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Tue, Dec 22, 2009 at 4:33 PM, Tapas Mishra <tapas@abhitech.com> wrote:>> Let me rephrase the question. Where are you ssh-ing the server from? A >> Windows notebook? Mac? Ubuntu? Once you have that, you can search >> Google on how to enable ssh forwarding when using that particular >> CLIENT OS. Most linux distros that I know of already enable X >> forwarding on server side, so it''s usually just a matter of >> configuring the client. > > Ok I am using a Ubuntu Laptop as clientusing "ssh -X" should be enough. Another way is to edit /etc/ssh/ssh_config, look for ForwardX11 -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-23 03:14 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
> > > using "ssh -X" should be enough. Another way is to edit > /etc/ssh/ssh_config, look for ForwardX11I have done a lot of things which have not worked one of them being following I followed this one http://wiki.centos.org/HowTos/VNC-Server ssh root@192.168.1.10 <root@188.95.37.130> -L 5901:localhost:5901 root@192.168.1.10 <root@188.95.37.130>’s password: bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 5901 Could not request local forwarding. Last login: Tue Dec 22 15:01:10 2009 from 192.168.1.1 tapas@tapas-laptop:~$ vncviewer 192.168.1.10 192.168.1.10 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(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java: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:193) at vncviewer.run(vncviewer.java:122) at java.lang.Thread.run(Thread.java:619) java.net.ConnectException: Connection refused Other way which I tried was>From the CentOS Wiki http://wiki.centos.org/HowTos/VNC-ServerI read and did Here is what I did added a user tapas on 192.168.1.10 for using vnc VNCSERVERS="1:tapas" 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 But VNC Server is running which we can verify from the following outcome vncext: VNC extension running! vncext: Listening for VNC connections on port 5902 vncext: Listening for HTTP connections on port 5802 vncext: created VNC server for screen 0 error opening security policy file /usr/lib64/xserver/SecurityPolicy /home/tapas/.vnc/xstartup: line 9: xsetroot: command not found /home/tapas/.vnc/xstartup: line 11: xterm: command not found /home/tapas/.vnc/xstartup: line 12: twm: command not found Could not init font path element unix/:7100, removing from list! Connections: accepted: 192.168.1.3::56069 SConnection: Client needs protocol version 3.8 SConnection: Client requests security type VncAuth(2) Tue Dec 22 23:07:48 2009 VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565 VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-23 03:37 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Wed, Dec 23, 2009 at 10:14 AM, Tapas Mishra <tapas@abhitech.com> wrote:>> >> using "ssh -X" should be enough. Another way is to edit >> /etc/ssh/ssh_config, look for ForwardX11 > > I have done a lot of things which have not worked one of them being > following > I followed this one http://wiki.centos.org/HowTos/VNC-ServerSorry, at this point I have to ask, are you reading my replies correctly? I never suggested that you setup vnc SERVER. When setup correctly (like when using virt-manager/virt-install), domU is already setup with a vnc console. You don''t need to setup vnc server manually. What I suggested was : - setup X forwarding correctly. Since you said you use ubuntu and connect via ssh, the simplest method is to run "ssh -X root@192.168.1.10" instead of just "ssh root@192.168.1.10" (I assume your server IP is 192.168.1.10?). OR, - edit domU config file to enable vnc access from any IP address instead of just localhost. The corresponding entry is "vnclisten" (for HVM domUs) or "vfb" (for PV domUs). Use "xm create --help_config" to find more help about those entries. After this, you need install vnc CLIENT on your Ubuntu laptop (on Ubuntu the package can be vncviewer, xtightvncviewer, or xvnc4viewer), then run (on your laptop) "vncviewer 192.168.1.10:0" (or whatever the vnc display number is). To be fair, there ARE solutions than can allow you to view domUs console that requires installing vnc server on dom0 first, but if you want to use this solution, then you''re on your own. I can''t help you with that, since IMHO it''s too much hassle to setup than what it''s worth. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-23 08:01 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Wed, Dec 23, 2009 at 9:07 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Wed, Dec 23, 2009 at 10:14 AM, Tapas Mishra <tapas@abhitech.com> wrote: > >> > >> using "ssh -X" should be enough. Another way is to edit > >> /etc/ssh/ssh_config, look for ForwardX11 > > > > I have done a lot of things which have not worked one of them being > > following > > I followed this one http://wiki.centos.org/HowTos/VNC-Server > > Sorry, at this point I have to ask, are you reading my replies correctly? > I never suggested that you setup vnc SERVER. When setup correctly > (like when using virt-manager/virt-install), domU is already setup > with a vnc console. You don''t need to setup vnc server manuallyI agree with you here but the machine to which I am having access I does not have an X or say GNOME Desktop manager present> . > > What I suggested was : > - setup X forwarding correctly. > Since you said you use ubuntu and connect via ssh, the simplest method > is to run "ssh -X root@192.168.1.10" instead of just "ssh >I have tried this one also though I forgot to post it here> To be fair, there ARE solutions than can allow you to view domUs > console that requires installing vnc server on dom0 first, but if you > want to use this solution, then you''re on your own. I can''t help you > with that, since IMHO it''s too much hassle to setup than what it''s > worth. >Well thanks for the answers you gave I appreciate the efforts that you have put in here.> >-- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-23 09:19 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Wed, Dec 23, 2009 at 3:01 PM, Tapas Mishra <tapas@abhitech.com> wrote:>> Sorry, at this point I have to ask, are you reading my replies correctly? >> I never suggested that you setup vnc SERVER. When setup correctly >> (like when using virt-manager/virt-install), domU is already setup >> with a vnc console. You don''t need to setup vnc server manually > > I agree with you here but the machine to which I am having access I does not > have an X or say GNOME Desktop manager presentYou don''t need gnome desktop on the server to display domU''s console. If you want to have gnome desktop on the server (which is a different problem altogether), I recommend installing it with yum, and use something like NX (http://www.nomachine.com/) or xrdp. I find them easier to setup, plus they can have persistent session much like Windows remote desktop. This list is probably not a right place to discuss the details though, so I''ll leave it at that.>> Since you said you use ubuntu and connect via ssh, the simplest method >> is to run "ssh -X root@192.168.1.10" instead of just "ssh > > I have tried this one also though I forgot to post it hereDoes it work? -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-23 09:23 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Wed, Dec 23, 2009 at 2:49 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Wed, Dec 23, 2009 at 3:01 PM, Tapas Mishra <tapas@abhitech.com> wrote: > >> Sorry, at this point I have to ask, are you reading my replies > correctly? > >> I never suggested that you setup vnc SERVER. When setup correctly > >> (like when using virt-manager/virt-install), domU is already setup > >> with a vnc console. You don''t need to setup vnc server manually > > > > I agree with you here but the machine to which I am having access I does > not > > have an X or say GNOME Desktop manager present > > You don''t need gnome desktop on the server to display domU''s console. > > If you want to have gnome desktop on the server (which is a different > problem altogether), I recommend installing it with yum, and use > something like NX (http://www.nomachine.com/) or xrdp. I find them > easier to setup, plus they can have persistent session much like > Windows remote desktop. This list is probably not a right place to > discuss the details though, so I''ll leave it at that. > > Well thanks> > >> Since you said you use ubuntu and connect via ssh, the simplest method > >> is to run "ssh -X root@192.168.1.10" instead of just "ssh > > > > I have tried this one also though I forgot to post it here > > Does it work? >It works I am having one test CentOS machine where all the Gnome etc was installed so this do work but then on the machine where there is no X environment it does not works any how thanks for all the help. -- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-23 09:34 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
On Wed, Dec 23, 2009 at 4:23 PM, Tapas Mishra <tapas@abhitech.com> wrote:>> >> Since you said you use ubuntu and connect via ssh, the simplest method >> >> is to run "ssh -X root@192.168.1.10" instead of just "ssh >> > >> > I have tried this one also though I forgot to post it here >> >> Does it work? > > It works I am having one test CentOS machine where all the Gnome etc was > installed so this do work but then on the machine where there is no X > environment it does not works any how thanks for all the help.If I remember correctly you don''t need full blown gnome desktop for it to work. On my system I added this packages (via "yum install", so their dependencies will be installed) xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 xorg-x11-fonts-base xorg-x11-fonts-misc xorg-x11-fonts-truetype xorg-x11-server-Xorg xorg-x11-xauth not really sure which one is absolutely required on the server to get X forwarding to work (perhaps just "yum install xorg-x11-xauth" will do). If you want full-blown gnome desktop anyway, do yum groupinstall "GNOME Desktop Environment" -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-23 09:38 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
> > > not really sure which one is absolutely required on the server to get >If you wish I can post the log file we need to see to do all this but then that is not what this community is meant for the discussion is going in another direction.> X forwarding to work (perhaps just "yum install xorg-x11-xauth" will > do). If you want full-blown gnome desktop anyway, do > > yum groupinstall "GNOME Desktop Environment" >Yes I have done the same. -- http://www.abhitech.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tapas Mishra
2009-Dec-24 16:35 UTC
Re: [Xen-users] Vnc unable to open Display on xen CentOS
Finally its working I have been able to transfer display over ssh Fajar thanks for all the time you spent the problem was on Ubuntu machine as root DISPLAY variable is not set then in xstartup file for vnc user exec gnome-session has to be mentioned which I forgot I did yum groupinstall "X Window System" "GNOME Desktop Environment" as it was not present on the remote Xen machine ubuntu does not allow root to use GUI so I was not able to do it again and again DISPLAY was not set in this case for root but for user it works fine there were a lot of errors like this one when vnc session crashed 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 Current serial number in output stream: 716 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users