Xvnc ignores -dpi switch

Tristan Richardson tjr "at" orl.co.uk
Fri, 13 Mar 1998 18:53:46 +0000


> I've modified vncserver to give the flag "-dpi 75" (a standard X
> server flag that Xvnc claimes to honor) to Xvnc, but xdpyinfo reveals
> that the resulting X server always thinks it's running on 100 dpi
> hardware.

Yes unfortunately this is hard-coded in Xvnc/programs/Xserver/hw/vnc/init.c at
the moment - a hang-over from some X consortium code.  We'll fix it in the
next release.  In the meantime you could try the following patch on init.c (I
haven't tried it myself yet):

328a329,334
>     extern int monitorResolution;
> 
>     if (monitorResolution != 0) {
>       dpix = monitorResolution;
>       dpiy = monitorResolution;
>     }

Cheers

Tristan

+--------------------------------------------------------------------+
|  Tristan Richardson                 Email:  tjr "at" orl.co.uk          |
|  ORL                                  Tel:  +44 1223 343000        |
|  24a Trumpington Street               Fax:  +44 1223 313542        |
|  Cambridge, CB2 1QA, UK               WWW:  http://www.orl.co.uk/  |
+--------------------------------------------------------------------+
|          ORL - The Olivetti & Oracle Research Laboratory           |
+--------------------------------------------------------------------+