VNC resolution problems

Hi,

So, I have installed Raspbian for Robots, updated and upgraded it, and tried all sorts of suggestions that Google came up with, but I have failed to find a way to change the resolution to FHD 1920x1080 when using VNC.

When I connect to the BrickPi through the browser, there is a settings option called “Remote Resizing”, but this seems to have no effect.

When I connect using VNC Viewer, I can’t see any way to change the resolution: it’s always 1280x768.

I’ve tried various settings in /bin/config.txt, but nothing seems to work.

If I connect the pi to a physical monitor, the resolution is 1920x1080.

There must be a way to do this, but I can’t seem to find it. Can anyone point me in the right direction?

Thanks,
David.

1 Like

Welcome @dc1, your question has been asked before with no responders, no answers.

Disclaimer: I don’t know what I am talking about, and I am not connected with DI - just a user like yourself.

Something to investigate:

  • systemctl | grep vnc   lists novnc.service and vncserver@1.service
  • /etc/systemd/system/novnc.service   “requires” vncserver@1.service
     

The file /etc/systemd/system/vncserver@.service seems to set the resolution of the windows:

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
User=pi
PAMName=login
PIDFile=/home/pi/.vnc/%H:%i.pid
WorkingDirectory=/home/pi
ExecStartPre=-/usr/bin/vncserver -kill :%i
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x768 :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

You could try

  • backing up that file, repeat: make a copy of that file somewhere!!
  • backup your SDcard just to be extra sure you can recover
  • change that 1280x768 to your desired resolution
    (sudo nano /etc/systemd/system/vncserver@.service)
  • reboot
     

and see if you get the new resolution.

Others that have asked this question:

 
So please report back if this works.

2 Likes

Hi @cyclicalobsessive,

That did the trick! Thanks! Now I can make full use of my screen over VNC. I can’t remember how many things I tried. I should learn a bit more about Linux - grep would have saved me a lot of frustration!

The only thing I need to figure out now is why Visual Studio Code won’t start (the error x server probably went away means not a lot to me!

Thanks,
David

2 Likes

I finally got mine to work (reasonably) well too.  Not sure exactly what I did - been too many things happening at the same time! - but I think the trick for me was to change the resolution in raspi-config.

1 Like