Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: X11VNC on 11.10 (was working with 11.04)

  1. #1
    Join Date
    Oct 2011
    Beans
    12

    [SOLVED] X11VNC on 11.10.

    EDITED THREAD: Jump to reply #20 for the final outcome, and how to have X11VNC start with your computer and continue listening for a new connection after user logout.

    __________________________________________________ _______________________
    Ok I did more than my due dilligance and have spent the better part of today searching both this site and the web as a whole

    quick rundown: running 11.10 server 32bit with an x desktop (Gnome3). Previous to today was running 11.04 on it. I was able (with NN) to SSH into my box then run VNC with localhost:1 (ssh forwarding 5901 to 5900). Upgraded to OO and can no longer use x11vnc to connect and log in. (or even connect once logged in)
    Am connecting via putty with a key on a Windows box
    have tried UltraVNC and SSVNC with neither doing anything

    more detail:
    have tried to manually placing
    Code:
    /usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -o /var/log/x11vnc.log -forever -bg -rfbport 5900 -nomodtweak
    in both /etc/gdm/Init/Default (where it was and worked in NN) and /etc/rc.local (removing the previous one before I did so as not to have it called twice)
    I have uninstalled and reinstalled x11vnc and x11vnc data
    I have removed vino (share desktops) to see if perhaps the two were fighting
    I have tried to manually run x11vnc from SSH command line and from terminal on the box. (EDIT: about 10% of the time I can get the server started this way with the command sudo x11vnc -localhost -display :0. But on VNC connection I get the end of stream "maybe another user is listening" error).

    None of which have allowed a VNC connection

    kinda banging my head against the wall. Server is meant to be a keyboardless and mouseless (and monitorless) box. don't need GUI often but when I do, it is often after a reboot, I don't want to have to go into my server room plug a bunch of stuff and log in just so I can reach it via vino every reboot)

    not sure what other information I need to provide.

    I really hope this doesn't end up being an unanswered question as I'm sure many upgraders are going to encounter this issue.
    Last edited by nergaldicuthah; October 25th, 2011 at 07:19 PM.

  2. #2
    Join Date
    Oct 2011
    Beans
    1

    Re: X11VNC on 11.10 (was working with 11.04)

    Not sure how to fix it yet, but the problem is that 11.10 doesn't use gdm anymore, it uses lightdm.

  3. #3
    Join Date
    Feb 2005
    Location
    Swindon, UK
    Beans
    47

    Re: X11VNC on 11.10 (was working with 11.04) & AVIDEMUX

    Quote Originally Posted by alexcode View Post
    Not sure how to fix it yet, but the problem is that 11.10 doesn't use gdm anymore, it uses lightdm.
    Is that why AVIDEMUX is missing?
    Ubuntu 10.10, 11.04 & Pupeee Linux

  4. #4
    Join Date
    Oct 2011
    Beans
    1

    Re: X11VNC on 11.10 (was working with 11.04)

    I think (correct me if I'm wrong) it's because x11vnc require authorization (MIT-MAGIC-COOKIE) to connect to the xserver that lightdm is using.

    When trying to start x11vnc with sudo add the following to your cmd line..

    -auth /var/run/lightdm/root/:0

    This should allow you to log in using lightdm.

    (note in my experience the -forever arg doesn't seem to keep the vnc server running like it should maybe I'm doing something wrong)

  5. #5
    Join Date
    Oct 2011
    Beans
    12

    Re: X11VNC on 11.10 (was working with 11.04)

    okay so we're on our way

    if I ps I get
    Code:
    pstar@computer:~$ ps wwwwaux | grep auth
    root     13745  0.3  0.7  19652  7340 tty7     Ss+  11:18   0:01 /usr/bin/X :0  auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
    pstar    13857  0.0  0.0   4184   796 pts/0    S+   11:23   0:00 grep --color=auto auth
    which does seem to show a similar cookie
    /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch


    (note that "sudo x11vnc -auth /var/run/lightdm/root/:0" by itself error'd out as did a few different permutations of my above code plus that)

    -forever (pre 11.10) would keep the session until reboot Placing the code in post 1 into GDM (and then trying to add it to LDM) would start the VNC server at boot.

    I'm having issue even using VINO in this darn 11.10 upgrade.

    is there a way to have to GUI clients (Gnome and LDXE) without having to blow the entire box away, and then to have VNC boot LDXE?

    EDIT hmm either I'm not using findauth correct or I may have found part of the issue
    (findauth by itself does nothing)
    but
    Code:
    sudo x11vnc -findauth /var/run/lightdm/root:0
    [: 381: -a: unexpected operator
    [: 381: -a: unexpected operator
    [: 381: -a: unexpected operator
    Last edited by nergaldicuthah; October 17th, 2011 at 06:48 PM.

  6. #6
    Join Date
    Nov 2007
    Beans
    187

    Re: X11VNC on 11.10 (was working with 11.04)

    Hi,

    Are you trying to run x11vnc AT ALL or run it at startup?

    The /etc/gdm/Init/Default trick doesn't work anymore cause as alexcode said gdm is no more there.
    I'm trying myself to figure out how to start it at startup.

    /etc/rc.local is way too early and it fact I get error:

    Code:
    18/10/2011 18:55:16 *** XOpenDisplay failed (:0)
    But if you want to run x11vnc, this works (ONLY if you are logged in manually already):

    Code:
    sudo apt-get install x11vnc
    sudo x11vnc -storepasswd /etc/x11vnc.pass
    sudo chmod 644 /etc/x11vnc.pass
    /usr/bin/x11vnc -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log
    I'm trying to figure out where to place this line to start it at each startup!

    Right now I'm looking at:

    /etc/X11/xinit/xinitrc
    /etc/X11/xinit/xserverrc

    but I don't have any positive result yet.

    so does it work for you if you're logged in? So that we can be all on the same page...

  7. #7
    Join Date
    Oct 2011
    Beans
    12

    Re: X11VNC on 11.10 (was working with 11.04)

    Quote Originally Posted by alfonso78 View Post
    Hi,

    Are you trying to run x11vnc AT ALL or run it at startup?
    at startup (though AT ALL isn't even consistently working yet (previous to your suggestion which will have to wait til I get to work tomorrow )


    Quote Originally Posted by alfonso78 View Post
    The /etc/gdm/Init/Default trick doesn't work anymore cause as alexcode said gdm is no more there.
    Yes.
    Quote Originally Posted by alfonso78 View Post
    I'm trying myself to figure out how to start it at startup.

    /etc/rc.local is way too early and it fact I get error:
    I have also tried placing it in rc.local
    per http://satisfy123.blog.com/2011/08/22/x11vnc-ubuntu/ (I placed mine at the very bottom before the exit command (probably not the right place )
    if you are using lightdm, put this in /etc/rc.local
    to no avail; I did not get that error, that I saw at least, do you get that during boot? (where'd you pull that error out of and I'll look at work to see if I have similar ones?).
    Quote Originally Posted by alfonso78 View Post
    But if you want to run x11vnc, this works (ONLY if you are logged in manually already):

    Code:
    sudo apt-get install x11vnc
    sudo x11vnc -storepasswd /etc/x11vnc.pass
    sudo chmod 644 /etc/x11vnc.pass
    /usr/bin/x11vnc -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log
    I'm trying to figure out where to place this line to start it at each startup!

    Right now I'm looking at:

    /etc/X11/xinit/xinitrc
    /etc/X11/xinit/xserverrc

    but I don't have any positive result yet.

    so does it work for you if you're logged in? So that we can be all on the same page...
    I will also try these out as soon as I get back to work. I'm lucky this is a squid server and not an everyday PC (or my home media server, that I really need to VNC into)
    Last edited by nergaldicuthah; October 19th, 2011 at 03:24 AM.

  8. #8
    Join Date
    Nov 2007
    Beans
    187

    Re: X11VNC on 11.10 (was working with 11.04)

    Hi,

    I'm still working on this...

    I asked support in the lightDM mailing list and I got a tiny bit forward: now I can start a VNC from lightDM, but not x11vnc:

    http://lists.freedesktop.org/archive...er/000163.html

    The big problem, I think, it's that I can run x11vnc AFTER I login into my box, but not when the lightDM login screen is shown, so it doesn't matter where I try to launch x11vnc in the various scripts, since it won't work until I login into the box!!!!

    Now I hope to get more support from the nice guys at lightDM mailing list.

  9. #9
    Join Date
    Nov 2007
    Beans
    187

    Re: X11VNC on 11.10 (was working with 11.04)

    Ok, I found 80% of the solution.

    now I can run x11vnc correctly (i.e. I can connect to the login prompt).

    I only had to read the log file really...

    when you try to run x11vnc before logging in, the log file will tell you (among other things):

    Code:
    ** If NO ONE is logged into an X session yet, but there is a greeter login
       program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
       to find and use the raw display manager MIT-MAGIC-COOKIE file.
       Some examples for various display managers:
    
         gdm:     -auth /var/gdm/:0.Xauth
                  -auth /var/lib/gdm/:0.Xauth
         kdm:     -auth /var/lib/kdm/A:0-crWk72
                  -auth /var/run/xauth/A:0-crWk72
         xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
         dtlogin: -auth /var/dt/A:0-UgaaXa
    
       Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.
    Which brings me to the right command to start x11vnc:

    Code:
    sudo /usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log
    it works for me and it's great!

    now only last step is where to add this so that is runs automatically at startup. But I can run this from ssh so I'm already quite happy!

  10. #10
    Join Date
    Oct 2011
    Beans
    12

    Re: X11VNC on 11.10 (was working with 11.04)

    Code:
    sudo /usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log

    when I run that I just immediatly get a new cmd prompt (no scrolling X11VNC log) and still no connect

    Although with this I do get the another user is listening error with localhost:5901 (with putty redirecting localhost 5901 to {IPWITHELD} 5900

    should I modify to match my
    ps wwwwaux | grep auth
    __________________________________________________ __________________________________________________ _________________________________________
    If I run
    Code:
     /usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -localhost
    PuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attempted19/10/2011 15:19:17 XOpenDisplay("localhost:10.0") failed.
    19/10/2011 15:19:17 Trying again with XAUTHLOCALHOSTNAME=localhost ...
    PuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attempted
    Last edited by nergaldicuthah; October 19th, 2011 at 10:21 PM.

Page 1 of 3 123 LastLast

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
  •