Q I connect to my home server using VNC (not over SSH yet!). However, it doesn't bring up my 'start' bar on KDE and I automatically log in as the person who started the VNC server (not tested with root!). I would like my system (Slackware 10.2) to start VNC on boot so I can vnc to the XDM/KDE login screen. My init is currently set to level 4. Any ideas, hints or advice on better software? My server doesn't have a monitor.
A Here's what you need to do to configure a VNC server. Note: the VNC server must be running, and it must be configured to run your preferred window manager. You can do this by editing the file $HOME/.vnc/xstartup to call your preferred window manager. Use startkde & for KDE, gnome-session & for Gnome or fvwm2 & for Fvwm2. Also, make sure you have run vncpasswd in $HOME/.vnc/passwd to create the password file. Red Hat provides an easy way to start up the VNC desktop at boot time. Use linuxconf to set the vncserver boot script (in /etc/init.d/vncserver) to come up at boot. The default bootscript, however, doesn't quite give the flexibility that I'd prefer. Edit /etc/init.d/vncserver, looking for the line that says
su - ${display##*:} -c \"cd && [ -f .vnc/passwd ] && vncserver :${display%%:*}\"
Change it to look like this:
su - ${display##*:} -c \"cd && [ -f .vnc/ passwd ] && vncserver ${ARGS} :${display%%:*}\"
Then edit /etc/sysconfig/vncservers to this:
# The VNCSERVERS variable is a list of # display: user pairs. # Uncomment the line below to start a VNC # server on display :1 as my 'myusername' # (adjust # this to your own). # You will also need to set a VNC password; # run 'man vncpasswd' to see how to do # that. # DO NOT RUN THIS SERVICE if your local # area network is untrusted! For a secure # way of using VNC, see <URL:http://www. # uk.research.att.com/vnc/sshvnc.html>. VNCSERVERS="1:jdimpson" ARGS="-geometry 1024x768 -alwaysshared"
Change the value 1024x768 in ARGS to represent the size of your actual X desktop. Add any other VNC server arguments that you wish to this ARGS variable. Also change jdimpson in VNCSERVERS to whatever user you wish to run the VNC desktop. The value 1 in VNCSERVERS makes the VNC server run as display 1. You can have additional desktops come up like this:
VNCSERVERS="1:jdimpson 2:phred 3:sysadmin"
On a Red Hat system, make sure the VNC server is running by executing this:
/etc/init.d/vncserver start
At this point, you can connect to the VNC desktop using any VNC client.