Results 1 to 10 of 637

Thread: HOWTO: Set up VNC server with resumable sessions

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Beans
    193

    Re: HOWTO: Set up VNC server with resumable sessions

    I use this to run x11vnc for my gnome based systems.


    Code:
    /etc/xinetd.d/x11vnc
    
    service x11vnc
    {
            port            = 5900
            type            = UNLISTED
            socket_type     = stream
            protocol        = tcp
            wait            = no
            user            = root
            server          = /usr/bin/x11vnc
            server_args     = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -localhost
            disable         = no
    }
    can anyone assist in changing this to work with a KDE/Kubuntu system?

  2. #2
    Join Date
    Dec 2006
    Beans
    810

    Re: HOWTO: Set up VNC server with resumable sessions

    Quote Originally Posted by Underpants View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •