Linux - Connect VNC to root desktop without console login

Ivan Lawrence -

This is NOT the same screen as when logging in from a keyboard/video/mouse "console".  For remote console access x11vnc must be running and the console must be logged in first.  This is intended to give remote access to the root (virtual) desktop if a console is unavailable.


from: http://wiki.neddix.com/VNC_Server_Installation_on_CentOS

1 Introduction

This document describes how to install the VNC service on a Centos 5 with X Server.
* This currently requires manually starting the vncserver service *

2 Installation of the VNC Package

yum install vnc-server

3 Configure Persistent Desktop Sessions

Make an entry in /etc/sysconfig/vncservers for each user account you want to give VNC access, e.g.

VNCSERVERS="1:root 2:dvssan"
VNCSERVERARGS[1]="-geometry 1024x768"
VNCSERVERARGS[2]="-geometry 1024x768"

4 Set VNC Passwords

Run switch user for each account and set the VNC password

su - <username>
vncpasswd
exit

5 Configure Service Startup

chkconfig vncserver on
service vncserver start

6 Configure Windows Manager

By default the twm Windows Manager is used in a VNC session. To start the default Windows Manager uncomment these two lines in $HOME/.vnc/xstartup

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Restart the VNC Service

service vncserver restart

7 Testing

Run the VNC Viewer, e.g. on a Windows PC and connect to the server. Append the display number to the hostname separated by a colon. E.g. in this sample config

10.0.0.2:1

connects on display :1 as user root.

Have more questions? Submit a request

0 Comments

Article is closed for comments.