Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Networking > Issue <<  5 of 354 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 3976
Last update: 08-02-05
Issue:
How do I configure the VNC server included with Red Hat Enterprise Linux 3 to start automatically?
Resolution:

The VNC server can be automatically started when the system boots via the vncserver service. However, before this service will work, some preparatory set up needs to be done.

First, edit the /etc/sysconfig/vncservers file to include the users you want to run VNC servers for. Add a line to that file as follows:

VNCSERVERS="N:user"

Where N is the number of the display you want the VNC server to run on and user is the username you want the server to run as. Multiple displays and users can be specified by placing a space between them, as follows:

VNCSERVERS="N:user1 Y:user2"

Note that if you are using the X Window System, display 0 cannot be used for VNC as it is already being used by X.

For each user you specify, a VNC password needs to be set. VNC passwords are completely separate from the normal system password for that account. A user can set their VNC password by executing the vncpasswd command. For example:

$ vncpasswd
Password:
Verify:

By default, VNC starts up only a simple window manager and a terminal window. If you would like to have the full Red Hat environment, create ~username/.vnc/xstartup and include the following lines:

#!/bin/bash
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Lastly, ensure that the resulting file has the execute bit set:

# chmod 755 ~username/.vnc/xstartup

In order to start the vncserver service immediately, run the following command:

# service vncserver start

For exmaple:

# service vncserver start
Starting VNC server: 1:user1 

In order for the vncserver service to start during the boot sequence, run the following command:

# chkconfig vncserver on

Note this command will simply return a command prompt. For example:

# chkconfig vncserver on
# chkconfig --list vncserver
vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Networking > Issue <<   5  of  354  >>