LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-22-2017, 07:12 AM   #1
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Rep: Reputation: 87
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.
 
Old 09-22-2017, 08:46 AM   #2
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
You might get some input from this link:

https://wiki.archlinux.org/index.php/HiDPI
 
Old 09-22-2017, 09:29 AM   #3
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Original Poster
Rep: Reputation: 87
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.)
 
Old 09-22-2017, 10:59 AM   #4
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

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

Click image for larger version

Name:	java-scale.jpg
Views:	79
Size:	107.4 KB
ID:	25936
--
Seb
 
Old 09-22-2017, 02:17 PM   #5
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Original Poster
Rep: Reputation: 87
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...
 
Old 09-23-2017, 08:35 AM   #6
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Concerning MATLAB needing pam, you might find this solution useful.

chris
 
Old 09-23-2017, 10:33 AM   #7
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Original Poster
Rep: Reputation: 87
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.
 
Old 09-25-2017, 01:47 PM   #8
cgorac
Member
 
Registered: Oct 2009
Posts: 146

Original Poster
Rep: Reputation: 87
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.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the methodology of creating GUI toolkits bindings with functional languages ? Sergei Steshenko Programming 2 11-20-2012 04:11 PM
How do GUI toolkits and window managers communicate. abhishekbatra Programming 6 12-02-2009 10:07 PM
AJAX toolkits nbcohen Programming 3 06-21-2009 09:06 AM
GUI application design toolkits. which one? name_in_use450 Programming 3 08-25-2004 07:56 PM
Learning more than one toolkits? melinda_sayang Programming 4 04-28-2004 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration