Comments for https://horstmann.com/unblog/2023-01-07/index.html
Comments for: https://horstmann.com/unblog/2023-01-07/index.html
- SStephen Gilbert @stephendgilbert
Wow, I'm really behind in reading your unblog. Just a note, if you have to use Windows again. If you right-click the taskbar, you can unlock it and then move it to the right or left (and then lock it again if you like). The first thing I always do in Windows is move the taskbar to the right (which seems easier to me than the left).
- CCay Horstmann @cayhorstmann
Hi Steve, that's not what I want. I want it VERTICALLY on the left, so that it doesn't consume precious pixel rows. Like this image: https://raw.githubusercontent.com/addy-dclxvi/tint2-theme-collections/master/preview-launchy.jpg
- SIn reply tosystem⬆:Steve Hamilton @Steve_Hamilton
You were right about the .Xresources file. Putting the dpi scaling setting in there does mostly fix openbox for me. Most things are readable now without having to change resolution with xrandr. My monitor's max supported resolution is 3200x1800. But a quick question, how did you come up with the value of 192? It just seems like an arbitrary #, what's the reasoning behind choosing that value?
- CCay Horstmann @cayhorstmann
Hi, the original 1920x1200 screen has 96 dpi, so the 3840 x 2400 screen of the same physical size has 2x96=192dpi. Run
xdpyinfo | grep resolution
to find your monitor's resolution.
- TIn reply tosystem⬆:Saki Izumi @thecheddarcheese
The
GDK_SCALE=2
variable works for most apps, but pavucontrol becomes giant, and the setting doesn't seem to support decimals... Welp, guess I'll have to use a cli tool or just live with a weird ui.Anyway, great post! Helped me a lot with the setup, so thanks for that.
- TSaki Izumi @thecheddarcheese
Alright, I have one issue, now that I've set GDK_DPI_SCALE=0.5 and GDK_SCALE=2 for everything, my cursor changes size across apps. I fixed this earlier by modifying ~/.config/gtk-3.0/settings.ini, but it seems to have appeared again now. Any ideas?
- CCay Horstmann @cayhorstmann
Hi, as it happens, I had to do this all over again last week, and the cursor size is working for me. What app isn't cooperating?
- RIn reply tosystem⬆:Greg A. Woods @robohack
A couple of notes:
On macos the usable resolution for the native GUI is limited -- on a truly high-resolution display, such as Apple's XDR Pro display, the native display resolution is 6016x3374, but macos itself cannot make use of this resolution without suffering the same problems of tiny fonts and even tinier icons and widgets, and so by default macos uses 3008x1692. It is claimed that there's some magic happening in the GPU to make some use of the additional resolution with font aliasing and image enhancement, but I don't know for sure any of the details.
I still use lots of X applications, including from other servers, and so I also run XQuartz on my mac, and I do so with XQuartz running in full-screen mode at the full 6016x3374 resolution.
To do this I do things a little the other way around from how you describe -- I tell XQuartz what the display resolution is with the macos
defaults
tool, and I have a call toxrandr
in my~/.xinitrc
that selects the maximum screen resolution. To switch back and forth from native macos to X11 I have a shortcut bound to the "option-command-a" key that callsxrandr
again.I use M4 macros to set my X11 resources, and some font aliases, to set the correct resolutions for the current display. This way everything in my setup is flexible enough to work on any screen at any resolution.
I recently had a chance to do a little work on a friend's Linux laptop and I was able to use my exact same
~/.xinitrc
and all its related files to start X on the laptop, provided that I told the Xserver what the laptop's native screen resolution was because it didn't seem to be able to find and set it itself, i.e. by starting X usingstartx -- -dpi 333
. Without the-dpi
argument the resolution reported byxdpyinfo
was wrong and fonts, etc., didn't work right at all.Anyway, my complete setup can be found here: https://github.com/robohack/dotfiles
I'm still really sad that the legacy XLFD specification for fonts didn't get updated to dynamically use the screen's resolution when it became a front-end for Xft -- a lot of the complexity of my setup would be unnecessary if that had happened.
It's also dismaying that so many additional unnecessary environment variables and X resources have been created by various toolkits and apps to manage their UI scaling. If the Xserver's screen resolution were reliable and always used then none of those would be necessary either. Even Xft should default to the screen resolution and not require its
Xft.dpi
resource to be set!!! There's also a lot of confusion and outright mis-information out there about using high-res displays with X11 -- your post is so far one of the least problematic I've seen!I'm going to have to look into this
Xcursor.size
resource you mention -- in my setup I use the scalable cursor font and I haven't run acrossXcursor.size
before.BTW, I normally use the
ctwm
window manager, and I have some patches to make it do the right thing to set its default font resolutions. For now I just live with tiny icons -- they take up less screen real-estate!