1

I'm running an RPi4 headless and connecting over WiFi using VNC Viewer. At some point after opening the viewer window (maybe an hour or two later) that viewer window seems to automatically close. This is an annoyance as I'd like to leave the window open for as long as the RPi4 is running.

Any ideas how to prevent this? I'm not sure whether the problem is on the RPi side versus the VNC Viewer side.

  • 1
    As far as I'm aware, neither the client (viewer) nor the server (RPi side) automatically disconnect. Are there any useful hints in the system logs? You can view them with 'sudo journalctl' or look at the files in /var/log – bls Aug 20 '19 at 14:09
  • 1
    Server has 3600 second idle timeout. – Michael Harvey Aug 20 '19 at 19:20
5

By default, the RealVNC server in Raspbian Buster on the Rpi 4 has a 3600 second (one hour) idle timeout. To alter this while in a VNC session:
(1) Right click the VNC server icon on the Raspbian desktop taskbar, and select 'Open' from the menu.
(2) then in the VNC Connect app,
(3) left click the three-line 'hamburger' menu icon at top right, and left click 'Options'
(4) In the 'Options' window that appears, left click 'Expert', then
(5) Either type 'Idle' in the 'Filter' box, or scroll down the settings to 'IdleTimeout' and, in the 'Value' box, change 3600 to 0 (for no timeout) or some other number of seconds, then click Apply or OK.

enter image description here

  • 1
    Yep, that did the trick. I've had the VNC Viewer window open and idle for a few hours now and it hasn't closed/disconnected. Thanks Michael! – Andrew Cottrell Aug 21 '19 at 17:59

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.