User avatar
leol
Posts: 147
Joined: Fri Jan 13, 2012 4:27 pm
Location: Haute-Vienne, France

Virtual Desktop with RealVNC

Wed Mar 08, 2017 11:51 am

Hi,
I'm clearly missing something. I have installed REALVNC server on a Jessie lite pi zero It also installed lots ox X stuff.
When I connect, I just get a black screen. What am I missing?

Leo

fruitoftheloom
Posts: 20487
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 12:07 pm

leol wrote:Hi,
I'm clearly missing something. I have installed REALVNC server on a Jessie lite pi zero It also installed lots ox X stuff.
When I connect, I just get a black screen. What am I missing?

Leo
RealVNC have a Virtual Desktop how to:

https://www.realvnc.com/docs/raspberry- ... pi-virtual

https://www.realvnc.com/raspberrypi
Retired disgracefully.....

User avatar
sconemad
Posts: 228
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 12:42 pm

If you're starting from Jessie lite, then you won't have a desktop environment installed, hence the black screen.

To get the full PIXEL desktop, you'd need to install the raspberrypi-ui-mods package. That should, in theory, pull in all the required dependencies you need. Although it may be simpler just to start over with the full Raspbian Jessie disk image.

If you wanted something more lightweight, you could just install the openbox package, which is the window manager used by LXDE and the PIXEL desktop. This will present you with a black screen by default, and you right-click on the desktop to access the menu. I tend to use this when I have a machine that just runs a fullscreen app (e.g. a media centre).

If you find the desktop environment isn't being launched within your virtual desktop session, then you may also need to configure your xstartup file, see this page for details:
https://support.realvnc.com/knowledgeba ... e/View/345

fruitoftheloom
Posts: 20487
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 1:09 pm

sconemad wrote:If you're starting from Jessie lite, then you won't have a desktop environment installed, hence the black screen.
This is from the link I posted:

Creating and remoting a virtual desktop

If your Raspberry Pi is headless (that is, not plugged into a monitor) or embedded in a robot, it’s unlikely to be running a graphical desktop.

VNC Server can run in Virtual Mode to create a resource-efficient virtual desktop on demand, giving you graphical remote access even when there is no actual desktop to remote. This virtual desktop exists only in your Raspberry Pi’s memory:



.
Retired disgracefully.....

User avatar
sconemad
Posts: 228
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 2:34 pm

The VNC virtual mode server is basically an X server with an in-memory framebuffer, combined with a VNC server.
It doesn't come with a desktop environment (which is what provides the window manager, panels, background wallpaper, etc), so you would normally need to have one installed.

fruitoftheloom
Posts: 20487
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 2:38 pm

sconemad wrote:The VNC virtual mode server is basically an X server with an in-memory framebuffer, combined with a VNC server.
It doesn't come with a desktop environment (which is what provides the window manager, panels, background wallpaper, etc), so you would normally need to have one installed.

Strange title for this post then "" Virtual Desktop with RealVNC""
Retired disgracefully.....

User avatar
leol
Posts: 147
Joined: Fri Jan 13, 2012 4:27 pm
Location: Haute-Vienne, France

Re: Virtual Desktop with RealVNC

Wed Mar 08, 2017 2:46 pm

Thank You
Leo
sconemad wrote:If you're starting from Jessie lite, then you won't have a desktop environment installed, hence the black screen.

To get the full PIXEL desktop, you'd need to install the raspberrypi-ui-mods package. That should, in theory, pull in all the required dependencies you need. Although it may be simpler just to start over with the full Raspbian Jessie disk image.

If you wanted something more lightweight, you could just install the openbox package, which is the window manager used by LXDE and the PIXEL desktop. This will present you with a black screen by default, and you right-click on the desktop to access the menu. I tend to use this when I have a machine that just runs a fullscreen app (e.g. a media centre).

If you find the desktop environment isn't being launched within your virtual desktop session, then you may also need to configure your xstartup file, see this page for details:
https://support.realvnc.com/knowledgeba ... e/View/345

User avatar
ramseyrt
Posts: 23
Joined: Fri Dec 23, 2016 10:57 pm
Location: Niceville, FL
Contact: Website

Re: Virtual Desktop with RealVNC

Sun Jan 21, 2018 1:33 am

Hello,

I'm using a Raspberry Pi 3 connected to the 7" touchscreen display. Unfortunately, most GUIs are too big for the small resolution provided by the touchscreen display (800x480) making some applications unusable. The easy workaround is to use a virtual VNC desktop session over the network for larger GUI based applications.

I've been looking for a way to connect to a virtual desktop session on my Raspberry Pi. When you enable VNC using the raspi-config TUI, it configures VNC to share the connected display. Below is a method to automatically start a virtual desktop at boot.

My environment is a Raspberry Pi 3 connected to the Raspberry Pi 7" touchscreen display running the latest version of Raspbian available as of 7 Aug 2018. I have made no modifications to the OS; it's a fresh install. Ok, here's how you do it:

Note - You do not need to install any software. The VNC application is already installed as part of the base/default Raspbian image.

1.) Create a systemd startup script in /etc/systemd/system/vncvirtualdesktop.service

2.) Fill that file with the following code:

[Unit]
Description=Start VNC Server Virtual Desktop

[Service]
Type=oneshot
ExecStart=/bin/su pi -c '/usr/bin/vncserver -randr=1280x1024'
ExecStop=/usr/bin/vncserver -kill :1
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

3.) Enable that service using systemctl enable vncvirtualdesktop.service

4.) Connect to the Raspberry Pi over the network using a :1 after the IP address or hostname. Use the pi username and password (raspberry is the default).

The code in the startup script creates a virtual desktop that is 1280x1024 in size. If you'd like a different size, substitute my values for whatever suites you.

Enjoy,

Rob

eprostko
Posts: 1
Joined: Sun Sep 23, 2018 9:08 pm

Re: Virtual Desktop with RealVNC

Sun Sep 23, 2018 9:13 pm

Rob thanks for this! I use my RPi to project lyrics at my church, and the projector doesn't have HDMI, only composite video which is low resolution. Whenever I need to change anything, I use RealVNC and change the resolution, which is fine over RealVNC, but disables the projector. Then I'd change it back when I was finished. Two reboots required, and once in a while I would make a mistake that boogered everything up and I had to fix while the whole congregation stares at me.

Now I can use RealVNC to connect to the virtual desktop, edit the lyrics as I need, disconnect, and voila! The lyrics are updated on the projector. This is making my life so much less stressful! Thank you.

stevecems
Posts: 2
Joined: Fri Sep 14, 2018 11:01 pm

Re: Virtual Desktop with RealVNC

Wed Feb 06, 2019 4:50 pm

Thanks Rob, that worked great. Now I have to undo everything I have tried to fix this. I'm upgrading a pitft 3.5" thermometer of my design that uses Jesse. The first thing was to get the display working properly and your help was great.

Steve

madmacks59
Posts: 1
Joined: Fri May 31, 2019 3:04 pm

Re: Virtual Desktop with RealVNC

Fri May 31, 2019 3:15 pm

Rob, your set up and solution are exactly what I needed. I was going crazy trying to develop my Python code (with heavy GPIO and sensor usage) on the tiny 7" touch screen! Now I can sit at my MacBook Pro and do everything I need to and actually see the full IDE I'm using. I have a couple of headless RPis that worked fine with VNC because they had no connected monitor to predefine the screen size. Now, I get the same benefit with the set up you provided the config for. Awesome! Thanks, Gary

davethomaspilot
Posts: 104
Joined: Tue Apr 29, 2014 6:18 pm

Re: Virtual Desktop with RealVNC

Sat Jun 01, 2019 12:40 pm

Is there a way to do something similar with x11vnc?

I haven't figured out a way to do a reverse connection in realVnc like x11vnc supports.

I want an application running on the vncserver host to instruct client machines to connect to the server. The reverse connection feature in realvnc starts a new xsession. There doesn't seem to be a way to reverse connect to an existing one.

It works fine with x11vnc. But, now I need two xsessions running, one for each of two cameras. Headless--I just wanted to be able for an vnc client to connect to one or the other virtual displays.

I've tried using the -create option of x11vnc. I do get a second session I can connect with a vnc client. But, it only has a single lxterminal in it. Somehow, I need to get a window manager running in the new xsession and I can't figure out how to do it.

Or, figure out how to do a reverse connection to an existing session using realvnc.

Return to “Troubleshooting”