
Originally Posted by
Underpants
I use this to run x11vnc for my gnome based systems.
Code:
/etc/xinetd.d/x11vnc
service x11vnc
{
...
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -localhost
}
can anyone assist in changing this to work with a KDE/Kubuntu system?
For KDM (or XDM) display manager it will be tricky because the -auth filename is random. E.g. on a KDM running system I have, "ps wwwwwaux | grep auth" reveals the auth file:
Code:
/usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-ghswan
So the "/var/lib/xdm/authdir/authfiles/A:0-ghswan" will change each reboot, etc.
The only way I can think of handling this is via a wrapper script, say:
Code:
/etc/xinetd.d/x11vnc
service x11vnc
{
...
server = /usr/local/bin/x11vnc_WRAPPER
server_args =
}
where /usr/local/bin/x11vnc_WRAPPER might look like:
Code:
#!/bin/sh
authfile=`ps wwwwwaux | grep '/X.*-auth' | grep -v grep | sed -e 's/^.*-auth *//' -e 's/ .*$//' | head -n 1`
if [ -r "$authfile" ]; then
exec /usr/bin/x11vnc -inetd -o /var/log/x11vnc.log -display :0 -auth "$authfile" -localhost
fi
exit 1
(untested)
In the x11vnc 0.9.3 dev tarball this is automated to some degree. I believe the x11vnc cmdline would be something like:
Code:
server_args = -inetd -o /var/log/x11vnc.log -find -env FD_XDM=1 -localhost
This works from the cmdline; but I haven't tried with inetd yet.
Bookmarks