VNC server on centos 6

404 views
Skip to first unread message

karlcha...@gmail.com

unread,
Apr 7, 2018, 2:20:37 PM4/7/18
to TigerVNC User Discussion/Support
Hello,

Forgive me but I followed the installation instructions I could find and have had no luck installing and setting up VNC server on my centos 6.9 system.

The first step given in multiple videos is:

# yum install vnc vnc-server

On my system this installs:

tigervnc-server-module-1.1.0-24.el6.x86_64
tigervnc-1.1.0-24.el6.x86_64

However, a bunch of stuff seems to be missing. There is no Xvnc binary, etc:

[root@localhost usr]# rpm -ql tigervnc
/usr/bin/vncviewer
/usr/share/applications/vncviewer.desktop
/usr/share/doc/tigervnc-1.1.0
/usr/share/doc/tigervnc-1.1.0/LICENCE.TXT
/usr/share/doc/tigervnc-1.1.0/README.txt
/usr/share/icons/hicolor
/usr/share/icons/hicolor/16x16
/usr/share/icons/hicolor/16x16/apps
/usr/share/icons/hicolor/16x16/apps/tigervnc.png
/usr/share/icons/hicolor/24x24
/usr/share/icons/hicolor/24x24/apps
/usr/share/icons/hicolor/24x24/apps/tigervnc.png
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/tigervnc.png
/usr/share/locale/de/LC_MESSAGES/tigervnc.mo
/usr/share/locale/fr/LC_MESSAGES/tigervnc.mo
/usr/share/locale/pl/LC_MESSAGES/tigervnc.mo
/usr/share/locale/ru/LC_MESSAGES/tigervnc.mo
/usr/share/locale/sk/LC_MESSAGES/tigervnc.mo
/usr/share/locale/sv/LC_MESSAGES/tigervnc.mo
/usr/share/man/man1/vncviewer.1.gz
[root@localhost usr]#

[root@localhost usr]# rpm -ql tigervnc-server-module-1.1.0-24.el6.x86_64
/usr/lib64/xorg/modules/extensions/libvnc.so

I see this is an old version so I found and downloaded:
tigervnc-1.8.0.x86_64.tar.gz

In here I find the expected binaries but no rpm or installation instructions.

I am looking for a yum installable package that will install tigervnc and dependencies such as the proper version of Perl as well is the Xstartup files and the init.d script.

Does such a package exist?

Thank you.

karlcha...@gmail.com

unread,
Apr 8, 2018, 3:04:25 AM4/8/18
to TigerVNC User Discussion/Support
After playing with this today I discovered the follow procedure worked for me:

My notes on accessing a CentOS 6 desktop from a Windows desktop using VNC.

In this example, both the CentOS 6 and the Windows machines are 64-bit.

1. It is assumed that desktop software, such as gnome, is loaded on the CentOS 6 machine.

- if not, it should be loadable with, as root, # yum groupinstall Desktop

2. Install TigerVNC server on the CentOS machine

- http://tigervnc.org -> https://github.com/TigerVNC/tigervnc/releases -> https://bintray.com/tigervnc/stable/tigervnc/1.8.0

- as root, download tigervnc-el6.repo and place in /etc/yum.repos.d/

- as root, # yum install tigervnc-server

3. Add a user to /etc/sysconfig/vncservers (in this case, user "karl")

VNCSERVERS="2:karl"
VNCSERVERS[2]="-geometry 800x600"

4. Create VNC password for the user

- as user karl, $ vncpasswd

This creates file ~karl/.vnc/passwd

5. Start the VNC server

- as root, # service vncserver start

This creates ~/.vnc/xstartup for each user in the /etc/sysconfig/vncservers file.

6. Configure the local firewall to allow connections from the vnc viewer

- as root, add the following line right after the rule that opens port 22 in /etc/sysconfig/iptables

-A INPUT -m state -state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT

I believe this allows for 3 vnc users. Presumably for more set 5903 to 5900+<# of users> and 6003 to 6000+<# of users>. Each user would be added to /etc/sysconfig/vncservers using successive numbers.

- as root, # service iptables restart

7. On the Windows machine, download the viewer

- download vncviewer64-1.8.0.exe from https://bintray.com/tigervnc/stable/tigervnc/1.8.0

Note: there is no installation process for the viewer. Simply execute this program.

8. On the Windows machine, execute vncviewer64-1.8.0.exe

- enter <ip address>:5902 in the "VNC server" field.

For example, 192.168.10.137:5902 . In this example 192.168.10.137 is the ip address of the CentOS 6 machine. If you do not know it, it can be obtained by running /sbin/ifconfig.

- press Connect

- enter the user's password

A CentOS desktop should be displayed.

I noticed that if one wants to end their session and open another one later, it is necessary to just kill the window rather than logging out. If one logs out then starting a new vncviewer session does not bring up a desktop. To do so requires the vncserver to be restarted by using the kill command to stop the current one and then running vncserver again (as the regular user.)

I hope this helps.

Reply all
Reply to author
Forward
0 new messages