<div><br></div><div>Hello Robert and thank you.</div><div><br></div><div>a user at <a href="http://ubuntuforums.org">ubuntuforums.org</a> suggests an other way:</div><div><br></div><a href="http://ubuntuforums.org/showthread.php?t=1860295">http://ubuntuforums.org/showthread.php?t=1860295</a><div>
<br></div><div>create a file /etc/init/x11vnc.conf which does:</div><div><br></div><div><div>start on login-session-start</div><div>script</div><div>/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log</div>
<div>end script</div><div><br></div><div>and it works!</div><div><br></div><div>Thanks a lot for the support!</div><br><div class="gmail_quote">On Mon, Oct 24, 2011 at 10:51 PM, Robert Ancell <span dir="ltr"><<a href="mailto:robert.ancell@gmail.com">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;">Hi Alfonso,<br>
<br>
display-setup-script is run once the X server starts and before anyone<br>
logs in. session-setup-script is run before a session is started.<br>
<br>
Set:<br>
[SeatDefaults]<br>
display-setup-script=/my/script<br>
<br>
And set /my/script to :<br>
sudo /usr/bin/x11vnc -noxrecord -noxfixes -noxdamage -rfbauth<br>
<div class="im">/etc/x11vnc.pass -forever -bg -rfbport 5900 -o > /tmp/x11vnc.log<br>
<br>
</div>Should do the trick (haven't tested it myself).<br>
<div><div></div><div class="h5"><br>
On 19 October 2011 14:51, Alfonso Fiore <<a href="mailto:alfonso.fiore@gmail.com">alfonso.fiore@gmail.com</a>> wrote:<br>
> hi guys,<br>
> it took quite some reading (actually a lot of bad reading and very little<br>
> good reading in the log of x11vnc) but I found a solution.<br>
> Simply I needed to find and use the raw display manager MIT-MAGIC-COOKIE as<br>
> per x11vnc logfile:<br>
> ===============================================<br>
> ** If NO ONE is logged into an X session yet, but there is a greeter login<br>
> program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need<br>
> to find and use the raw display manager MIT-MAGIC-COOKIE file.<br>
> Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.<br>
> ===============================================<br>
> which lead me to the right command:<br>
> sudo /usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes<br>
> -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o<br>
> /tmp/x11vnc.log<br>
> only one question: do you know if lightDM offers a way to run this command<br>
> once lightDM has finished loading?<br>
> Thank you,<br>
> alfonso<br>
> On Wed, Oct 19, 2011 at 1:26 AM, Alfonso Fiore <<a href="mailto:alfonso.fiore@gmail.com">alfonso.fiore@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Robert, Guido,<br>
>> thank you.<br>
>> Indeed the log file was a smart idea ;-)<br>
>> I found quite a telling line there:<br>
>> [+0.01s] WARNING: Can't start VNC server, Xvn is not in the path<br>
>> in fact I used x11vnc and I didn't have any Xvnc installed.<br>
>> So you were all correct, but I still didn't manage :(<br>
>> I tried installing tightvncserver but I got access to a new session, but<br>
>> instead I'm looking to enable desktop sharing. I tried for a good hour to<br>
>> find how to share the main desktop with tightvnc and then I gave up.<br>
>> So I tried also installing vnc4server which has some problem regarding<br>
>> authentication. I get an error in my client: "no password configured for vnc<br>
>> auth" but also I wasn't capable to debug this either. It has probably to do<br>
>> with pam, but I didn't manage to debug the issue:<br>
>> lightdm.log:[+0.90s] DEBUG: pam_start("lightdm-autologin", "lightdm") -><br>
>> (0x8bef588, 0)<br>
>> lightdm.log:[+0.90s] DEBUG: pam_authenticate(0x8bef588, 0) -> 0 (Success)<br>
>> lightdm.log:[+0.90s] DEBUG: pam_acct_mgmt(0x8bef588, 0) -> 0 (Success)<br>
>> lightdm.log:[+0.91s] DEBUG: pam_set_item(0x8bef588, 3, ":0") -> 0<br>
>> (Success)<br>
>> lightdm.log:[+0.92s] DEBUG: pam_open_session(0x8bef588, 0) -> 0 (Success)<br>
>> lightdm.log:[+0.95s] DEBUG: pam_setcred(0x8bef588, PAM_ESTABLISH_CRED) -><br>
>> 0 (Success)<br>
>> lightdm.log:[+1.50s] DEBUG: pam_start("lightdm", "alfonso") -> (0x8c06588,<br>
>> 0)<br>
>> I see Xvnc is started as /usr/bin/Xvnc :6 -auth /var/run/lightdm/root/:6<br>
>> -inetd -nolisten tcp but I don't see the -rfbauth to point to the password<br>
>> file. Is there a chance to manually add such option?<br>
>> If I run for example "Xvnc :0 -rfbauth /etc/x11vnc.pass" directly at<br>
>> prompt I can authenticate but still I don't get to share the main desktop.<br>
>> I also tried to create a symbolic link from x11vnc to Xvnc since I know<br>
>> x11vnc works fine, but since x11vnc doesn't have options for running with<br>
>> inetd, it didn't work.<br>
>> Incidentally, at least in Ubuntu 11.10, /var/log/lightdm has<br>
>> permissions drwxr-xr-x but lightdm tries to create log files there with<br>
>> user lightdm and fails. So I had to change permissions to 777.<br>
>> e.g.<br>
>> [+246.83s] WARNING: Failed to open log file<br>
>> /var/log/lightdm/xvnc-6-greeter.log: Permission denied<br>
>> Actually, kind of bad news...<br>
>> From<br>
>> 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><br>
>> I gather that only x11vnc can share the desktop (is it true?)<br>
>> This is what I'm trying to achieve. Any chance lightdm can support x11vnc<br>
>> as well?<br>
>> Thank you.<br>
>> Good night,<br>
>> alfonso<br>
>> On Wed, Oct 19, 2011 at 12:11 AM, Robert Ancell <<a href="mailto:robert.ancell@gmail.com">robert.ancell@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> There are multiple Xvnc servers available on Ubuntu, the<br>
>>> tightvncserver package contains one.<br>
>>><br>
>>> On 19 October 2011 09:08, Guido Berhoerster <<a href="mailto:gber@opensuse.org">gber@opensuse.org</a>> wrote:<br>
>>> > * Alfonso Fiore <<a href="mailto:alfonso.fiore@gmail.com">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<br>
>>> >> 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>
>>> > _______________________________________________<br>
>>> > LightDM mailing list<br>
>>> > <a href="mailto:LightDM@lists.freedesktop.org">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>
>><br>
><br>
><br>
> _______________________________________________<br>
> LightDM mailing list<br>
> <a href="mailto:LightDM@lists.freedesktop.org">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>
><br>
</div></div></blockquote></div><br></div>