simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

X11VNC headless resolution

Tue Oct 09, 2012 6:29 pm

I use x11vnc since I like looking at the main display that the RPi would show on a screen and its all fine when I've an HDMI monitor connected.

But if run headless, then the vnc display looks like 640x480.

Is there a method of setting this to something like 1024x768 as trying to run Scratch in 640x480 is a bit tricky :)

regards

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

User avatar
mister_wavey
Posts: 98
Joined: Sun Sep 02, 2012 8:23 am
Location: Abergavenny, Wales, UK
Contact: Website

Re: X11VNC headless resolution

Tue Oct 09, 2012 8:09 pm

I don't know how to get x11vnc to increase the cr@ppy 640x480 resolution, but I've managed to get 1920x1080 working via tightvncserver, which I believe runs a new X instance for each client connection, rather than sharing the existing X instance, but, hey.

$ sudo apt-get install tightvncserver

$ vncserver :1 -geometry 1920x1080 -depth 24

then hit your pi's IP address with :1 at the end in your vnc viewer

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: X11VNC headless resolution

Tue Oct 09, 2012 8:39 pm

yeh - I know it works fine if I install tightvncserver but

I want to be able to convince pupils that what they are seeing on an XP Laptop VNC viewer screen is exactly what's running on the RPi so they can fully comprehend that their Scratch programs are actually running on the RPi and not their laptop

We are going to run the RPi's on robots so can't really connect a real screen while they are running along so need to use a VNC viewer:)

But before we untether them from the a monitor/kbd/mouse, I'd like to prove that using a VNC viewer is identical to using the monitor/kbd/mouse.

I don't want them to have to get into rpi:5900 vs rpi:5901 territory as I just intend having a VNC shortcut on laptop1 that connects to rp1, laptop2 to rpi2 etc


regards

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: X11VNC headless resolution

Tue Oct 09, 2012 9:13 pm

Well - simply uncommenting

Code: Select all

hdmi_force_hotplug=1
from /boot/config.txt

which forces it to use HDMI gives me a workable display so that'll prob do for the moment :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

PeterT
Posts: 11
Joined: Wed Nov 07, 2012 4:47 pm
Location: Hampshire, U.K.
Contact: Website

Re: X11VNC headless resolution

Tue Mar 26, 2013 2:00 pm

In /boot/config.txt, I set

hdmi_force_hotplug=1

and

hdmi_group=2
hdmi_mode=16 (1024x768@60Hz)

Then I ran x11vnc with -configure 1024x600, which is the resolution of my netbook screen
RPi running Rasbian, SheevaPlug and DreamPlug both running Debian Wheezy, 2 netbooks both running Debian Wheezy with Gnome 3.

Dixie
Posts: 3
Joined: Tue Jun 04, 2013 4:05 pm

Re: X11VNC headless resolution

Tue Jun 04, 2013 9:44 pm

Peter T

You're a legend! You just made my x11vnc desktop much easier to use!

Thanks :)

User avatar
solar3000
Posts: 982
Joined: Sat May 18, 2013 12:14 am

Re: X11VNC headless resolution

Wed Jun 05, 2013 1:22 pm

Have you also tried forwarding X?
No software needed and no modifications on the RPi.
Antikythera

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: X11VNC headless resolution

Wed Jun 05, 2013 8:43 pm

How do you do that then?

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

chris57100
Posts: 521
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: X11VNC headless resolution

Thu Jun 06, 2013 6:18 am

When you connect to the Pi with SSH you activate the X11 forwarding (-X option or look in you session parameters, depends of the tool you use to connect), install a X11 server on your laptop (i have a Mac where i have a X11 server) and when in SSH you start a X11 command then it displays the result on the screen of your laptop.
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

ghans
Posts: 7385
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: X11VNC headless resolution

Thu Jun 06, 2013 9:12 am

MobaXTerm on Windows does this.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: X11VNC headless resolution

Thu Jun 06, 2013 9:20 am

This is about getting the normal LXDE screen up remotely - not a remote terminal session :)

And I think we are sorted now ta :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

clarkster
Posts: 1
Joined: Mon Jul 08, 2013 7:36 pm

Re: X11VNC headless resolution

Mon Jul 08, 2013 7:46 pm

Has anyone figured out how to make a higher resolution using X11VNC in headless mode?

I've tried this command....
hdmi_force_hotplug=1

alone and with....

hdmi_group=2
hdmi_mode=69 and 51 and 35

Nothings seems to give me a higher resolution than I get with only having hdmi_force_hotplug=1 alone.

When I boot with a TV attached, I get a much higher resolution on the TV screen and on my VNC client. I'd like to get this resolution when I am headless.

Anyone know how?

arold
Posts: 2
Joined: Sat Dec 07, 2013 11:28 pm

Re: X11VNC headless resolution

Sun Dec 08, 2013 3:17 am

I have the same problem as clarkster.

Has anyone manage to resolve this?

I have access to only 2 resolutions when no screen is plugged to the RPi:

If "hdmi_force_hotplug=1" is commented I get a resolution of 656x416 and if it is uncommented I get a resolution of 1184x624.

Changing the values of "hdmi_group" or "hdmi_mode" has no impact. Adding the "-geometry 1360x768" option to the x11vnc server only stretch those resolutions.

calvin
Posts: 1
Joined: Sat Mar 22, 2014 10:45 pm

Re: X11VNC headless resolution

Sat Mar 22, 2014 11:09 pm

I have found a solution that seems to work for me. Ymmv.

1. Make sure hdmi_force_hotplug=1 is commented in /boot/config.txt
The following doesn't seem to have any effect is hdmi_force_hotplug=1 is set. The vnc resolution is always 1184x624 if it's set.
2. Use fbset prior to starting X to change the resolution via the geometry (-g) command.
*NOTE: This must be done before X is started for the first time. Even if you shut down X, run fbset and the restart X, it does not seem to have any effect. A reboot is required to change the resolution after X has been started for the first time. I'm not sure why.
ie.
for 1280x720, 16 bit color:

Code: Select all

fbset -g 1280 720 1280 720 16
for 1920x1080 (1080p), 16 bit color:

Code: Select all

fbset -g 1920 1080 1920 1080 16
3. Start X

Code: Select all

startx
Alternatively, if you have X set to start at boot, you'll need to insert a script into init.d containing the fbset command and create a symlink in your default runlevel rc.d folder (probably rc2.d) starting with S with a lower number than the script that starts X so it runs first. I personally have X set to disable at boot and start it manually via ssh, so I haven't tried implementing this. The most proper way would probably be to create the init script and use update-rc.d to create the symlinks, there are guides online on how to accomplish that.

Hope this helps. Best of luck.

arold
Posts: 2
Joined: Sat Dec 07, 2013 11:28 pm

Re: X11VNC headless resolution

Sun Mar 30, 2014 9:02 pm

Thank you very much calvin! That solved the resolution problem for me too!!!

I have a standard Raspbian install where X start automatically. I didn't really knew in which file to put your command so I decided try adding a cron job that will be executed at every boot.

In a terminal, I entered:

Code: Select all

crontab -e
Afterwards, I simply added this line at the end of the file.

Code: Select all

@reboot /bin/fbset -g 1366 768 1366 768 16
After a reboot, I could VNC into the RPi and get a 1366x768 resolution!

I also noticed that, when using this solution, the fact that "hdmi_force_hotplug" is commented or not has no importance at all.

Thanks again to everyone!

lettcco
Posts: 4
Joined: Mon Dec 12, 2016 2:23 am

Re: X11VNC headless resolution

Wed Dec 14, 2016 2:56 am

I stumbled upon a problem(?) with the crontab -e setting:

omxplayer or mpg123 will stop working afterward. something along the line of ALSA fatal error.

Removing @reboot ... entry in crontab and reboort restore player functionality.

Anyone else has encounter this?

thirtythr33
Posts: 1
Joined: Sat Oct 07, 2017 5:46 pm

Re: X11VNC headless resolution

Sat Oct 07, 2017 5:49 pm

Hey everyone! I know this is an old thread, but it was the first I stumbled upon when trying to fix this same issue for myself.

It's very easy to change the VNC resolution.

Menu > Preferences > Raspberry Pi Configuration > Click "Set Resolution" and from there it should be self explanatory. No need to un-comment any code or even touch the console if your goal is to use the graphical interface anyway.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 64 guests