Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: x11vnc won't start from /etc/gdm/Init/Default

  1. #1
    Join Date
    Mar 2009
    Beans
    23

    x11vnc won't start from /etc/gdm/Init/Default

    Problem started after upgrade from 9.04 to 9.10.

    On 9.04, I started x11vnc by executing it from /etc/gdm/Init/Default. The command I use is below (personal info replaced with '~':

    /usr/bin/x11vnc -o /var/log/x11vnc -noxdamage -verbose -auth /var/lib/gdm/:1.Xauth -rfbauth /etc/.vncpasswd -rfbport 5900 -shared -forever -bg -scale 3/4 -users ~~~~~ -solid \#003399 -afteraccept "gconftool-2 --type bool --set /desktop/gnome/background/draw_background false" -gone "gconftool-2 --type bool --set /desktop/gnome/background/draw_background true"

    This worked fine, and allowed me to see the GDM login screen from a VNC session on bootup. I later set GDM to auto-login.

    After upgrading to 9.10, x11vnc is not executed, despite that line being in /etc/gdm/Init/Default. The -o option indicates the file to log to, and that file is not changed upon restart of gdm. Placing that line in /etc/gdm/PreSession/Default causes x11vnc to run without error, when autologin is enabled, but I would like x11vnc to be available with the login screen.

    Any ideas why gdm is ignoring /etc/gdm/Init/Default now?

  2. #2
    Join Date
    Dec 2006
    Beans
    810

    Re: x11vnc won't start from /etc/gdm/Init/Default

    I've heard that GDM is much changed in 9.10 and has significantly less functionality.

    However, I suspect /etc/gdm/Init/Default should still be honored. Maybe a mis-configuration from your upgrade?

    BTW, the new GDM no longer support KillInitClients=false:
    and this requires additional workarounds, but I don't think you are at that point yet.
    Last edited by krunge; October 31st, 2009 at 04:41 AM.

  3. #3
    Join Date
    Mar 2009
    Beans
    23

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Thanks!

    I've read your posts in that thread and am grateful for your help. I have compiled and installed the updated version you have there. I was under the impression that x11vnc would manage to log something to the specified logfile before GDM gives it the axe due to KillInitClients no longer being respected. If that is not the case, then maybe I should try the "x11vnc -env X11VNC_AVOID_WINDOWS=120" trick and see if it will write anything to the logfile. At that point I would know that it's doing something. I read somewhere that someone threw a "touch /var/some-file-that-doesnt-exist" into the Init/Default script, and it didn't seem to execute that, either. That's what I'll do if the first idea fails.

    Thanks again!

  4. #4
    Join Date
    Dec 2006
    Beans
    810

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Quote Originally Posted by heltoupee View Post
    I have compiled and installed the updated version you have there. I was under the impression that x11vnc would manage to log something to the specified logfile before GDM gives it the axe due to KillInitClients no longer being respected. If that is not the case, then maybe I should try the "x11vnc -env X11VNC_AVOID_WINDOWS=120" trick and see if it will write anything to the logfile.
    As it dies it should log the XIO error and a bit more, e.g:
    Code:
    caught XIO error:
    15/04/2008 14:12:17 deleted 50 tile_row polling images.
    The I/O error should be obvious: the X server closed its socket with x11vnc. Is this logging not happening for you?

    I am very curious to see how this works on ubuntu 9.10, but don't have the time to set one up right now.

    For the touching a filename, putting this in Init/Default should work:
    Code:
    (x11vnc -whatever ...; touch /var/tmp/foofile) &
    Thanks,

    Karl

  5. #5
    Join Date
    Dec 2006
    Beans
    810

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Well, I set up ubuntu 9.10 in a Virtualbox instance and now I see more what is going on.

    In the new GDM, for the Login Greeter they start up gnome-session, dbus-launch, and metacity! So x11vnc's heuristics to try to guess that the display manager login window is still up and the window manager hasn't started are foiled (because the gdm login greeter looks like a full session.)

    No wonder GDM got rid of KillInitClients=false, they want all of their doo-dad windows to be destroyed after the user logs in!

    I've uploaded a new x11vnc 0.9.9 tarball today that tries to detect this as well (it looks for windows with names like 'gdm-simple-greeter'.) Please try it out when you get the chance.

    Thanks.

  6. #6
    Join Date
    Feb 2009
    Location
    Enigma
    Beans
    64
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Krunge,

    I apologize that I have not had time to get back to you on this, and I sincerely appreciate your reply. I have been deep in some AD stuff at work, and I have had to put my true love, *nix, on the shelf and travel off to "AD Land."

    I discovered something similar, somewhat accidentally. I disabled visual effects last night while logged in via x11vnc (i use your s/w to control all of the machines at my home from my laptop), as I was leting an avi play and the visual effects were jerking the image around. GDM crashed and restarted. After that, I noticed that I was able to login w/o gdm killing the x11vnc process. I meant to post back, but I wanted to wait until I had time to pursue the different options that you presented.

    All of that to say: I believe that you are on the right track, sir!

    I will post back more, when I can dig out of M$ hole that I am in.

    Thank you, Krunge.

  7. #7
    Join Date
    Mar 2009
    Beans
    23

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Here is a little information from my testing methodology.

    Code:
    pjones@pkjones:/tmp$ tail /etc/gdm/Init/Default
          fi
        fi
      fi
    fi
    
    touch /var/doesinitwork
    
    /usr/bin/x11vnc -o /var/log/x11vnc -noxdamage -verbose -auth /var/lib/gdm/:1.Xauth -rfbauth /etc/.vncpasswd -rfbport 5900 -shared -forever -bg -scale 3/4 -users pjones -solid \#003399 -afteraccept "gconftool-2 --type bool --set /desktop/gnome/background/draw_background false" -gone "gconftool-2 --type bool --set /desktop/gnome/background/draw_background true"
    
    exit 0
    Here I show the last couple commands in /etc/gdm/Init/Default. Both of these commands should be run, and indeed do run successfully when I manually run /etc/gdm/Init/Default as root (like gdm should do).

    Code:
    pjones@pkjones:/tmp$ ls /var
    backups  crash  lib    lock  mail  run    tmp
    cache    games  local  log   opt   spool  www
    you can see that /var/doesinitwork is not created.

    Code:
    pjones@pkjones:/tmp$ sudo ps -aef | grep x11vnc
    [sudo] password for pjones:
    pjones    3276  3228  0 11:01 pts/1    00:00:00 grep x11vnc
    and that x11vnc is not running

    Code:
    pjones@pkjones:/tmp$ tail /var/log/x11vnc
    03/11/2009 08:10:09  PointerEvent        :   4164 |     24984/    24984 (  0.0%)
    03/11/2009 08:10:09  FramebufferUpdate   :    825 |      8250/     8250 (  0.0%)
    03/11/2009 08:10:09  SetEncodings        :      1 |        72/       72 (  0.0%)
    03/11/2009 08:10:09  SetPixelFormat      :      1 |        20/       20 (  0.0%)
    03/11/2009 08:10:09  TOTALS              :   5187 |     34894/    34894 (  0.0%)
    caught signal: 15
    03/11/2009 08:10:32 deleted 105 tile_row polling images.
    extra[1] signal: -1
    XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"
          after 2116201 requests (2116200 known processed) with 0 events remaining.
    The machine was rebooted at 8:10, so the final line in the log was the running x11vnc process dieing. There are no more lines logged to the file from an x11vnc instance starting up after reboot.

    Thank you again for your help on this. Sorry if I'm being dense, but the link in the other thread, http://x11vnc.sourceforge.net/dev/x11vnc-0.9.9.tar.gz , should be the new version your previous post spoke about? If so, I'll give that a try and see if that works any better. Is it correct that the 'touch /var/doesinitwork' should get executed, and I should see that file in /var?

    Thanks!

  8. #8
    Join Date
    Dec 2006
    Beans
    810

    Re: x11vnc won't start from /etc/gdm/Init/Default

    touch /var/doesinitwork
    Yes, that file not appearing is a problem. However why not use /var/tmp/doesinitwork to be sure write permission exists? (i.e. perhaps the script is being run as non-root user...)
    Thank you again for your help on this. Sorry if I'm being dense, but the link in the other thread,http://x11vnc.sourceforge.net/dev/x11vnc-0.9.9.tar.gz , should be the new version your previous post spoke about? If so, I'll give that a try and see if that works any better. Is it correct that the 'touch /var/doesinitwork' should get executed, and I should see that file in /var?
    Yes, 0.9.9 is the development version and I update that tarball regularly.

    Try /var/tmp/something just to be sure. However, from your other statements it appears you are correct in that the script is not being run. I will try on my ubuntu 9.10 test image.

  9. #9
    Join Date
    Dec 2006
    Beans
    810

    Re: x11vnc won't start from /etc/gdm/Init/Default

    On my ubuntu 9.10 test machine I put this line in the /etc/gdm/Init/Default script:
    Code:
    /home/fred/x11vnc.new -o /var/tmp/x11vnc_test.log -forever -bg
    near the bottom right before the "exit 0" line in the script. /home/fred/x11vnc.new is the x11vnc built from the latest x11vnc-0.9.9 tarball link above. I then restarted GDM.

    It works great for me. I can connect with a VNC viewer and get the GDM login panel, then login and get a desktop session. x11vnc is not disconnected; it works as we want it to. It flies in under the radar of the GDM kill initial clients and survives.

    Let me know if it works for you.

    BTW, for others reading this thread, also note that the heuristics I put in for this GDM problem also work around the following Xorg server crash bug:
    which, sadly, still happens in ubuntu 9.10 and has been there since 8.10.
    Last edited by krunge; November 4th, 2009 at 05:19 AM.

  10. #10
    Join Date
    Mar 2009
    Beans
    23

    Re: x11vnc won't start from /etc/gdm/Init/Default

    Cool. Thanks. I will give that new version a try. According to GDM documentation (http://projects.gnome.org/gdm/docs/2...iguration.html) , Init/Default is supposed to get run as root. Searching google for 'GDM Init/Default' turns up several others having problems with init scripts not running, but it seems to be hit-and-miss, like we have here, and the solutions I'm finding (switch to kdm) aren't really that acceptable .

    I get the feeling that this is due to me having run the upgrade from 9.04 to 9.10, and I assume you just installed 9.10 straight away. I wonder if something went wrong in the upgrade.

Page 1 of 4 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
  •