Thursday, December 4, 2008

vnc4server

# login to the wireless network's webpage before making connection attempts #

###################################
#Install the required applications:
>sudo apt-get install vnc4server xinetd xvnc4viewer ssh

###################################
#( http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4s... )
>sudo vi /etc/gdm/gdm.conf

#In this file, in the [daemon] section, uncomment (i.e. remove the leading '#' sign)
RemoteGreeter=/usr/lib/gdm/gdmlogin

#In the [security] section, set:
AllowRemoteRoot = false

#In the [xdmcp] section, make sure to set:
Enable=true
HonorIndirect=false

###################################
#Now, to create an entry for xinetd to start each time it receives a connect request:
> sudo vi /etc/xinetd.d/Xvnc

#put the following text:

service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}

###################################
#Create a password for xinetd, by running
> sudo vncpasswd /root/.vncpasswd

###################################
#Restart xinetd by running:
>sudo /etc/init.d/xinetd stop
>sudo killall Xvnc
>sudo /etc/init.d/xinetd start

###################################
#enable remote login in menu ( http://ubuntuforums.org/showthread.php?t=191564 )
# system >> administration >> login Window :: remote tab
# choose "same as local" session

#Click on the "Configure XDMCP..." buton
#Uncheck "Honor indirect request"
#Click Close on both windows

###################################
#Allow xinetd to listen:
>sudo vi /etc/xinetd.conf
#comment out parameter
#only_from = localhost

###################################
#add the user session setup:
> vi ~/.vnc/xstartup

#comment out content and add the lines:
unset SESSION_MANAGER
exec startxfce4

###################################
#Reboot and open a server in a session console:
> vnc4server -geometry 800x600

#note:
# tightVNC for Windows is unstable with key holds
# * use low bandwidth mode
# * connect to session 3 on port 5901 with: 10.10.1.10:3:5901

No comments: