To GeraldClark and PjWelsh, I have centos 6 and used your guide to get it going with vnc. First of all thanks for putting that up, so many techs told me I did not have to install a desktop to make it work and they were so wrong.
http://wiki.centos.org/HowTos/VNC-Server
Using centos 6 I found some differences and wanted to post them here to see if anything helps clear it all up.
I acutally installed x windows system and 'desktop' groups since that is what worked with my ipmi card. I installed tigervnc-server as root, ran vncpasswd as root, got a password. started/stopped just like it said to, so far so good.
opened port 5902 -A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
in /etc/sysconfig/vncservers I added root and had to take out "-localhost" or I could never connect via vncviewer, completely blocked unless both were taken out. I imagine there is some setting somehow in vncviewer but I cannot find it. I am assuming I am still unencrypted in my connection due to this.
now it gets weird, perhaps due to me installing x windows system...here is my startx file, completely different than the one you posted...and I changed nothing and it worked.
#!/bin/sh
[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n export LANG export SYSFONT vncconfig -iconic & unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS OS=`uname -s` if [ $OS = 'Linux' ]; then case "$WINDOWMANAGER" in *gnome*) if [ -e /etc/SuSE-release ]; then PATH=$PATH:/opt/gnome/bin export PATH fi ;; esac fi if [ -x /etc/X11/xinit/xinitrc ]; then exec /etc/X11/xinit/xinitrc fi if [ -f /etc/X11/xinit/xinitrc ]; then exec sh /etc/X11/xinit/xinitrc fi [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
My issue still revolves around the actual encryption. There seems to be nothing in vncviewer allowing it. There is something in your post about the ssh, but it references only another vnc server.
so, is the only way to get an ssh connection is to download a windows vncserver, and connect with that to the vncserver on my linux box? (box is on the internet, not local)
anyway, this helpful how to really saves a lot of time, really debunked a lot of myths about not needing a desktop installed (which was really furstrating trying to make it work without one).
Centos 6 is a bit different in that one file...and it would be great to know how to connect though ssh with a viewer.
still, it freaking works!!
On 3/22/2012 10:26 PM, Bob Hoffman wrote:
To GeraldClark and PjWelsh, I have centos 6 and used your guide to get it going with vnc. First of all thanks for putting that up, so many techs told me I did not have to install a desktop to make it work and they were so wrong.
so this is what I did in centos 6 tonight to make it work for me...
as root yum install tigervnc-server ran vncpasswd, added a password /etc/sysconfig/vncservers, uncommented line 18 and 19, added root started and stopped, service vncserver start / stop opened port 5902 in iptables, restarted iptables |INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
service vncserver start
downloaded tigervnc from source forge download putty
in putty I made a saved session called 'vnc to my server' went to connections, ssh, tunnels in putty explorer added source port, 5902 destination I put in localhost:5902 click add then save the whole session (go back to session page) open a putty session (click open), making sure it was my vnc session logged into server opened tigervnc put in localhost:5902 and hit ok. I was in like flynn...
awesome. so much faster than ipmi
|
On 3/22/2012 11:03 PM, Bob Hoffman wrote:
On 3/22/2012 10:26 PM, Bob Hoffman wrote:
To GeraldClark and PjWelsh, I have centos 6 and used your guide to get it going with vnc. First of all thanks for putting that up, so many techs told me I did not have to install a desktop to make it work and they were so wrong.
so this is what I did in centos 6 tonight to make it work for me...
as root yum install tigervnc-server ran vncpasswd, added a password /etc/sysconfig/vncservers, uncommented line 18 and 19, added root started and stopped, service vncserver start / stop opened port 5902 in iptables, restarted iptables |INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
service vncserver start
downloaded tigervnc from source forge download putty
in putty I made a saved session called 'vnc to my server' went to connections, ssh, tunnels in putty explorer added source port, 5902 destination I put in localhost:5902 click add then save the whole session (go back to session page) open a putty session (click open), making sure it was my vnc session logged into server opened tigervnc put in localhost:5902 and hit ok. I was in like flynn...
awesome. so much faster than ipmi
AS a last addition. I added this to my existing system too. It has many virtual machines. I had the error " Starting VNC server: 2:root A VNC server is already running as :2"
after many reinstalls and many attempts and seeing 1,000s of posts from people freaking out, I took the initiative and thought that libvirt was conflicting. I changed the number to 8 in the /sysconfig/vncserver file....and then it worked easily.
Not sure what will happen if you select 2, 3, etc....and then add some virtual machines. I see conflicts ahead.
On 03/23/2012 12:01 AM, Bob Hoffman wrote:
On 3/22/2012 11:03 PM, Bob Hoffman wrote:
On 3/22/2012 10:26 PM, Bob Hoffman wrote:
To GeraldClark and PjWelsh, I have centos 6 and used your guide to get it going with vnc. First of all thanks for putting that up, so many techs told me I did not have to install a desktop to make it work and they were so wrong.
so this is what I did in centos 6 tonight to make it work for me...
as root yum install tigervnc-server ran vncpasswd, added a password /etc/sysconfig/vncservers, uncommented line 18 and 19, added root started and stopped, service vncserver start / stop opened port 5902 in iptables, restarted iptables |INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
service vncserver start
downloaded tigervnc from source forge download putty
in putty I made a saved session called 'vnc to my server' went to connections, ssh, tunnels in putty explorer added source port, 5902 destination I put in localhost:5902 click add then save the whole session (go back to session page) open a putty session (click open), making sure it was my vnc session logged into server opened tigervnc put in localhost:5902 and hit ok. I was in like flynn...
awesome. so much faster than ipmi
AS a last addition. I added this to my existing system too. It has many virtual machines. I had the error " Starting VNC server: 2:root A VNC server is already running as :2"
after many reinstalls and many attempts and seeing 1,000s of posts from people freaking out, I took the initiative and thought that libvirt was conflicting. I changed the number to 8 in the /sysconfig/vncserver file....and then it worked easily.
Not sure what will happen if you select 2, 3, etc....and then add some virtual machines. I see conflicts ahead.
Let me recommend to you that you try to run spice instead of VNC ... especially if you care about sound:
On Thu, Mar 22, 2012 at 11:03 PM, Bob Hoffman bob@bobhoffman.com wrote: [snip]
opened port 5902 in iptables, restarted iptables |INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
[snip]
in putty I made a saved session called 'vnc to my server' went to connections, ssh, tunnels in putty explorer added source port, 5902 destination I put in localhost:5902 click add then save the whole session (go back to session page)
[snip]
Note if you are exclusively using an SSH tunnel to access your VNC, you don't need to open a port for VNC in the firewall. In fact, not opening a direct port for VNC is a good way of enforcing the tunnel to secure the connection.
On 3/23/2012 11:40 AM, William Hooper wrote:
On Thu, Mar 22, 2012 at 11:03 PM, Bob Hoffmanbob@bobhoffman.com wrote: [snip]
opened port 5902 in iptables, restarted iptables |INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
[snip]
in putty I made a saved session called 'vnc to my server' went to connections, ssh, tunnels in putty explorer added source port, 5902 destination I put in localhost:5902 click add then save the whole session (go back to session page)
[snip]
Note if you are exclusively using an SSH tunnel to access your VNC, you don't need to open a port for VNC in the firewall. In fact, not opening a direct port for VNC is a good way of enforcing the tunnel to secure the connection.
well, that makes sense. And I like that alot. Less ports the better. This is only for my host so I can run virt-manager. Thanks for the great tip.
bob