This HowTo Shows how to setup VNC on the remote server based on ubuntu/Debain:

Install the required Packages

apt-get install gnome-core gnome-session-fallback vnc4server

Setup the iptables rules

vi /etc/sysconfig/firewall

/sbin/iptables -A INPUT -p tcp –dport 5901 -m state –state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp –dport 6001 -m state –state NEW -j ACCEPT

Edit the VNC Configuration

vi ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
gnome-session –session=gnome-classic &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#gnome-session &
#x-window-manager &

Setup the password for VNC Viewer and run the server

vncpasswd

vncserver

Download the VNC viewer and connect using port and IP

IP:port

Advertisements