Bosse_B wrote: ↑
Tue Jul 09, 2019 1:07 pm
I also modified the /etc/rc.local file by adding this at the end before exit:
#Start RealVNC in virtual mode with resolution 1400x900 px
Unfortunately this was only half a solution....
The screen created by the rc.local command is inaccessible
because it is owned by root and the pi login is not accepted.
So no vncserver command inside /etc/rc.local!!!
Instead I use cron to handle this, see below.
I need to adapt the VNC window to my actual PC desktop (1920x1080) such that the VNC window uses about 1400x900 pixels.
This way I can work decently inside the Pi for development and still have access easily to my Windows desktop.
For some reason this discussion wandered into my other RPi4 thread
But I will recap the solution here:
1) Do not
enable VNC in raspi-config! If already done then go back and change to NOT enabled.
2) From the PuTTY CLI logged in as pi edit the cron table:
Put the following into it (set the screen geometry as you want):
Code: Select all
@reboot sleep 60 && /usr/bin/vncserver -randr=1400x900
This will start vncserver 60 seconds after reboot with the size of the virtual desktop set.
Reboot the RPi to check
3) In RealVNC you create a connection where the address is <hostname or IP address>:1
You should now be able to log in via VNC and see a desktop sized as per your wish in the crontab command.