[LightDM] can't connect to display before login

Alfonso Fiore alfonso.fiore at gmail.com
Wed Oct 19 11:51:16 PDT 2011


hi guys,

it took quite some reading (actually a lot of bad reading and very little
good reading in the log of x11vnc) but I found a solution.

Simply I needed to find and use the raw display manager MIT-MAGIC-COOKIE as
per x11vnc logfile:

===============================================

** 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.

Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.

===============================================

which lead me to the right command:

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

only one question: do you know if lightDM offers a way to run this command
once lightDM has finished loading?

Thank you,
alfonso

On Wed, Oct 19, 2011 at 1:26 AM, Alfonso Fiore <alfonso.fiore at gmail.com>wrote:

>
> Hi Robert, Guido,
>
> thank you.
>
> Indeed the log file was a smart idea ;-)
>
> I found quite a telling line there:
> [+0.01s] WARNING: Can't start VNC server, Xvn is not in the path
>
> in fact I used x11vnc and I didn't have any Xvnc installed.
>
> So you were all correct, but I still didn't manage :(
>
> I tried installing tightvncserver but I got access to a new session, but
> instead I'm looking to enable desktop sharing. I tried for a good hour to
> find how to share the main desktop with tightvnc and then I gave up.
>
> So I tried also installing vnc4server which has some problem regarding
> authentication. I get an error in my client: "no password configured for vnc
> auth" but also I wasn't capable to debug this either. It has probably to do
> with pam, but I didn't manage to debug the issue:
>
> lightdm.log:[+0.90s] DEBUG: pam_start("lightdm-autologin", "lightdm") ->
> (0x8bef588, 0)
> lightdm.log:[+0.90s] DEBUG: pam_authenticate(0x8bef588, 0) -> 0 (Success)
> lightdm.log:[+0.90s] DEBUG: pam_acct_mgmt(0x8bef588, 0) -> 0 (Success)
> lightdm.log:[+0.91s] DEBUG: pam_set_item(0x8bef588, 3, ":0") -> 0 (Success)
> lightdm.log:[+0.92s] DEBUG: pam_open_session(0x8bef588, 0) -> 0 (Success)
> lightdm.log:[+0.95s] DEBUG: pam_setcred(0x8bef588, PAM_ESTABLISH_CRED) -> 0
> (Success)
> lightdm.log:[+1.50s] DEBUG: pam_start("lightdm", "alfonso") -> (0x8c06588,
> 0)
>
> I see Xvnc is started as /usr/bin/Xvnc :6 -auth /var/run/lightdm/root/:6
> -inetd -nolisten tcp but I don't see the -rfbauth to point to the password
> file. Is there a chance to manually add such option?
>
> If I run for example "Xvnc :0 -rfbauth /etc/x11vnc.pass" directly at prompt
> I can authenticate but still I don't get to share the main desktop.
>
> I also tried to create a symbolic link from x11vnc to Xvnc since I know
> x11vnc works fine, but since x11vnc doesn't have options for running with
> inetd, it didn't work.
>
> Incidentally, at least in Ubuntu 11.10, /var/log/lightdm has
> permissions drwxr-xr-x but lightdm tries to create log files there with
> user lightdm and fails. So I had to change permissions to 777.
>
> e.g.
> [+246.83s] WARNING: Failed to open log file
> /var/log/lightdm/xvnc-6-greeter.log: Permission denied
>
> Actually, kind of bad news...
> From here:
> http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html?showComment=1167878940000#c1198657880206490449
> I gather that only x11vnc can share the desktop (is it true?)
>
> This is what I'm trying to achieve. Any chance lightdm can support x11vnc
> as well?
>
> Thank you.
>
> Good night,
> alfonso
>
> On Wed, Oct 19, 2011 at 12:11 AM, Robert Ancell <robert.ancell at gmail.com>wrote:
>
>> There are multiple Xvnc servers available on Ubuntu, the
>> tightvncserver package contains one.
>>
>> On 19 October 2011 09:08, Guido Berhoerster <gber at opensuse.org> wrote:
>> > * Alfonso Fiore <alfonso.fiore at gmail.com> [2011-10-18 23:44]:
>> >> Hello Guido,
>> >>
>> >> thank you so much. It sounds great.
>> >>
>> >> Now my /etc/lightdm/lightdm.conf looks like:
>> >>
>> >> [SeatDefaults]
>> >> greeter-session=unity-greeter
>> >> user-session=ubuntu
>> >>
>> >> [VNCServer]
>> >> enabled=true
>> >> port=5900
>> >>
>> >> but after restarting lightdm (sudo restart lightdm) the port is not
>> open:
>> >>
>> >> dude at box:~$ netstat -ln | grep 5900
>> >> dude at box:~$
>> >>
>> >> I also tried to reboot, but the result is the same.
>> >>
>> >> do you have any suggestion? maybe some missing package?
>> >
>> > Do you have Xvnc installed? I don't know what package it's in
>> > since I don't use Ubuntu.
>> > --
>> > Guido Berhoerster
>> > _______________________________________________
>> > LightDM mailing list
>> > LightDM at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/lightdm
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/lightdm/attachments/20111019/aa70523a/attachment.htm>


More information about the LightDM mailing list