Xvfb and -dpi not working

Kirby C. Bohling kbohling at birddog.com
Mon Feb 14 09:37:08 PST 2005


I'm trying to resolve some issues I'm having.  The long and the
short of it is, I have an application (an Oracle9iAS Server), that
is using Java, which eventually interacts with X to render fonts for
PDF reports.  I'm running on a RHEL2.1 server, which runs the
version of X from pre-XFree86 fork.  However, I'm fairly confident
the expertise I need is still on this list.  I might file a bug thru
RedHat, but I was hoping I'd have better luck here.  I've tried this
w/ RHEL2.1 and RHEL3.0 versions of XFree86 (4.1 and 4.3
respectively)

After much anst, I've figured out that if I run my reports with
DISPLAY variable pointing to a 90dpi server, I get different results
then if I run the reports at a server running 100dpi.  In the end,
my desktop monitor is 90x89 DPI (as reported by xdpyinfo).

I'm running Xvfb and pointing the reports server at that for the
automated report generation.  So all my reports look right at 90DPI.
I'd really like to run Xvfb at 90 DPI.  So naturally, I tried
setting it via:

Xvfb :1 -screen 0 1280x1024x24 -pixdepths 1 8 16 24 32 -fbdir /tmp/ -dpi 90 -pn -fp "unix/:7100"

No joy.  xdpyinfo -display :1 still reports 100x100 DPI.

I've looked into it, and I can set my desktop by adding an
appropriate line to my XF86Config file like so:

	# Runs at 100x100 @ 1280x1024
    DisplaySize  325   260
	# Runs at 90x89 @ 1280x1024
    #DisplaySize  360    290 

That fixes my desktop (running the binary X, not Xvfb) so that it is
at 100x100 (now running on my desktop, I get the same bad looking
reports I get from the automated system).  My reports look right at
90x90.  I've run strace on Xvfb and I don't see it ever accessing
any type of config file.  The only way I've found that I can alter
the DPI, is by choosing a really small Window size.  However, even
then I can't get the DPI I want.

Any chance someone on this list knows how to force Xvfb to respect
the "-dpi" flag.  If you can come up with a way using Xnest, I'd
take that too.  I tried pointing Xnest at Xvfb and using the -dpi
flag on Xnest, and it wouldn't work for me either.

An explaination that I'm just stuck, would suck, but telling me
there's no way to get around this would be helpful to.  I've tried
working around this on XFree86 v 4.1 and 4.3, I'm assuming it is
still a problem in X.org's version.

	Thanks in Advance,
		Kirby



More information about the xorg mailing list