Ubuntu: set correct DPI for X server
You can use utilities
Note: X Window System has it's own DPI value set in
UPDATE: There's a bug in Ubuntu 7.04 Feisty Fawn in xorg module, so that xorg doesn't honor DisplaySize line in xorg.conf.
xdpyinfo | grep resolution
and xrdb -query
to get current DPI value. To change DPI values create a file ~/.Xresources
or edit ~/.config/xfce4/Xft.xrdb
(if using XFCE4) and add line:Xft.dpi: 96Or you can edit directly
/etc/X11/xorg.conf
and under "Monitor"
section add a line:DisplaySize XXX XXX (in my case it's 270 203)
XXX
is calculated by using formula 25.4 * pixels (height or width) / DPI.Note: X Window System has it's own DPI value set in
/etc/X11/xorg.conf
; desktop environment, for example XFCE4 - in ~/.config/xfce4/Xft.xrdb
; Mozilla Firefox - in browser.display.screen_resolution
(about:config
).UPDATE: There's a bug in Ubuntu 7.04 Feisty Fawn in xorg module, so that xorg doesn't honor DisplaySize line in xorg.conf.
7 Comments:
excelente.
me funcionó perfecto. thanks.
i'm a newbie of xubuntu.
when i mousepad my ~/.config/xfce4/Xft.xrdb , it's empty. i put line:
Xft.dpi: 96
and try to save and exit, it shows up:
can't open file to write
any idea?
you need to be root to edit some files. so try...
sudo mousepad ~/.config/xfce4/Xft.xrdb
Files located in your home shouldn't be owned by root, especially configs like this one. Check its permissions and owner with "ls -l PATH/TO/FILE" which should look something like -rw-XXXXXX X your_user some_group .... X's are irrelevant but the rw part should be like that and your_user be your username. If not try "chmod u+w" and "sudo chown your_user filename". Hope that helps.
by the way - why did I get wrong DPI at all?
I saw very small font after playing with Compiz, but it was OK before.
thanks alot!
playing around with some different desktop environments and this suddenly happened. gotta love google :)
I really enjoyed your blog posts thank you.
Post a Comment
<< Home