You are not logged in.
So I have a mixed DPI setup on X11 with separate X screens for each display so they can have independent DPIs. This works and will adjust the text in say Emacs to be the appropriate size on each monitor. However GTK UI stuff (and text in Firefox) doesn't seem to scale at all regardless of what I set Xft.dpi in .Xresources on each screen to be, what the X org config DPI is for the screen is etc. I can change it by doing
export GDK_SCALE=2before launching a program like Firefox in a terminal but obviously that gets old fast. When I try to do something like
DISPLAY=:0.1 export GDK_SCALE=2in my .xinitrc this ends applied to all my monitors regardless. Is there some correct way to set an environment variable like this to apply on a per X screen basis on X11's startup?
Last edited by salamanderjuice (2021-04-08 15:32:19)
Offline
Environment variables are not per screen, but per shell.
So you want to *test* for the $DISPLAY and export the GDK_SCALE to whatever you use to launch off everything else accordingly.
(in doubt post your xinitrc)
Offline
Okay that makes sense. I did try
if [ $DISPLAY = ":0.1" ]
then
export GDK_SCALE=2
fiin my .xinitrc but that doesn't work either. The entirety of my .xinitrc right now is just
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
DISPLAY=:0.1 export GDK_SCALE=2
exec stumpwmI guess I could make stumpwm check when I create an xterm or launch a shell command but I was hoping for something that'd let me be lazy I guess.
Offline
Your xinitrc is broken, last link in my signature.
How do you launch processes on :0.1 to begin with?
You don't run a WM or any shell there, but just "DISPLAY=:0.1 emacs"??
Offline
Stumpwm handles it I guess. It's launched across all 3 screens and I can switch between them. But nothing in their documentation that I could see explains how it handles that.
Thanks for the tip on my broken xinitrc. Doesn't seem to have resolved the issue though.
Offline
The xinitrc link is indeed unrelated and just to guarantee that you've a sane session.
StumpWM indeed seems to handle mutliple screens fine, but I've no experience w/ the WM.
Who exactly do you get from "exec stumpwm" to "missized GTK client"? Do you launch them w/ a shortcut or do you just trigger an xterm and launch stuff from there? Or do you use an external runner like dwm, rofi etc?
In any event, this is where you want to intercept, thest the DISPLAY and set GDK_SCALE accordingly.
Offline
Shortcut/xterm. I think I should be able to configure all them to do that as it's all customizable in lisp, just wish I didn't need to! Thanks.
Offline