3

I run Xvfb with command:

Xvfb :1 -screen 0 100x100x16 -fbdir /tmp

And it's working fine. I can connect via VNC, and now under /tmp directory I have Xvfb_screen0 binary file.

I thought it will act like /dev/fb0 so I tried to change its settings with fbset like:

sudo fbset -fb /tmp/Xvfb_screen0 -xres 500 -yres 500

But the command finishes with error:

ioctl FBIOGET_VSCREENINFO: Inappropriate ioctl for device

Is there any way to change running Xvfb server resolution?

2
+100

I am not certain that Xvfb supports resizing. If your main interest is VNC, perhaps you should try TigerVNC. It's a modern VNC server that supports RandR and Xinerama. Screen resizing and multiple monitors work very well in TigerVNC.

  • I can't see how TigerVNC is supposed to allow me to resize Xvfb's framebuffer. If xrandr is not working, how will XrandR work? – Jezor Jul 20 '16 at 2:08
  • 1
    @Jezor I never implied that TigerVNC will support changing Xvfb. I was suggesting using TigerVNC instead of Xvfb+VNC. TigerVNC supports RandR and Xinerama extensions. xrandr is a command line interface to RandR. – Satya Mishra Jul 20 '16 at 15:34
  • Does TigerVNC support creating of virtual X server? What I want is: start a new x session in different TTY than the default and then start VNC server to use that session, but I want it to be independent from other x sessions on other TTYs. – Jezor Jul 20 '16 at 19:46
  • 3
    @Jezor As I understand, Xvfb renders entirely in memory without dependence on a physical output device. So it has nothing to do with TTYs. TigerVNC supplies a X server (Xvnc) that operates similar to Xvfb (no physical display device is needed) , except it supports more extensions and the rendered output is available to VNC clients. It works best with the TigerVNC client. You can start as many independent Xvnc sessions as you want. – Satya Mishra Jul 20 '16 at 20:47
1

By specifying −fbdir parameter, it's creating the memory mapped files containing the framebuffer memory, not a frame buffer device.

According to fbset manual, the -fb accepts only frame buffer device node, not a memory mapped file. So I believe the proper syntax would be:

fbset -fb /dev/fb0 500x500

where /dev/fb0 is your frame buffer device (e.g. /dev/fb/0 or /dev/fb0).

To make frame buffer device known to X, define FRAMEBUFFER variable, e.g.

export FRAMEBUFFER=/dev/fb0

See also man fbdev for more details.

To read /tmp/Xvfb_screen0, you should use xwud command instead, e.g.

xwud -in /var/tmp/Xvfb_screen0

which will displays screen 0 of the server.


Most likely it's not possible to change the resolution on the existing X server, so probably you need to re-run Xvfb server, or invoke another screen with different resolution.

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.