lunedì 17 dicembre 2012

Oracle Linux: install and configure VNC server

This post covers the topic of installing a VNC server under Oracle Linux so you can login remotely to the machine desktop interface.

To be honest I usually (almost never) install a desktop environment on machines running Oracle products, this is because it's more fast and immediate apply system changes using command line instead of using a GUI without considering the fact that a GUI burdens systems' resources.

Despite this fact I recognize that sometimes having a GUI isn't that bad because allow users, even ones not so familiar with command line, to use systems.
Anyway...here's how to install VNC server on Oracle Linux (mine was 5 update 4 with Gnome desktop)!

Install vnc-server. In my system this package was already installed but needed to be updated, so:

[root@oracle ~]$  yum install vnc-server

Edit configuration file:

[oracle@oracle ~]$ nano /home/oracle/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startx &


Please note that I've uncommented some lines, commented other and added "starx&" command which starts Gnome.

If you have installed KDE instead of Gnome the command will be: "startxkde&"

Once it's configured the further step it's to enable it, so first you need to choose a password to let connections occurr:

[oracle@oracle ~]$ vncpasswd

Type your desired password then start server on selected port. In my case port is ":1"

[oracle@oracle ~]$ vncserver :1

Test if this is correctly working connecting using a VNC Viewer.

Please note that fireall (iptables) may interfere with these connections if not correctly set up.

If you wish to stop vncserver:

[oracle@oracle ~]$ vncserver -kill :1


That's all!!

Nessun commento:

Posta un commento