Basically what I need is I shoud be able to view the login screen through VNC Viewer. Currently someone has to first obtain the console through OVM, login and only then is it possible to remote through VNC Viewer. Once a user logs out, it's not possible to obtain remote through VNC.
- OS: Oracle Linux 5
- VNC rpm : vnc-server-4.1.2-14.el5_6.6
- Logged in to the server through PuTTY using root (because that's the acount I need to use for logging in through VNC).
- Ran vncpasswd and set the VNC login password.
- Saved the script given in the 1st link as
/etc/init.d/vncserverafter changing the following parameters:
chmod +x /etc/init.d/vncserver.
chkconfig --level 2345 vncserver on.
vi /root/.vnc/xstartupand uncommented the lines:
sh unset SESSION_MANAGER exec /etc/X11/xinit/xinitrcand changed last line from
startx &(since I'm using GNOME).
- Restarted the server.
What happens now is vnc server is listening on two ports 5900 (display 0) and 5901 (display 1) and I can successfully remote to the server through VNC Viewer without actually logging in to the server (it bypasses the lock screen). However, connections on display 0 do not prompt for password which is a cause of concern.
After some research I figured out that securely logging in to the native X-Server on display 0 is a topic in itself.
@slm's answer below and this article highlight the process.
However few things are still unclear to me:
- The directory
/usr/lib/xorg/doesn't exist. Without this the module
libvnc.sois unavailable. Am I using the wrong rpm?
- If I follow this method do I have to undo everything I have done till now?