egglypi
Posts: 1
Joined: Fri Sep 30, 2016 10:15 am

New RealVNC server config

Fri Sep 30, 2016 10:38 am

Hello, beginner to raspberry pi (v2) but not so much to *nix. I thought I was pretty good at looking at documentation etc and getting to the bottom of things myself.

Ashamed, I need some help. I've looked at Stickys, other posts, searched for things, but can't cobble together an answer.

I'm using the newest Raspbian Jessie version (Sept 2016) release, and have configured my pi to use the newer RealVNC server which is bundled. I have it running in Service Mode.

However, when I connect using RealVNC viewer, it only gives me a 640x480 resolution and end up not being able to see all of certain windows etc. I've seen some references to the contents of the /boot/config.txt file (of course have edited this for other things) but can't quite put my finger on the right answer, or whether it actually sorts out my needs.

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

Do I need to uncomment the above to change the resolution of the desktops that RealVNC will give me to everytime I connect. It's a headless pi, never been booted with a monitor (don't have one).

So, would be interested to hear your thoughts. I have been through sooo much documentation on the RealVNC site, but all seems very confusing for what "seems" a simple change that a normal person would need to make.

Cheers in advance...

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

Re: New RealVNC server config

Fri Sep 30, 2016 11:25 am

You need to enable hdmi_force_hotplug, then set hdmi_group and hdmi_mode to the desired mode according to the tables at: https://www.raspberrypi.org/documentati ... fig-txt.md.

For example, for 1024x768, use:

Code: Select all

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=16

timrowledge
Posts: 1308
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: New RealVNC server config

Fri Sep 30, 2016 5:19 pm

I prefer using xrdp because of this interlocking between the display size and the vcc idea of display size. Xrdp lets you choose a screen size when you connect, which seems much more helpful to me.

Remember yo have to follow the instructions to remove realvnc *first* if you choose to use xrdp ie-
`sudo apt-get purge realvnc-vnc-sexrver`
then
`sudo apt-get install xrdp`
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5270
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: New RealVNC server config

Fri Sep 30, 2016 6:23 pm

sconemad wrote:You need to enable hdmi_force_hotplug, then set hdmi_group and hdmi_mode to the desired mode according to the tables at: https://www.raspberrypi.org/documentati ... fig-txt.md.
For example, for 1024x768, use:

Code: Select all

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=16
To clarify the above - AFAICT RealVNC uses the "main" display resolution so, on a headless pi, w/o the hdmi_force_hotplug "workaround" it will default to the composite video (ie. sdtv) display size & resolution. The tvservice** command should confirm this.
Trev.
** FWIW examples of its use to "optimise" (real) display settings can be found here:
https://www.cpmspectrepi.uk/raspberry_p ... tings.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

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

Re: New RealVNC server config

Mon Oct 03, 2016 9:27 am

FTrevorGowen wrote: To clarify the above - AFAICT RealVNC uses the "main" display resolution so, on a headless pi, w/o the hdmi_force_hotplug "workaround" it will default to the composite video (ie. sdtv) display size & resolution. The tvservice** command should confirm this.
Trev.
** FWIW examples of its use to "optimise" (real) display settings can be found here:
https://www.cpmspectrepi.uk/raspberry_p ... tings.html
This is true for the VNC service mode server, which is what gets started when you enable VNC through the Raspberry Pi Configuration app or raspi-config. This is designed to share your screen output - i.e. whatever you would see if you have a monitor plugged in. However, without a monitor plugged in, the screen does default to 720x480, hence the need to force a higher resolution by editing /boot/config.txt if required.

The RealVNC server package also includes a VNC virtual mode server, which can be started using the "vncserver" command. This creates a virtual desktop in memory which you can connect to from a VNC Viewer. You can set the resolution of this desktop using the "-geometry" argument, e.g. "-geometry 1024x768", or you can specify a list of alternative resolutions using the "-randr" argument, which you can then switch between using the "xrandr" command. See https://www.realvnc.com/docs/server-par ... html#randr for more details on this.

castletonroad
Posts: 119
Joined: Sat Jul 25, 2015 11:23 pm

Re: New RealVNC server config

Mon Oct 03, 2016 10:19 am

[quote="sconemad"]You need to enable hdmi_force_hotplug, then set hdmi_group and hdmi_mode to the desired mode according to the tables at: https://www.raspberrypi.org/documentati ... fig-txt.md.

For example, for 1024x768, use:

[code]
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=16
[/code][/quote]

I have been using realVNC on my headless Pi for some time now. This has always worked for me.
Raspberry Pi 4 Model B | Raspberry Pi 3 Model B | Raspberry Pi 2 Model B

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5270
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: New RealVNC server config

Mon Oct 03, 2016 1:12 pm

sconemad wrote:
FTrevorGowen wrote: To clarify the above - AFAICT RealVNC uses the "main" display resolution so, on a headless pi, w/o the hdmi_force_hotplug "workaround" it will default to the composite video (ie. sdtv) display size & resolution. The tvservice** command should confirm this.
Trev.
** FWIW examples of its use to "optimise" (real) display settings can be found here:
https://www.cpmspectrepi.uk/raspberry_p ... tings.html
This is true for the VNC service mode server, which is what gets started when you enable VNC through the Raspberry Pi Configuration app or raspi-config. This is designed to share your screen output - i.e. whatever you would see if you have a monitor plugged in. However, without a monitor plugged in, the screen does default to 720x480, hence the need to force a higher resolution by editing /boot/config.txt if required.

The RealVNC server package also includes a VNC virtual mode server, which can be started using the "vncserver" command. This creates a virtual desktop in memory which you can connect to from a VNC Viewer. You can set the resolution of this desktop using the "-geometry" argument, e.g. "-geometry 1024x768", or you can specify a list of alternative resolutions using the "-randr" argument, which you can then switch between using the "xrandr" command. See https://www.realvnc.com/docs/server-par ... html#randr for more details on this.
Thanks for that info. Historically, on the rare occasions I've tried out VNC** I've used TightVNC. My (limited) experience of RealVNC has been with (very) recent testing of a Raspbian Pixel install on my A+ (Notes/Screenshots for my webpages are almost complete and I hope to update them later this week now uploaded****) and so have not (yet) discovered/tried out all its capabilities.
Trev.
** I usually either SSH into a headless Pi and work from the command line and/or, if I need to run a GUI app, let it be "X-forwarded" to be displayed on the desktop of my Linux netbook. Alternatively, I can switch my monitor from VGA mode to DVI(HDMI), and, via a USB switch, keyboard & mouse to use a Pi directly.
**** Edit(04/10/2016): http://www.cpmspectrepi.uk/raspberry_pi ... Pixel.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

jakekpi
Posts: 1
Joined: Mon Apr 03, 2017 3:42 am

Re: New RealVNC server config

Mon Apr 03, 2017 3:50 am

Maybe I'm wrong in my interpretation, but it seems these suggestions are in accessing the pi via another computer. Does anyone have any suggestions on how to adjust screen resolution where I'm using the pi as the viewer to remote into a desktop pc running real VNC server? The desktop pc has a larger resolution than pi but is still used regularly so I don't want to keep changing its resolution. The pi viewer window I'm having to scroll the window to see all oh host monitor. I'm not finding the settings to force the session to reflect the viewers resolution as to what's displayed. Maybe I'm reading these previous suggestions wrong, any help greatly appreciated.

castletonroad
Posts: 119
Joined: Sat Jul 25, 2015 11:23 pm

Re: New RealVNC server config

Thu Apr 06, 2017 12:45 am

Set the pi resolution via /boot/config.txt

I then also use 'zoom' in the VNC viewer on the PC to fill the pi screen to the viewer window.
Raspberry Pi 4 Model B | Raspberry Pi 3 Model B | Raspberry Pi 2 Model B

Return to “Beginners”