The officially official Devuan Forum!

You are not logged in.

#1 2022-03-23 10:38:13

penguin
Member
Registered: 2019-05-05
Posts: 30  

How to change menu and content font size of Xorg applications

I'm using LXQt vesion 0.16.0 in Xorg.

The resolution of screen is 3840 x 2160.

Libreoffice Writer,  Brave Browser, Firefox ESR, and etc. would not honor the LXQt's system font settings.

The default DPI value was 96. I tested higher DPI values and 124 was right size for me.

To set 124 as default DPI in Xorg, I created ~/.Xresources file as below. And then modified Xorg startup script files.

You can test font size of new DPI value by run xrdb command in X terminal application. And then, run an Xorg application to see the effect.

xrdb -merge ~/.Xresources 

To see Xresources setting, run 'xrdb -query -all' 

$ xrdb -query -all
Xft.dpi:        124

To load the DPI value when Xorg starts up, write the below line before the Xorg Window manager, i.e. LXQt 'exec startlxqt' in this case.

xrdb -merge -I$HOME ~/.Xresources &

~/.Xresources

Xft.dpi: 124 

~/.xprofile

IM='uim'
export GTK_IM_MODULE=$IM
export XMODIFIERS='@im=$IM'
export QT_IM_MODULE=$IM
export XIM=$IM
uim-xim &
uim-toolbar-gtk3-systray & 
xrdb -merge -I$HOME ~/.Xresources &

~/.xinitrc

#!/bin/sh

. ~/.xprofile
exec startlxqt

Offline

#2 2022-03-23 20:52:21

thierrybo
Member
Registered: 2017-11-11
Posts: 107  

Re: How to change menu and content font size of Xorg applications

Maybe if you want a more "Debian way" and use automatic X handling provided by Debian, just replace "~/.xprofile" by "~/.xsessionrc" without xrdb line:

~/.xsessionrc

IM='uim'
export GTK_IM_MODULE=$IM
export XMODIFIERS='@im=$IM'
export QT_IM_MODULE=$IM
export XIM=$IM
uim-xim &
uim-toolbar-gtk3-systray & t

and in  ~/.xinitrc just

#!/bin/sh

exec /etc/X11/Xsession /usr/bin/startlxqt

and ~/.xsessionrc and xrdb will be automatically read/run.

Offline

Board footer