The problem with some non-HiDPI aware applications (is that they're very small)

July 22, 2018

I tweeted:

One problem with a HiDPI monitor is the occasional application that absolutely doesn't upscale. For example, the Java that I need to access the KVM-over-IP console of this locked up NFS fileserver.

Our current fileservers are old enough Supermicro machines that their onboard IPMIs only support KVM-over-IP through a Java Web Start application. Today, I needed to use it from home, and I was only a little bit surprised when the resulting virtual console was, well, tiny on my new home HiDPI display.

(I was a bit surprised at how visually tiny it came out, but then I keep being surprised at how small 'half their normal size' has actually been on my new display. And the virtual console wasn't really a giant window to start with on my non-HiDPI work displays, at least in the basic 'text' VGA mode.)

Some modern applications are HiDPI aware, and others at least provide settings for the fonts and font sizes that they use. It's possible that Supermicro's Java program has settings for this (I was in a hurry so I didn't look, although here's Arch's Java information), but I have a sneaking suspicion that it doesn't. For applications like this, the end result is tiny, hard to read or use application windows, either permanently or until I can find how to adjust the application (which may not be worth it if I only use the app occasionally). Since I'm likely to run into this periodically, I should work out a decent general solution to it someday.

In the bright future of Wayland, it will presumably be theoretically possible to have your Wayland compositor automatically scale windows according to your desires, so old non-HiDPI X applications being run in some sort of compatibility mode can just be zoomed up however much you want (since all of this is OpenGL based, and my understanding is that OpenGL has good support for that kind of thing). In the current reality of X Windows (at least, it's my current reality and hopefully future reality), I need a different solution. To date, I know of two.

The easiest option and one that's probably already available, even in basic X environments like mine, is a screen magnifier such as KMag. KMag has the moderate inconvenience that it can't be told to magnify a given (X) window, although you can awkwardly set it to magnify an area of the screen instead of wherever your mouse cursor is. Since I already have KMag installed, this is probably my default choice.

Other than that, the Arch wiki has a section on unsupported apps which led me to run_scaled, a shell script that uses xpra to relatively transparently run programs with forced scaling. Run_scaled is a pretty big hammer and it has some drawbacks, partly because your program is running in a separate X server. I could probably make it work for Java Web Start stuff with some effort, but it's more awkward than just resorting to KMag; I'd need to get my browser to run my javaws cover script instead of the real javaws.

(Fedora is already using its alternatives system to pick who gets to be /usr/bin/javaws, so in theory I could just set my script up as that and then pass things off to the IcedTea version.)

(I initially thought of playing tricks with Xephyr plus xrandr for scaling the 'display' inside Xephyr, but the more I think about it the less sense that approach makes. I think I'd be better off using run_scaled.)

Comments on this page:

From at 2018-07-22 06:39:53:

Oh, Java-based KVM-over-IP... We have servers with both HP iLO and Dell iDRAC, and each is more painful than the other.

Wrote a Python script to automatically log in to these controllers, fetch the Webstart file, adjust its false compatibility claims (such as that one DRAC 5 server which only works with Java 6, but of course javaws tries to run it via Java 10), etc.

But OTOH all of them support the IPMI protocol over LAN, so things like power-cycling can be done through ipmitool power or ipmi-power (freeipmi). And for Linux servers there's even Serial-over-LAN, which also works through the same ipmitool sol or ipmi-console.

As far as I could find, both IPMI Serial-over-LAN and the power commands are supported by many Supermicro servers. What's your experience with that?

Shifting to ipmi sol will make you a happier camper; but I’m sure there will still be other apps that have scale problems.

By cks at 2018-07-22 15:45:21:

I needed the (Java) KVM-over-IP only to see the machine's console, so I could see if I could fix it short of a power cycle or if there were any useful console messages or the like. The Supermicro IPMIs support power cycling through their web interface, which I was already going through to get to the KVM-over-IP. Our experience is that power cycling through the web interface works fine (as does doing it through the menu in the Java applet).

Serial over LAN has two issues for us. In general I trust the machine's 'physical' console more than I do any serial interface, both for looking at the system's state and for dealing with reboot problems; even on Linux we've seen unusual limitations. In specific with these machines, the problem is that they're OmniOS machines and we've never been able to get serial consoles working on them. Even if we did get serial consoles nominally working, I'm not sure I'd fully trust them.

(I'm also extremely down on the relatively terrible CLI interface you get if you SSH in to the IPMI. I know it's a standard, but why does it have to be such a bad one?)

From at 2018-07-24 08:02:27:

(I'm also extremely down on the relatively terrible CLI interface you get if you SSH in to the IPMI. I know it's a standard, but why does it have to be such a bad one?)

Hmm, never heard of that being a standard. AFAIK, each manufacturer crafts its own, just like with web UIs, and the only standard protocol is IPMI. (Which has a certain ugliness of its own, admittedly.)

Although if I have my definitions right, "IPMI" indeed refers just to the network protocol (spoken over UDP/IP or I2C) -- not to the physical controller device (that's the "BMC").

So my original point was that you can control a remote BMC via your local client of choice, like ipmitool or FreeIPMI, without having to SSH into the device.

Written on 22 July 2018.
« How we're handling NFS exports for our ZFS on Linux systems
The irritatingly many executable formats of Windows »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Jul 22 03:01:52 2018
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.