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

Re: Pixel and RealVNC

Wed Jan 11, 2017 12:32 am

Bosse_B wrote:Another issue I have found after installing Raspbian PIXEL (latest image) yesterday on an RPi3:
I can access the remote desktop fine from my PC using Real VNC Client and it displays a really nice version of the screen.

However, if I go away for a while (lunch, dinner...) then when I come back the session is gone, vanished...
All that is left is the start screen of VNC Viewer and I have to click the connection icon again to show the remote screen.
Why does this happen? I have not found anything in the VNC Viewer settings that deals with a disconnect timeout or such.
Right mouse click the VNC icon on the RPi taskbar then select [Options...] --> [Expert]
Find IdleTimeout and change the default value (3600 sec) to what you want or enter 0 to disable timeout.

The above can be done either locally or remotely but make sure you are changing settings on the RPi VNC server..... Not the similar settings menus of the remote viewer software via F8.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Bosse_B
Posts: 768
Joined: Thu Jan 30, 2014 9:53 am

Re: Pixel and RealVNC

Fri Jan 13, 2017 5:26 pm

So could it be that RealVNC interacts with the screensaver on the target?
I.e. if the VNC client is connected to the host and left alone for a while, then the host's screensaver kicks in and blanks the screen whereupon the VNC Client treats this as a disconnect?
I have not entered any code in the target to disable screensaver (yet)....
And meanwhile I have pulled out the PIXEL SDcard and gone back to my original Jessie image in order to try and upgrade it to PIXEL.
But I have there a problem: I have installed TightVNC on it and edited a number of configuration files to make it start on boot on display :1, that will all have to go away as far as I understand so now I have to find all those settings...
Bo Berglund
Sweden

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

Re: Pixel and RealVNC

Fri Jan 13, 2017 6:13 pm

Bosse_B wrote:So could it be that RealVNC interacts with the screensaver on the target?
I.e. if the VNC client is connected to the host and left alone for a while, then the host's screensaver kicks in and blanks the screen whereupon the VNC Client treats this as a disconnect?
I have not entered any code in the target to disable screensaver (yet)....
And meanwhile I have pulled out the PIXEL SDcard and gone back to my original Jessie image in order to try and upgrade it to PIXEL.
But I have there a problem: I have installed TightVNC on it and edited a number of configuration files to make it start on boot on display :1, that will all have to go away as far as I understand so now I have to find all those settings...
Did you try changing the IdleTimeout as I explained above?

For me when RealVNC is connected to my Win10 the screen blanking never happens on the RPi.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Bosse_B
Posts: 768
Joined: Thu Jan 30, 2014 9:53 am

Re: Pixel and RealVNC

Sun Jan 15, 2017 10:49 pm

klricks wrote:
Bosse_B wrote: And meanwhile I have pulled out the PIXEL SDcard and gone back to my original Jessie image in order to try and upgrade it to PIXEL.
Did you try changing the IdleTimeout as I explained above?

For me when RealVNC is connected to my Win10 the screen blanking never happens on the RPi.
As I explained I don't have it running anymore, in fact I have scrapped that install and started over fresh with a new image.
But I have used advice here on the forum on how to disable the screensaver on that image and it seems like it solved the problem.
Now on the previous Jessie without PIXEL and trying to figure out how to make a dist-upgrade and switch from TightVNC to RealVNC. But that has to wait 2 weeks now, heading out on a trip...
Bo Berglund
Sweden

jrflop
Posts: 9
Joined: Tue Oct 14, 2014 11:59 pm

Re: Pixel and RealVNC

Sat Feb 25, 2017 3:33 pm

Hi,

There is something that looks like a kind of problem while trying to enable the VNC server after having a fresh install and upgrade !

Image

VNC server isn't anymore into the options

Bye ;)

EDIT : Ok nevermind. It's into the Interfacing options now

User avatar
IgorGanapolsky
Posts: 33
Joined: Sun Apr 10, 2016 8:32 pm

Re: Pixel and RealVNC

Wed Mar 08, 2017 9:59 pm

You really oughta try these instructions: http://elinux.org/RPi_VNC_Server. They worked wonders for me with setting up tightvncserver, and now I can connect to my Raspi through RealVNC from my Mac and from Android device.

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

Re: Pixel and RealVNC

Wed Mar 08, 2017 10:35 pm

You really oughta try these instructions
People - really don't!!!

Those are very old instructions.

Great that they still work but much much more complicated compared to enabling RealVNC using raspi-config (if SSHing in) or the GUI Interface (if connected to screen/kbd/mouse)

If either of those methods don't work - 99% of the time it will be because you didn't quite follow the instructions :)
But occasionally, an update might cause it to fail - in 99.9999% of THOSE cases - it gets sorted out within a couple of days :)

ergs
Posts: 3
Joined: Sat Mar 11, 2017 2:02 pm

Re: Pixel and RealVNC

Sat Mar 11, 2017 2:26 pm

Hello, I am using raspberrypi 3 model B. When I write raspbian image in SD card and install it, then it everything(i.e. Putty, RealVNC viewer) works well for first boot, but for the subsequent boots (i.e. after restarting) putty connects, but realVNC doesn't connect. It shows the message that "connection refused by computer". When I tried to update and install realVNC using putty, it shows error. Will the codes given by you will solve my problem? And if yes then when to enter these codes, either on first boot of second? Please help.
rubenrp wrote: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.

User avatar
DougieLawson
Posts: 35598
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pixel and RealVNC

Sat Mar 11, 2017 4:44 pm

ergs wrote:Hello, I am using raspberrypi 3 model B. When I write raspbian image in SD card and install it, then it everything(i.e. Putty, RealVNC viewer) works well for first boot, but for the subsequent boots (i.e. after restarting) putty connects, but realVNC doesn't connect. It shows the message that "connection refused by computer". When I tried to update and install realVNC using putty, it shows error. Will the codes given by you will solve my problem? And if yes then when to enter these codes, either on first boot of second? Please help.
Connection refused means one of two things: 1) wrong IP address or 2) wrong port.

So take a look at what ports are listening on your RPi with a sudo netstat -tlnp command.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ergs
Posts: 3
Joined: Sat Mar 11, 2017 2:02 pm

Re: Pixel and RealVNC

Sun Mar 12, 2017 7:25 am

If IP address or port is wrong then how is it getting connected to Putty SSH. It is showing the problem with RealVNC viewer connection. Even that not on the first boot, but on subsequent boots. If possible please check my problem through Team Viewer.
DougieLawson wrote:
ergs wrote:Hello, I am using raspberrypi 3 model B. When I write raspbian image in SD card and install it, then it everything(i.e. Putty, RealVNC viewer) works well for first boot, but for the subsequent boots (i.e. after restarting) putty connects, but realVNC doesn't connect. It shows the message that "connection refused by computer". When I tried to update and install realVNC using putty, it shows error. Will the codes given by you will solve my problem? And if yes then when to enter these codes, either on first boot of second? Please help.
Connection refused means one of two things: 1) wrong IP address or 2) wrong port.

So take a look at what ports are listening on your RPi with a sudo netstat -tlnp command.

User avatar
DougieLawson
Posts: 35598
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pixel and RealVNC

Sun Mar 12, 2017 9:05 am

ergs wrote:If IP address or port is wrong then how is it getting connected to Putty SSH. It is showing the problem with RealVNC viewer connection. Even that not on the first boot, but on subsequent boots. If possible please check my problem through Team Viewer.
ssh uses a different port (22) to VNC (which uses one from 5900 to 5910).

What's "Team Viewer" and how does that relate to your problem?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ergs
Posts: 3
Joined: Sat Mar 11, 2017 2:02 pm

Re: Pixel and RealVNC

Sun Mar 12, 2017 4:05 pm

Team Viewer establish incoming and outgoing remote connections for real-time support or access to other computers. Please download its portable version and help me. I tried every permutation and combination but failed to solve the problem. Here is the link to download it https://www.teamviewer.com/en/download/windows/
sudo netstat -tlnp shows only 22 port. Please inform me when you are ready with team viewer for help. My email id is kumardhiman92 @ gmail dot com
DougieLawson wrote:
ergs wrote:If IP address or port is wrong then how is it getting connected to Putty SSH. It is showing the problem with RealVNC viewer connection. Even that not on the first boot, but on subsequent boots. If possible please check my problem through Team Viewer.
ssh uses a different port (22) to VNC (which uses one from 5900 to 5910).

What's "Team Viewer" and how does that relate to your problem?

User avatar
DougieLawson
Posts: 35598
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pixel and RealVNC

Sun Mar 12, 2017 5:06 pm

Sorry if you want me to do that the minimum fee is USD$750/day.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Pixel and RealVNC

Sun Mar 12, 2017 5:51 pm

ergs wrote:Team Viewer establish incoming and outgoing remote connections for real-time support or access to other computers. Please download its portable version and help me. I tried every permutation and combination but failed to solve the problem. Here is the link to download it https://www.teamviewer.com/en/download/windows/
sudo netstat -tlnp shows only 22 port. Please inform me when you are ready with team viewer for help. My email id is [email protected]
DougieLawson wrote:
ergs wrote:If IP address or port is wrong then how is it getting connected to Putty SSH. It is showing the problem with RealVNC viewer connection. Even that not on the first boot, but on subsequent boots. If possible please check my problem through Team Viewer.
ssh uses a different port (22) to VNC (which uses one from 5900 to 5910).

What's "Team Viewer" and how does that relate to your problem?

This a community forum, if you want 1 to 1 support please offer to pay :roll:
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

wizzlepig
Posts: 7
Joined: Tue Sep 05, 2017 7:07 am

Re: Pixel and RealVNC

Tue Sep 05, 2017 7:20 am

Hello!

I have been having a similar issue with VNC and pixel- I grabbed the lastest NOOBS image from 2017-08-16, got it all up and running on my pi, and then used raspi-config to enable ssh and vnc. All of that worked just fine.

What is happening is that about 50% of the time when I connect via VNC, the toolbar will not be there- I can see what seems to be the toolbar- it blinks like it is trying to start, but then it gives up and does not come back.

I would suspect some kind of error on my part- but I bought three pi zero w's - and it's happening on all three of them.

I have noticed that altering the resolution and then restarting sometimes fixes the problem, but so far it likes to come back.
pidesks.jpg
pidesks.jpg (131.46 KiB) Viewed 2426 times

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

Re: Pixel and RealVNC

Tue Sep 05, 2017 11:41 am

wizzlepig wrote:
Tue Sep 05, 2017 7:20 am
Hello!

I have been having a similar issue with VNC and pixel- I grabbed the lastest NOOBS image from 2017-08-16, got it all up and running on my pi, and then used raspi-config to enable ssh and vnc. All of that worked just fine.

What is happening is that about 50% of the time when I connect via VNC, the toolbar will not be there- I can see what seems to be the toolbar- it blinks like it is trying to start, but then it gives up and does not come back.
There is a fix for this available, you just need to do a "sudo apt-get update" and "sudo apt-get upgrade" and you should get a new version of the lxpanel package installed, which fixes this issue.

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

Re: Pixel and RealVNC

Tue Sep 05, 2017 12:42 pm

wizzlepig wrote:
Tue Sep 05, 2017 7:20 am
Hello!

I have been having a similar issue with VNC and pixel- I grabbed the lastest NOOBS image from 2017-08-16, got it all up and running on my pi, and then used raspi-config to enable ssh and vnc. All of that worked just fine.

What is happening is that about 50% of the time when I connect via VNC, the toolbar will not be there- I can see what seems to be the toolbar- it blinks like it is trying to start, but then it gives up and does not come back.

I would suspect some kind of error on my part- but I bought three pi zero w's - and it's happening on all three of them.

I have noticed that altering the resolution and then restarting sometimes fixes the problem, but so far it likes to come back.
FYI Pixel Desktop is deceased see: viewtopic.php?f=63&t=186959
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

wizzlepig
Posts: 7
Joined: Tue Sep 05, 2017 7:07 am

Re: Pixel and RealVNC

Tue Sep 05, 2017 3:35 pm

oh, awesome, thank you both for the information! I will update!

Mustha
Posts: 7
Joined: Sun Feb 07, 2016 10:42 pm

Re: Raspbian with RPI Desktop and RealVNC

Wed Jan 16, 2019 3:47 pm

I've read and tried all the suggestions in this thread but I haven't yet found a solution to the problem I'm having with running VNC.
I was previously running tightvnc and when I upgraded to the pixel desktop I also moved to RealVNC but kept running vnc in virtual mode. Today I tried to set vncserver to run in service mode. I can access the RPi using VNC Viewer but the screen is black. Running

Code: Select all

sudo systemctl status vncserver-x11-serviced.service 
shows vncserver is loaded with some error

Code: Select all

vncserver-x11-serviced.service - VNC Server in Service Mode daemon
   Loaded: loaded (/usr/lib/systemd/system/vncserver-x11-serviced.service; enabled)
   Active: active (running) since Qua 2019-01-16 14:49:05 WET; 53min ago
 Main PID: 523 (vncserver-x11-s)
   CGroup: /system.slice/vncserver-x11-serviced.service
           ├─523 /usr/bin/vncserver-x11-serviced -fg
           └─554 /usr/bin/vncserver-x11-core -service

Jan 16 15:41:27 AliancaServer vncserver-x11[554]: AgentInitCheck: agent comms failure
Jan 16 15:41:32 AliancaServer vncserver-x11[554]: AgentInitCheck: no response from agent
I don't know if this is important but I have changed the standard pi user to a different name. Could this be the cause?

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

Re: Raspbian with RPI Desktop and RealVNC

Fri Jan 18, 2019 9:49 am

This usually means that you need to set your Pi to boot to desktop.
You can do this from raspi-config: go to Boot options > Desktop / CLI and choose Desktop or Desktop Autologin.

Return to “Raspbian”