Dpi scaling problem - Ubuntu 20.04
Thursday, 15 October 2020 · 4 messages · last reply 18 Oct 2020
S
Silamphre15 Oct 2020 16:06 #
Hello everyone,
I started using BaseX for a class project a few days ago. I'd like to run it on my Ubuntu 20.04. I've installed openjdk version 14 to do so.
I've set my Ubuntu display settings at 125% fractional scaling, but it appears that BaseX does not scale with this setting. The GUI consequently appears really tiny, almost unusable.
Does someone have a way to solve this issue, and make BaseX scales accordingly to my Ubuntu display settings, please?
Thank you for your help.
Kind regards,
Hugo
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
BD
Bridger Dyson-Smith15 Oct 2020 21:32 #
Hi Silamphre,
I'm not sure if this will help or not, but editing the
basexgui script to include -Dsun.java2d.uiScale=1.25 might help[1]? I confess that I don't have UI scaling enabled on my unix-like system, or maybe you've already tried that approach.
Hope that helps!
Best,
Bridger
[1]
https://stackoverflow.com/questions/58699877/how-to-fix-scaling-of-a-java-based-application-on-a-high-dpi-display-in-linuxQuoted text · Silamphre · 25 lines
On Thu, Oct 15, 2020 at 12:06 PM Silamphre <hugoscheithauer at gmail.com> wrote: > Hello everyone, > > I started using BaseX for a class project a few days ago. I'd like to run > it on my Ubuntu 20.04. I've installed openjdk version 14 to do so. > > I've set my Ubuntu display settings at 125% fractional scaling, but it > appears that BaseX does not scale with this setting. The GUI consequently > appears really tiny, almost unusable. > > Does someone have a way to solve this issue, and make BaseX scales > accordingly to my Ubuntu display settings, please? > > Thank you for your help. > > Kind regards, > Hugo > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti > sans virus. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > <#m_240745489779756524_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >
BD
Bridger Dyson-Smith16 Oct 2020 06:12 #
Hi Hugo -
[responding to the list, too, because I'm well-known for missing the obvious! :)]
Quoted text · Silamphre · 12 lines
On Thu, Oct 15, 2020 at 4:26 PM Silamphre <hugoscheithauer at gmail.com> wrote: > Hi Bridger, > > Thank you for your kind reply and your assistance. I have tried using that > command directly in the Ubuntu terminal, but unfortunately it works only > when I set the value to 2, which is way too big for an interface aha. It > seems to only be working with integers. > I'll try editing the script, but since it refers to a java program and I'm > not familiar with it, do you know if I can just copy that command line in > the script, or if I need to write a more specific command line ? > > On a different OS, I had problems with JDK font rendering, so I was adding
flags like this to BaseX in the
basexgui script like so:# Run code
exec java -cp "$CP" -Dsun.java2d.uiScale=2.0 $BASEX_JVM org.basex.BaseXGUI
"$@"i.e. adding the flag *after* the
-cp/classpath flag in the command.
I just tried this on my current Linux system, and by bumping the number a bit, I did increase some of the scaling, but only in the editor pane of the GUI; i.e. I noticed the scaling particularly in the tabs. To be honest, I'm not sure what to make of that, or how to take a different approach. Maybe Christian or another use can give us some insights.Quoted text · Bridger Dyson-Smith · 2 lines
> Thank you again. >
You are most welcome. Sorry that we couldn't get it completely solved.
Kind regards,
Quoted text · Bridger Dyson-Smith · 3 lines
> Hugo > > Best,
Bridger
Quoted text · Bridger Dyson-Smith · 43 lines
> Le jeu. 15 oct. 2020 à 19:32, Bridger Dyson-Smith <bdysonsmith at gmail.com> > a écrit : > >> Hi Silamphre, >> >> I'm not sure if this will help or not, but editing the `basexgui` script >> to include `-Dsun.java2d.uiScale=1.25` might help[1]? I confess that I >> don't have UI scaling enabled on my unix-like system, or maybe you've >> already tried that approach. >> Hope that helps! >> Best, >> Bridger >> >> [1] >> https://stackoverflow.com/questions/58699877/how-to-fix-scaling-of-a-java-based-application-on-a-high-dpi-display-in-linux >> >> On Thu, Oct 15, 2020 at 12:06 PM Silamphre <hugoscheithauer at gmail.com> >> wrote: >> >>> Hello everyone, >>> >>> I started using BaseX for a class project a few days ago. I'd like to >>> run it on my Ubuntu 20.04. I've installed openjdk version 14 to do so. >>> >>> I've set my Ubuntu display settings at 125% fractional scaling, but it >>> appears that BaseX does not scale with this setting. The GUI consequently >>> appears really tiny, almost unusable. >>> >>> Does someone have a way to solve this issue, and make BaseX scales >>> accordingly to my Ubuntu display settings, please? >>> >>> Thank you for your help. >>> >>> Kind regards, >>> Hugo >>> >>> >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti >>> sans virus. www.avast.com >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>> <#m_8249631326652388190_m_-8493036691201945712_m_240745489779756524_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>> >>
CG
Christian Grün18 Oct 2020 16:13 #
Hi Silamphre,
DPI scaling might be improved with a future version of Java (we only have limited means of improving rendering with Swing). With version of the JDK are you currently using / have you tried different versions?
Best,
Christian
Quoted text · Bridger Dyson-Smith · 93 lines
On Fri, Oct 16, 2020 at 4:12 AM Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > Hi Hugo - > > [responding to the list, too, because I'm well-known for missing the > obvious! :)] > On Thu, Oct 15, 2020 at 4:26 PM Silamphre <hugoscheithauer at gmail.com> > wrote: > >> Hi Bridger, >> >> Thank you for your kind reply and your assistance. I have tried using >> that command directly in the Ubuntu terminal, but unfortunately it works >> only when I set the value to 2, which is way too big for an interface aha. >> It seems to only be working with integers. >> I'll try editing the script, but since it refers to a java program and >> I'm not familiar with it, do you know if I can just copy that command line >> in the script, or if I need to write a more specific command line ? >> >> On a different OS, I had problems with JDK font rendering, so I was > adding flags like this to BaseX in the `basexgui` script like so: > > ```shell > > # Run code > exec java -cp "$CP" -Dsun.java2d.uiScale=2.0 $BASEX_JVM org.basex.BaseXGUI > "$@" > ``` > > i.e. adding the flag *after* the `-cp`/classpath flag in the command. > > I just tried this on my current Linux system, and by bumping the number a > bit, I did increase some of the scaling, but only in the editor pane of the > GUI; i.e. I noticed the scaling particularly in the tabs. To be honest, I'm > not sure what to make of that, or how to take a different approach. Maybe > Christian or another use can give us some insights. > > > >> Thank you again. >> > You are most welcome. Sorry that we couldn't get it completely solved. > > Kind regards, >> Hugo >> >> Best, > Bridger > > >> Le jeu. 15 oct. 2020 à 19:32, Bridger Dyson-Smith <bdysonsmith at gmail.com> >> a écrit : >> >>> Hi Silamphre, >>> >>> I'm not sure if this will help or not, but editing the `basexgui` script >>> to include `-Dsun.java2d.uiScale=1.25` might help[1]? I confess that I >>> don't have UI scaling enabled on my unix-like system, or maybe you've >>> already tried that approach. >>> Hope that helps! >>> Best, >>> Bridger >>> >>> [1] >>> https://stackoverflow.com/questions/58699877/how-to-fix-scaling-of-a-java-based-application-on-a-high-dpi-display-in-linux >>> >>> On Thu, Oct 15, 2020 at 12:06 PM Silamphre <hugoscheithauer at gmail.com> >>> wrote: >>> >>>> Hello everyone, >>>> >>>> I started using BaseX for a class project a few days ago. I'd like to >>>> run it on my Ubuntu 20.04. I've installed openjdk version 14 to do so. >>>> >>>> I've set my Ubuntu display settings at 125% fractional scaling, but it >>>> appears that BaseX does not scale with this setting. The GUI consequently >>>> appears really tiny, almost unusable. >>>> >>>> Does someone have a way to solve this issue, and make BaseX scales >>>> accordingly to my Ubuntu display settings, please? >>>> >>>> Thank you for your help. >>>> >>>> Kind regards, >>>> Hugo >>>> >>>> >>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti >>>> sans virus. www.avast.com >>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>>> <#m_-3080427616714005661_m_8249631326652388190_m_-8493036691201945712_m_240745489779756524_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>>> >>>
Written for BaseX 9.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery