XVnc, GDM and gksu root access in Debian (Etch)
Notes to self:
(and to any other poor fool who’s (a) been trying to get things set up with the rather elderly inetd.conf file format and (b) trying to get “run as root” applications working in GNOME and been getting various Authentication Rejected-style problems…)
When setting up XVnc in inetd, make sure you provide argv[0], i.e. the program name, as the first parameter in the parameter list, i.e. double up the program name, like:
5901 stream tcp nowait root /usr/bin/Xvnc Xvnc ‑inetd ‑query slave ‑geometry 1440x800 ‑depth 16 ‑once ‑AlwaysShared ‑DisconnectClients=0 ‑SecurityTypes=None
Also, be sure to use your actual hostname (mine is slave — what can I say, I’m a Blake’s 7 fan…) rather than using localhost, otherwise the X authentication mechanisms have a tendency to get sniffy about letting things like gksu work for “root terminal” and other run-as-root applications.
That is, this didn’t let me use gksu to launch applications as root when logged in as a normal user:
5901 stream tcp nowait root /usr/bin/Xvnc Xvnc ‑inetd ‑query localhost …
but this did:
5901 stream tcp nowait root /usr/bin/Xvnc Xvnc ‑inetd ‑query slave …
NB: This is all true in Etch with vnc4; it looks like many things have changed in other releases and versions, so while this may be worth a try, don’t blame me if it doesn’t work :)