To setup and use vncserver in redhat flavored distro, please follow below steps:
- Install the package:
$ sudo yum install tigervnc-server tigervnc
- Set a password for a user that you want to use to login to the vnc server:
$ vncpasswd
- Start the vncserver:
$ vncserver
- Check the display number of your newly created vnc session:
$ vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID :1 9168
- Check the port that your vnc session is using:
$ sudo netstat -tulpn | grep 9168 tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 9168/Xvnc tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 9168/Xvnc tcp 0 0 :::6001 :::* LISTEN 9168/Xvnc
- Test your vncserver locally (only if you are using GUI, else test it from the other machine with vncviewer installed), using vncviewer (belongs to tigervnc package):
$ vncviewer :1
To connect from a redhat flavored linux distro client:
- Install the tigervnc package:
$ sudo yum install tigervnc
- Run the vncviewer: vncviewer
: $ vncviewer 192.168.0.2:1
- If you are behind firewall, you need to open port 5901 for the client to get through.
- If firewall is not in your control, you can always use ssh to port forward port 5901 to 5901 in your localhost, by:
$ ssh -L 5901:localhost:5901 vncserver.ip.address
and in other terminal, run $ vncviewer localhost:1
$ vncserver -kill :1
No comments:
Post a Comment