Graphical equivalent to /dev/null?

3

I'm trying to run a GTK-based plotting library that I wrote over an SSH terminal that's too slow to run an X session over. GTK assumes that a graphical display is present and won't work otherwise. However, I only want to use this library to generate plots and save them to a file, not display them on the screen. Is there any way I can set up a graphical equivalent to /dev/null as my graphical display, without root access to the machine in question? Such a device would report sane values for resolution and depth (1280x1024, 24-bit, for example), and report that all screen drawing commands succeeded without doing anything, and make GTK think there was a real graphical display present.

dsimcha

Posted 2010-07-20T13:04:00.270

Reputation: 1 074

Answers

5

Check out xvfb: "X virtual framebuffer is an X11 server that performs all graphical operations in memory, not showing any screen output."

edit Whoops, I missed that bit about not having admin access (edit: it wasn't bolded then). Probably not an option then unless it's already set up.

intuited

Posted 2010-07-20T13:04:00.270

Reputation: 2 861

Good answer anyways. I have only ever heard of this being done using either xvfb or vnc / x11vnc. There's not much you can do to change the basic configuration of the x server without any admin privileges. – DaveParillo – 2010-07-20T15:04:27.563

1It seems like, at least in theory, you could hook into ssh to present a dummy X display that would catch and discard the data that would normally go back through -X. But I have about 0% of the considerable knowledge that would be necessary to estimate the practicality of such an endeavour. – intuited – 2010-07-21T05:01:09.467

1

Another option is to use X.org's dummy video driver and void input driver. Using them will start a X server that does not connect to hardware and has little or no backing store. Pass -config to Xorg to use a separate config file you supply.

Ignacio Vazquez-Abrams

Posted 2010-07-20T13:04:00.270

Reputation: 100 516

1Can this be done w/o root access? – dsimcha – 2010-07-20T15:13:44.847

1Provided the drivers are already in place, yes. – Ignacio Vazquez-Abrams – 2010-07-20T15:58:33.223

1@dsimcha: on ubuntu look for package xserver-xorg-driver-dummy – DaveParillo – 2010-07-21T00:51:51.310