Gimbal
Posts: 51
Joined: Tue Jan 05, 2016 1:16 pm
Location: SW UK

Raspbian with RPI Desktop and RealVNC

Thu Sep 29, 2016 8:58 am

Hi,
I've just done a clean install of the latest image (including Pixel) and all went swimmingly until I tried to get realVNC up and running.

I've enabled it in the settings but while I can start the Viewer, I cant seem to get the server started.
I know it's now supposed to start automatically but after several reboots I still don't get the icon in the taskbar as described here:
https://www.realvnc.com/docs/raspberry- ... pi-connect

It's been a long week and I'm tired......am I doing something dim?

Any help would be massively appreciated.

thanks

Gimbal
Posts: 51
Joined: Tue Jan 05, 2016 1:16 pm
Location: SW UK

Re: Pixel and RealVNC

Thu Sep 29, 2016 10:29 am

I have had some success since my first post.

The fresh install still insists it doesn't want to play.

However, I have upgraded an existing installation and that works without any issues.

Perhaps this is an issue with the new image?
I used the NOOBS installer rather than getting the raspbian image direct.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 375
Joined: Fri Dec 26, 2014 11:02 am

Re: Pixel and RealVNC

Thu Sep 29, 2016 4:19 pm

Gimbal wrote:I have had some success since my first post.

The fresh install still insists it doesn't want to play.

However, I have upgraded an existing installation and that works without any issues.

Perhaps this is an issue with the new image?
I used the NOOBS installer rather than getting the raspbian image direct.
I've just tested the NOOBS installer, and have had no problem creating a VNC connection to the image from VNC Viewer on my Mac - I just enabled VNC in Raspberry Pi Configuration and it worked.

You shouldn't need to restart - the VNC icon will just appear a few seconds after you click OK on the Raspberry Pi Configuration window.

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Pixel and RealVNC

Thu Sep 29, 2016 8:43 pm

I've encountered a problem with the RealVNC server. After installing CUPS onto the PIXEL version of Raspian the VNC server service failed to start after a shutdown / reboot. When the CUPS software was removed the VNC server service re-started after a reboot without any problem.
Other modifications (samba mounts, installation of database software, python software) caused no problems.
Has anyone else encountered the same apparent conflict?

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Pixel and RealVNC

Thu Sep 29, 2016 11:17 pm

Not CUPS but something. I had an early Jessie release with RealVNC installed and ran into problems. There was nothing added before RealVNC. I switched to x11vnc for other reasons and have not had any problems. I did not keep a record of the RealVNC problems. At the time, I did find posts about similar RealVNC problems under Ubuntu.

ssfdre38
Posts: 35
Joined: Fri Jul 08, 2016 7:21 am

Re: Pixel and RealVNC

Thu Sep 29, 2016 11:47 pm

when you enable RealVNC on the Raspi-config you will need to go to your terminal and type vncserver and it will set up the vnc server with the encryption. If you want it to start up at boot then follow https://www.realvnc.com/docs/raspberry- ... pi-connect
Rasbian Latest Builds on SourceForge at https://sourceforge.net/projects/raspbian/
Github at https://github.com/ssfdre38

3 2B & 1 3B

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

Re: Pixel and RealVNC

Fri Sep 30, 2016 8:27 am

ssfdre38 wrote:when you enable RealVNC on the Raspi-config you will need to go to your terminal and type vncserver and it will set up the vnc server with the encryption. If you want it to start up at boot then follow https://www.realvnc.com/docs/raspberry- ... pi-connect
When you enable VNC via raspi-config, it starts the VNC service mode server - this allows access to the device's console display (i.e. the display you see when you have a monitor plugged in). You should see the VNC icon appear in the status bar after a few seconds, and you should be able to connect from a VNC viewer using "<hostname>:0" or simply "<hostname>" (since :0 is the default).

Running vncserver will actually start a virtual desktop, using an in-memory framebuffer. It will tell you the display number to use to connect to it when you run the command, since it allocates them dynamically, i.e. the first one should be "<hostname>:1".

Depending on what you're trying to do, you probably want to run one or the other. The service mode server has the advantage that it can use hardware acceleration (if you enable experimental direct capture in the options), so you can see things like Minecraft, Kodi and the console in text mode, which you can't do in virtual mode.

Gimbal
Posts: 51
Joined: Tue Jan 05, 2016 1:16 pm
Location: SW UK

Re: Pixel and RealVNC

Fri Sep 30, 2016 1:08 pm

Thanks for all the replies.
As I said in my previous post, I managed to get it to work when I upgraded, just not on a clean install.

I have flashed another card today, using the same files as the failed one.....and it worked. no issues at all.

the only difference was that it was on a Pi0 rather than a 3 that i used initially.

Maybe was just a quirk and if i flash the card again, it will work.

thanks

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Pixel and RealVNC

Fri Sep 30, 2016 1:56 pm

The source of the problems I encountered yesterday became apparent this morning when the sd card I was using expired completely. A re-installation of PIXEL Raspbian (with VNC enabled) and all my modifications, including CUPS, on a new sd card works exactly as it should.
Update: ... but only initially. So, back to my original observation, and I've tried this twice now.
Installing CUPS prevents the RealVNC server starting up on a reboot / cold startup (no taskbar icon appears) preventing remote access. If CUPS is then removed and purged followed by an autoremove, then on the reboot the VNC icon is back and normal remote access is resumed.
Can anyone suggest why? Is there an alternative way of printing from my Pi via my network printer?
Last edited by iw1 on Sun Oct 02, 2016 3:32 pm, edited 1 time in total.

dmfrey
Posts: 2
Joined: Fri Sep 30, 2016 2:15 pm

Re: Pixel and RealVNC

Fri Sep 30, 2016 2:19 pm

After doing an upgrade and trying to enable realvnc in raspi-config, nothing ever happens. I tried both the cli and graphical client and neither worked. I am assuming I need to dpkg-reconfigure something, but am unsure as to what package I need to target.

Thanks for your help.

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

Re: Pixel and RealVNC

Fri Sep 30, 2016 8:40 pm

dmfrey wrote:After doing an upgrade and trying to enable realvnc in raspi-config, nothing ever happens. I tried both the cli and graphical client and neither worked. I am assuming I need to dpkg-reconfigure something, but am unsure as to what package I need to target.

Thanks for your help.
Hi, did you follow the upgrade instructions here: https://www.raspberrypi.org/blog/introducing-pixel/

In particular you need to do:

Code: Select all

sudo apt-get install -y realvnc-vnc-server
, since it doesn't get installed automatically with the dist-upgrade.

Hope this helps!

dmfrey
Posts: 2
Joined: Fri Sep 30, 2016 2:15 pm

Re: Pixel and RealVNC

Fri Sep 30, 2016 9:29 pm

Thank you for your help. I did not see that page before I did the upgrade. It is now working.

MDiamondil
Posts: 4
Joined: Sun Apr 03, 2016 11:26 am

Re: Pixel and RealVNC

Sat Oct 01, 2016 8:29 am

I had a similar problem. Despite the fact that I activated VLC from the GUI on a clean install of Pixel, it wouldn't appear on the taskbar - even with reboots. I resolved it by entering raspi-config from the command line and enabling VNC. Then it worked fine. Perhaps the GUI needs checking.

apathos
Posts: 1
Joined: Sun Oct 02, 2016 3:15 am

Re: Pixel and RealVNC

Sun Oct 02, 2016 3:22 am

I've just installed the newest version of NOOBS/Raspbian without issue. I've set up the realvnc server and even created a virtual desktop. I can use VNC viewer to access my pi remotely only when I have a monitor attached. Every attempt to log in headless gives me an error: "The connection was refused by the host computer". If I reboot with a monitor, I can VNC in every time.

This is via my internal network only - the pi's IP is xxx.xxx.xxx.20. I get the error above with every permutation of port I can think of. Using the default IP, appending :1 or :0, appending the port number. Would love any advice I can find.

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

Re: Pixel and RealVNC

Mon Oct 03, 2016 8:51 am

apathos wrote:I've just installed the newest version of NOOBS/Raspbian without issue. I've set up the realvnc server and even created a virtual desktop. I can use VNC viewer to access my pi remotely only when I have a monitor attached. Every attempt to log in headless gives me an error: "The connection was refused by the host computer". If I reboot with a monitor, I can VNC in every time.

This is via my internal network only - the pi's IP is xxx.xxx.xxx.20. I get the error above with every permutation of port I can think of. Using the default IP, appending :1 or :0, appending the port number. Would love any advice I can find.
Hi, I work for RealVNC and have been investigating an issue that a few people have reported where the VNC Server is not starting automatically on boot. We've found a problem with the installed init script for the VNC Server, which seems to be causing a problem on some systems. I'm not sure how this relates to having a monitor plugged in or not, but the error message you're getting would indicate that the server is failing to start.

Please could you try running:

Code: Select all

sudo vncinitconfig -service-daemon
this will reinstall the init script for the VNC Server. We've found that the server will start more reliably on boot after this.

I hope this helps - please let me know if it works or not.

iw1
Posts: 47
Joined: Mon Oct 13, 2014 8:10 am

Re: Pixel and RealVNC

Mon Oct 03, 2016 8:24 pm

Please could you try running:

Code: Select all

sudo vncinitconfig -service-daemon
this will reinstall the init script for the VNC Server. We've found that the server will start more reliably on boot after this.
This command alone did not help, but when followed by

Code: Select all

sudo systemctl enable vncserver-x11-serviced.service
the vnc server succesfully started after a re-boot even when CUPS was installed. The VNC icon appears on the taskbar and the Pi can be accessed remotely with or without a monitor connected.
I now have everything working so thanks.

garyrkey
Posts: 2
Joined: Thu Feb 12, 2015 5:04 pm
Location: Texas, USA

Re: Pixel and RealVNC

Mon Oct 03, 2016 10:11 pm

The problem with a headless Pi not connecting is similar to the one I have been having. If the display to the Pi is on, RealVNC works great. If I turn off the display, the RealVNC connection is lost. When I try to reconnect, the connection is very sluggish, if it works at all. When it does connect the responsiveness is very slow, as in several seconds to paint the screen. Additionally, putty is slow, or non-responsive. When I turn the display back on, RealVNC and putty work normally again.
Please help - I'm going bald pulling my hair!
Thanks - Gary

rubenrp
Posts: 9
Joined: Wed Dec 02, 2015 6:05 pm

Re: Pixel and RealVNC

Wed Oct 05, 2016 4:11 am

First, my thanks to you and the RealVNC team for adding RealVNC to the default Raspbian install - it's a great addition.

I can confirm that the sequence:

Code: Select all

sudo vncinitconfig -service-daemon
sudo systemctl enable vncserver-x11-serviced.service
fixes the problem with RealVNC not starting after a reboot. Indeed, prior to trying your suggestion, checking the startup status of the vncserver with:

Code: Select all

systemctl is-enabled vncserver-x11-serviced.service
always failed.

If this helps for debugging purposes, in my tests I'm running the latest Raspbian image on a Pi Zero 1.2 in as close to an untouched state as possible (i.e., no additional software installed prior to trying to set up RealVNC).
sconemad wrote:
apathos wrote:I've just installed the newest version of NOOBS/Raspbian without issue. I've set up the realvnc server and even created a virtual desktop. I can use VNC viewer to access my pi remotely only when I have a monitor attached. Every attempt to log in headless gives me an error: "The connection was refused by the host computer". If I reboot with a monitor, I can VNC in every time.

This is via my internal network only - the pi's IP is xxx.xxx.xxx.20. I get the error above with every permutation of port I can think of. Using the default IP, appending :1 or :0, appending the port number. Would love any advice I can find.
Hi, I work for RealVNC and have been investigating an issue that a few people have reported where the VNC Server is not starting automatically on boot. We've found a problem with the installed init script for the VNC Server, which seems to be causing a problem on some systems. I'm not sure how this relates to having a monitor plugged in or not, but the error message you're getting would indicate that the server is failing to start.

Please could you try running:

Code: Select all

sudo vncinitconfig -service-daemon
this will reinstall the init script for the VNC Server. We've found that the server will start more reliably on boot after this.

I hope this helps - please let me know if it works or not.

klricks
Posts: 6549
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Pixel and RealVNC

Wed Oct 05, 2016 5:13 am

There was a new version of RealVNC in today's upgrade.

Code: Select all

sudo apt-get update
sudo apt-get upgrade
RealVNC is working well for me (Running RealVNC client on Win10).

Unlike RDP, RealVNC connects to the main local console, automatically reconnects after reboot, and COPY & PASTE works either direction........

I am running the non NOOBS version of Raspbian Jessie (Pixel).
Headless mode works for me but reverts to Composite resolution with no monitor attached. Just as it does on the local console with any Non NOOBS install...... I haven't tried to force HDMI mode in /boot/config.txt yet. Hopefully that would put it back into HDMI resolutions when no monitor is attached?
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

mattmiller
Posts: 2101
Joined: Thu Feb 05, 2015 11:25 pm

Re: Pixel and RealVNC

Wed Oct 05, 2016 6:28 am

There was a new version of RealVNC in today's upgrade.
Today's upgrade? Last version I'm seeing is still last weeks 23Sep

Barry4679
Posts: 4
Joined: Wed Oct 05, 2016 8:48 am

Re: Pixel and RealVNC

Wed Oct 05, 2016 9:10 am

klricks wrote:There was a new version of RealVNC in today's upgrade.
Has anyone tried today's new version of RealVNC?
I was running a new install of Pixel, installed via PiBakery. I was able to sign in via VNC viewer.
I then did a dist upgrade, which got a new version of RealVNC which wasn't there yesterday, and it seemed to break some things.
My alteration to /boot/config is now ignored, so I can no longer configure for my PC's screen resolution.

I also got this (before it returned information)
<<<
[email protected]:~ $ /opt/vc/bin/tvservice -s
state 0x40001 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced
[email protected]:~ $ /opt/vc/bin/tvservice -m DMT
Group DMT has 0 modes:
[email protected]:~ $ /opt/vc/bin/tvservice -m CEA
Group CEA has 0 modes:
[email protected]:~ $ /opt/vc/bin/tvservice -d edid.dat; /opt/vc/bin/edidparser edid.dat
Nothing written!
Enabling fuzzy format match...
Failed to open edid.dat
edid_parser exited with code -1
[email protected]:~ $
>>>>

Also I had to attach to the CLI via SSH to restart vncserver each time I rebooted the RPi.
And connection address shifted from #.#.#.# to #.#.#.#:1

I saw this error during the install
<<<
Updating /etc/pam.d/vncserver
Updating /etc/pam.conf... done
Looking for font path... /usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,built-ins (from xset).
Original config file "/etc/vnc/config.old" preserved
>>>

I uninstalled and reinstalled realvnc-vnc-server, but things didn't improve. I went back to the original version of Rasbian\Pixel, and everything worked again.

Any one else seeing this, or have any advice?

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

Re: Pixel and RealVNC

Wed Oct 05, 2016 11:29 am

Barry4679 wrote:
klricks wrote: Also I had to attach to the CLI via SSH to restart vncserver each time I rebooted the RPi.
And connection address shifted from #.#.#.# to #.#.#.#:1
Running vncserver will start a VNC virtual mode server, which probably isn't what you want (see https://www.realvnc.com/docs/server-mod ... rver-modes for more info on VNC Server modes).

The VNC server that gets enabled by the configuration app (or raspi-config) is the VNC Service mode server. The recent update fixed an issue with the init script for this service, which may mean you need to re-enable VNC from the configuration app.

Barry4679
Posts: 4
Joined: Wed Oct 05, 2016 8:48 am

Re: Pixel and RealVNC

Wed Oct 05, 2016 12:42 pm

sconemad wrote:Running vncserver will start a VNC virtual mode server, which probably isn't what you want
Thanks for your advice.

I followed your link, but I'm not real sure what i want. :) My RPi has no screen or keyboard. PiBakery enabled me to auto-install the new Pixel, and had RealVNC working so that I could control the RPi using my PC.

The upgrade to RealVNC, or the upgrade process, broke whatever PiBakery had setup. I found I that I could no longer log on after the upgrade, but was able to do so if I ran vncserver, but that ignored the changes that I had made to /boot/config.txt to adjust resolution to suit my PC's screen.
sconemad wrote:The recent update fixed an issue with the init script for this service, which may mean you need to re-enable VNC from the configuration app.
Which config app, and how would I run it w/o VNC or a screen attached to the RPi?

Maybe I should ask at PiBakery to see what needs to be done to restore their RealVNC config?

Although it does seem to me that something could be broken by the upgrade,due the fact that /opt/vc/bin/tvservice -m DMT no longer returns any information?

altosack
Posts: 19
Joined: Wed Feb 24, 2016 12:48 am

Re: Pixel and RealVNC

Wed Oct 05, 2016 12:51 pm

Barry4679 wrote:... if I ran vncserver, but that ignored the changes that I had made to /boot/config.txt to adjust resolution to suit my PC's screen.
When you run vncserver, add "-geometry XRESxYRES".
E.g.: vncserver -geometry 1024x768

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

Re: Pixel and RealVNC

Wed Oct 05, 2016 1:15 pm

Barry4679 wrote: Which config app, and how would I run it w/o VNC or a screen attached to the RPi?
Sorry, I meant the Raspberry Pi Configuration app (from the preferences menu on the desktop). If you can't get to the desktop, you can use the command line raspi-config (which you need to run with sudo). Go to Advanced Options > VNC to enable the VNC Service mode server.

If you are using this, you don't need to run vncserver - this will start another VNC Server (and a virtual desktop), which you don't need.

Return to “Raspbian”