Wednesday, June 27, 2012

TigerVNC on CentOS 6

According to the Tigervnc wiki, TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. TigerVNC also provides extensions for advanced authentication methods and TLS encryption.

To install TigerVNC, follow this step.

1. Create the repository config file /etc/yum.repos.d/slce.repo:
name=Scientific Linux Cyrillic Edition
2. Install tigervnc-server rpm package:
# yum --enablerepo=slce install tigervnc-server
3.Create VNC user
As root :
# useradd lombok
# passwd lombok
4.Set VNC's user password
Switch user into the account for each user, and run: vncpasswd This will create a .vnc directory.
[~]# su - lombok
[~]$ cd .vnc
[.vnc]$ ls
[.vnc]$ exit

4. Edit the server configuration
Edit /etc/sysconfig/vncservers, and add the following to the end of the file.
VNCSERVERARGS[1]="-geometry 800x600"

5. Edit your iptables

6. Start the VNC Server

# /etc/init.d/vncserver start

7.Testing VNC Server

As user lombok :

# vncserver :1

At this point, your server is ready to accept connection from another computer.

Connect to TigerVNC Server

Start VNC Viewer Client, because vncserver starting at display 1 (vncserver:1) you must connect using IP:display_number, in this case :

Just enter user lombok password and press OK



Another Option fow VNC Viewer is TightVNC Java Viewer version 2.5.0

Enter user lombok password and press login.


Tuesday, June 26, 2012

X11vnc on Centos 6.0 (insecure connection)

Installing X11vnc

Often you will need remote access to an already logged in GUI session on a "real" console. Or you will need to help another user remotely with an GUI or visual issue. You will need either "vnc-server" or "x11vnc". The vnc-server option will be a module added to X11 for "allways on" vnc support, while x11vnc will allow for adhoc vnc support. vnc-server install will require no third party repos or source building.

x11vnc is a way to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows.

1. Download the latest rpm install from to the host you want the vnc-client to connect to:
[root@edp-01 ~]# wget
2. Install, as root, via the yum or rpm programs on the host you want the vnc-client to connect to:
[root@edp-01 ~]# rpm -ivh  x11vnc-0.9.3-1.el5.rf.i386.rpm
[root@edp-01 ~]# yum install x11vnc-0.9.3-1.el5.rf.i386.rpm

Configuring firewall option

The iptables rules in /etc/sysconfig/ need to be amended to open the VNC ports; as needed, if a local ipv6 setup is being used, those need to be amended as well: 
[root@edp-01 ~]# mcedit /etc/sysconfig/iptables
add folowing line to the iptables file :
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5900:5903,6001:6003 -j ACCEPT
So it look like : 
[root@edp-01 ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5900:5903,6001:6003 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT ... and then restart the iptables:
[root@edp-01 ~]# /etc/init.d/iptables restart

Starting x11vnc

Start the x11vnc process on the host you want the vnc-client to connect to. Please take a long look at the possible options from the x11vnc website. A very simple/insecure example for a trusted network setup (local network or VPN) is to have the user with the GUI console issue the command:
[root@edp-01 ~]# x11vnc -nopw -display :0.0

Accessing x11vnc

Install VNC viewer on client computer next. Download from the site below to install. Start VNC viewer after installing. Then following scrren is shown. Input [(Server's hostname or IP address):(display number)] like following example.

Just choose continue if you asked for encrypted connection.


And the result is:



Referensi : Referensi 01