Thanks to Crass Spektakel for Post #605 above! I got this working on Lucid Lynx, Ubuntu Studio edition, with some minor changes.
Here is an exact copy of one stanza in my file /etc/xinetd.d/Xvnc. This one serves the netbook:
Code:
service vnc1024x600
{
type = UNLISTED
disable = no
port = 5911
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc4
server_args = -inetd -once -SecurityTypes None -geometry 1000x600 -depth 24 -fp /usr/share/fonts/X11/misc/ -co /usr/share/X11/rgb -query localhost
log_type = SYSLOG daemon info
log_on_failure = HOST
log_on_success = PID HOST EXIT
}
The added logging commands helped me figure out some changes suggested below.
I inserted one corresponding line in the lengthy file /etc/services, as follows:
Code:
vnc1024x600 5911/tcp # VNC 1024x600 @ 24bpp
(Perhaps the "UNLISTED" directive in the Xvnc file makes this redundant, but I want to thoroughly document everything. The port number 5911 shown here must match the port number declared in the Xvnc file shown above.)
Here is my key difference from the cited post (without this my connection attempts would flash a grey X screen for a fraction of a second and then quit). I had to add two extra lines to the end of the suggested gdm configuration file. Here is an exact copy of my complete file /etc/gdm/custom.conf:
Code:
[security]
DisallowTCP=false
[xdmcp]
Enable=true
MaxSessions=16
DisplaysPerHost=2
The cited post also mentions a file named /etc/X11/xserver/SecurityPolicy. My system does not even have a directory named /etc/X11/xserver, so I skipped the creation of this file. The setup works anyway.
Every time you change the file /etc/xinetd.d/Xvnc, it is necessary to restart the xinetd server *as root* ("sudo /etc/init.d/xinetd restart"). [When I forgot "sudo", the system supplied a user-mode xinetd server in addition to the system-wide one, and things got confusing.] Similarly, changes to /etc/gdm/custom.conf don't actually take effect until you restart the display manager ("sudo service gdm restart"). Note that restarting gdm terminates your session completely and sends you back to the login screen instantly.
As a preliminary step, I used the command line to practice giving the Xvnc command that the xinetd daemon would ultimately emit. I picked a port number different from the ones xinetd was busy listening to (my choice was 5903) and replaced the option "-inetd" with the string ":3" to get this command. No need to run as root:
Code:
$ Xvnc4 :3 -SecurityTypes None -geometry 1000x600 -depth 24 -fp /usr/share/fonts/X11/misc/ -co /usr/share/X11/rgb -query localhost
Seeing a small-sized greeter screen in response to "vncviewer localhost:3" meant it was safe to take the next step and get xinetd involved. Of course there were many failures before this point, and they came with helpful messages -- something you don't get when relying on xinetd!
Bookmarks