LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   HiDPI and various GUI toolkits (https://www.linuxquestions.org/questions/slackware-14/hidpi-and-various-gui-toolkits-4175614300/)

cgorac 09-22-2017 07:12 AM

HiDPI and various GUI toolkits
 
Recently I've upgraded to laptop with high DPI, it has 17 inch screen with 3840x2160 resolution. I'm using NVIDIA binary driver, and according to what I was doing with my previous laptop, that had 15 inch screen in 1920x1200 resolution and also NVIDIA GPU, I read the screen dimensions from xrandr output, and created corresponding /etc/X11/xorg.conf.d/90-monitor.conf file. That was enough for my WM (it's Openbox), and plain X (like xterm) and Qt applications to get correct DPI, and display text and most of its GUI elements in correct size. I had trouble with GTK applications (like Emacs or Firefox), but eventually setting GDK_DPI_SCALE environment variable to 2 fixed it. So now most of the apps that I use is displayed correctly, but still there are several applications using different GUI toolkits that are displayed with very small text and GUI elements, like Xpdf (using Motif), xfig (using X Athena widgets) and Matlab (using Java, I guess). I tried to find how to inform these toolkits about correct DPI, but to no avail so far, so - does anyone have any suggestion?

Thanks.

jostber 09-22-2017 08:46 AM

You might get some input from this link:

https://wiki.archlinux.org/index.php/HiDPI

cgorac 09-22-2017 09:29 AM

Thanks for your reply, that resource is well known (probably the best one for HiDPI on Linux) and I've actually checked it first, but it doesn't mention Motif nor Athena, and their suggestion for Java applications also was not helpful for me in Matlab case. (Moreover, their GTK suggestion didn't worked for me either - as mentioned in my post above, I had to set GDK_DPI_SCALE instead of GDK_SCALE to make GTK applications displayed properly on my screen.)

phenixia2003 09-22-2017 10:59 AM

1 Attachment(s)
Hello,

About java, hidpi is supported since java 9 (you need to use GDK_SCALE). you can get it here, there, and there.

Attachment 25936
--
Seb

cgorac 09-22-2017 02:17 PM

Thanks. I'm using MATLAB 2016, which in turn seems to be using JRE 1.7. I'll see to check did they updated JRE in MATLAB 2017, but probably not to Java 9, plus there is a problem that version 2017 requires libpam...

chris.willing 09-23-2017 08:35 AM

Concerning MATLAB needing pam, you might find this solution useful.

chris

cgorac 09-23-2017 10:33 AM

Thanks, as you can see above I linked this thread myself - I read it carefully, and I think I understand what to do in case I install MATLAB 2017.

cgorac 09-25-2017 01:47 PM

Just to report that I've installed MATLAB R2017a, and fixed the libpam issue according to suggestions provided in the other thread. I've also installed JRE for Java 9 from here. However, it seems that this version of MATLAB won't start with Java 9, as if I try to start it with "MATLAB_JAVA=/path/to/jre9 /path/to/matlab", it keeps reporting "-Djava.ext.dirs=/opt/MATLAB/sys/java/jre/glnxa64/jre/lib/ext is not supported. Use -classpath instead" error. So I wasn't able to try the pixel scaling. (For the record, it was also necessary to manually create /path/to/jre9/lib/amd64 directory, and then symlink /path/to/jre9/lib/server into this directory, in order to overcome the first problem encountered when trying to run MATLAB using this version of JRE.)


All times are GMT -5. The time now is 01:32 PM.