Constant DPI regardless of resolution

David De La Harpe Golden david.delaharpe.golden at gmail.com
Mon Jun 30 22:40:50 PDT 2008


Nikos Chantziaras wrote:

> I'm on VESA for running natively and xf86-vmware for running in a VM.  I 
> was hoping for a "set and forget" option either in xorg's arguments or 
> xorg.conf rather than having to open the CLI and call xrandr each time I 
> switch resolution.

(I don't know enough about X.org to know if there's any such
option lurking, anyway...)

Workaround suggestion: command line tools can be wrapped very
easily indeed with tcl/tk to give a throwaway GUI tool (e.g.
wish script below!).

Maybe a feature request to an existing nicer xrandr gui tool
like krandrtray is a better long term option, of course -
there are quite a lot of devices with the behaviour you described.

(On unix/linux, once something has a command line interface, it
can typically have a minimal gui flung together for it in minutes.
tcl/tk is not necessarily pretty, but it works.  Though
to be fair, tk recently had a makeover (8.5 uses nonsucky font
drawing on linux), and can be used with quite a few languages
besides tcl.)


#!/usr/bin/wish

set dpi "86"

set pxsizes { "1280x1024" "1024x768" "640x480" }

foreach pxsize $pxsizes {
    button .$pxsize -text $pxsize  \
        -command "exec xrandr -s $pxsize --dpi $dpi ; exit"
    pack .$pxsize
}













More information about the xorg mailing list