[SOLVED] Ubuntu 9.10: Remote VNC Server login problem

Man-wai Chang toylet at changmw.com
Mon Dec 14 02:23:31 PST 2009


After a bit of keyword guessing via google, I found the solution to use 
vnc viewer to login my Ubuntu server over openssh!

1. Modify /etc/gdm/gdm.schemas:

     <schema>
       <key>security/DisallowTCP</key>
       <signature>b</signature>
       <default>false</default>
     </schema>
     <schema>
       <key>xdmcp/Enable</key>
       <signature>b</signature>
       <default>true</default>
     </schema>

2. Create /etc/gdm/custom.conf with the following lines:

[daemon]
RemoteGreeter=/usr/lib/gdm/gdmlogin

[xdmcp]
Enable=true

There is actually not a file /usr/lib/gdm/gdmlogin, but it still works.

3. service gdm restart

4. Add the following line to /etc/services

# Local services
vnc             5901/tcp                        #VNC &GDM
vnc             5902/tcp                        #VNC &GDM (optional)

5. apt-get install xinetd

6. Add a file /etc/xinetd.d/vnc:

service vnc
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/Xtightvnc
server_args = -inetd -query localhost -geometry 1024x768 -depth 16 -once 
-fp /usr/share/fonts/X11/misc
}

7. service xinetd restart

8. Start vnc viewer and connect to ubuntu_ip_address:1

That's all. Here are some relevant links:

https://bugs.launchpad.net/gdm/+bug/408417
http://www.ittidbits.com/blog/?p=92
http://www.karlrunge.com/x11vnc/

-- 
   @~@    http://changmw.homeip.net:8080
  / v \   May the Force and Farce be with you! Linux 2.6.32
/( _ )\  (x86_64 Ubuntu 9.10)  18:23:01 up 8 days 6:16
   ^ ^    1 user load average: 1.02 1.05 1.02



More information about the Linux-users mailing list