Setting up VNC server with resumable sessions in Kubuntu
Monday, November 3, 2008
This article is intended to help others to setup VNC server in Kubuntu 8.04, and is totally based on this discussion in ubuntuforums.org, please read it if you run into troubles or would like to learn more advanced configurations.
Using the VNC service provided in Kubuntu is easy. But the drawback is that you have to login first, and share the desktop with the one sitting in front of the computer too. To get a better experience in using VNC, such as background user login and resumable sessions, vnc4server should be used instead of Krfb desktop sharing.
Install the server package
Run in console:
sudo apt-get install vnc4server xinetd xvnc4viewer
Enable XDMCP in KDE
Run in console:
sudo kate /etc/kde3/kdm/kdmrc
Then find and edit the section [Xdmcp] as the following:
[Xdmcp]
Enable=true
Port=177
Xaccess=/etc/kde3/kdm/Xaccess
Willing=/etc/kde3/kdm/Xwilling
Run in console:
sudo kate /etc/kde3/kdm/Xaccess
Then find and remove the comments as seen in the following lines:
* #any host can get a login window
* CHOOSER BROADCAST #any indirect host can get a chooser
Reboot the computer when finished.
Set the VNC password
Run in console:
sudo vncpasswd /root/.vncpasswd
Then enter the password for connecting to this server.
Add the server to XINETD
Run in console:
sudo kate /etc/xinetd.d/Xvnc
Then enter the content as below:
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/vnc4server
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
Create a link for the font
Run in console:
sudo ln -s /usr/share/fonts/X11 /usr/share/X11/fonts
Reboot.
Test
It should work now. To test the server, run the following in console:
vncviewer localhost:1
If it prompts you to input password, it should be done now!
Posted byWill Tang at 12:05 AM
Labels: kde, kubuntu, linux, vnc
0 comments:
Subscribe to:
Post Comments (Atom)