I run my Raspberry Pi with Raspbian with an X server running but without a monitor connected to it. I installed tightvncserver and now running:

vncserver :1 -geometry 1600x900 -depth 24

I can have a lightdm desktop session to connect to.

However, in this way, a totally new lightdm desktop session is created. This session is different from the one I see on my TV and that eats up another 20 megs of RAM. Obviously, this is not the best solution that can be achieved.

So I installed vino: I've already used it in Ubuntu with almost no problems at all. However, on Raspbian, I'm facing a weird problem when trying to have it launched after the first lightdm login. Given that Desktop Session Settings doesn't allow to add new entries via its graphical interface, I created a vino-server.desktop launcher (that calls /usr/lib/vino/vino-server) and I moved it to /etc/xdg/autostart/. This method also used to work in Knoppix, so I was somewhat confident. In fact, within Desktop Session Settings the new launcher was present and enabled.

After a reboot, no /usr/lib/vino/vino-server process was running. However, I know that the procedure is almost correct, because if I launch another vncserver session, I can see a vino-server process popping up inside the process list.

So the question is: what am I doing wrong? Why does this method work for any other lightdm session except the main one?


Finally I've made it! The procedure was almost correct. I was just missing a few little details.

First, the timings: putting /usr/lib/vino/vino-server directly in lightdm autostart launched it before the X session was completely set-up. So I wrapped it into a script with a little bit of delay before the command:


sleep 5
/usr/lib/vino/vino-server &

In turn, this script was called by a vino-server.desktop launcher, placed into /etc/xdg/autostart/ directory.

Second, permissions: the lightdm config file /etc/lightdm/lightdm.conf was enabling autologin for user pi:

#> grep ^autologin /etc/lightdm/lightdm.conf


But I already created my own user and the wrapper script was in my home folder, so some weird permission issue was preventing its execution. I changed the autologin-user setting in /etc/lightdm/lightdm.conf to my user, and now everything works fine. Finally I can access my :0 display through VNC right after boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.