<div>hi guys,</div><div><br></div><div>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.</div><div><br></div><div>Simply I needed to find and use the raw display manager MIT-MAGIC-COOKIE as per x11vnc logfile:</div>
<div><br></div><div>===============================================</div><div><br></div><div><div>** If NO ONE is logged into an X session yet, but there is a greeter login</div><div> program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need</div>
<div> to find and use the raw display manager MIT-MAGIC-COOKIE file.</div></div><div><br></div><div>Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.</div><div><br></div><div>===============================================</div>
<div><br></div><div>which lead me to the right command:</div><div><br></div><div>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</div>
<div><br></div><div>only one question: do you know if lightDM offers a way to run this command once lightDM has finished loading?</div><div><br></div><div>Thank you,</div><div>alfonso</div><div><br><div class="gmail_quote">
On Wed, Oct 19, 2011 at 1:26 AM, Alfonso Fiore <span dir="ltr"><<a href="mailto:alfonso.fiore@gmail.com">alfonso.fiore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><br></div>Hi Robert, Guido,<div><br></div><div>thank you.</div><div><br></div><div>Indeed the log file was a smart idea ;-)</div><div><br></div><div>I found quite a telling line there:</div><div>[+0.01s] WARNING: Can't start VNC server, Xvn is not in the path</div>
<div><br></div><div>in fact I used x11vnc and I didn't have any Xvnc installed.</div><div><br></div><div>So you were all correct, but I still didn't manage :(</div><div><br></div><div>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.</div>
<div><br></div><div>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:</div>
<div><br></div><div><div>lightdm.log:[+0.90s] DEBUG: pam_start("lightdm-autologin", "lightdm") -> (0x8bef588, 0)</div><div>lightdm.log:[+0.90s] DEBUG: pam_authenticate(0x8bef588, 0) -> 0 (Success)</div>
<div>lightdm.log:[+0.90s] DEBUG: pam_acct_mgmt(0x8bef588, 0) -> 0 (Success)</div><div>lightdm.log:[+0.91s] DEBUG: pam_set_item(0x8bef588, 3, ":0") -> 0 (Success)</div><div>lightdm.log:[+0.92s] DEBUG: pam_open_session(0x8bef588, 0) -> 0 (Success)</div>
<div>lightdm.log:[+0.95s] DEBUG: pam_setcred(0x8bef588, PAM_ESTABLISH_CRED) -> 0 (Success)</div><div>lightdm.log:[+1.50s] DEBUG: pam_start("lightdm", "alfonso") -> (0x8c06588, 0)</div></div><div>
<br></div><div>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?</div>
<div><br></div><div>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.</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>e.g.</div><div>[+246.83s] WARNING: Failed to open log file /var/log/lightdm/xvnc-6-greeter.log: Permission denied</div><div><br></div><div>Actually, kind of bad news...</div><div>From here: <a href="http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html?showComment=1167878940000#c1198657880206490449" target="_blank">http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html?showComment=1167878940000#c1198657880206490449</a></div>
<div>I gather that only x11vnc can share the desktop (is it true?)</div><div><br></div><div>This is what I'm trying to achieve. Any chance lightdm can support x11vnc as well?</div><div><br></div><div>Thank you.</div>
<div>
<br></div><div>Good night,</div><div>alfonso</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Wed, Oct 19, 2011 at 12:11 AM, Robert Ancell <span dir="ltr"><<a href="mailto:robert.ancell@gmail.com" target="_blank">robert.ancell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are multiple Xvnc servers available on Ubuntu, the<br>
tightvncserver package contains one.<br>
<div><div></div><div><br>
On 19 October 2011 09:08, Guido Berhoerster <<a href="mailto:gber@opensuse.org" target="_blank">gber@opensuse.org</a>> wrote:<br>
> * Alfonso Fiore <<a href="mailto:alfonso.fiore@gmail.com" target="_blank">alfonso.fiore@gmail.com</a>> [2011-10-18 23:44]:<br>
>> Hello Guido,<br>
>><br>
>> thank you so much. It sounds great.<br>
>><br>
>> Now my /etc/lightdm/lightdm.conf looks like:<br>
>><br>
>> [SeatDefaults]<br>
>> greeter-session=unity-greeter<br>
>> user-session=ubuntu<br>
>><br>
>> [VNCServer]<br>
>> enabled=true<br>
>> port=5900<br>
>><br>
>> but after restarting lightdm (sudo restart lightdm) the port is not open:<br>
>><br>
>> dude@box:~$ netstat -ln | grep 5900<br>
>> dude@box:~$<br>
>><br>
>> I also tried to reboot, but the result is the same.<br>
>><br>
>> do you have any suggestion? maybe some missing package?<br>
><br>
> Do you have Xvnc installed? I don't know what package it's in<br>
> since I don't use Ubuntu.<br>
> --<br>
> Guido Berhoerster<br>
</div></div><div><div></div><div>> _______________________________________________<br>
> LightDM mailing list<br>
> <a href="mailto:LightDM@lists.freedesktop.org" target="_blank">LightDM@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/lightdm" target="_blank">http://lists.freedesktop.org/mailman/listinfo/lightdm</a><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>