What makes HiDPI work?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I'm testing Ubuntu Bionic, GNOME, elementary OS, KDE, Xfce 4.13 (the GTK3 version, all apps have been ported to GTK3).
All distros support hidpi across frameworks: when I launch Google Chrome/Firefox/etc. (GTK 3), VirtualBox (Qt 5), or Spotify (Electron) some component in the DE detects that my screen is 4K and does the right thing so that the app is scaled at 2x.
With the exception of Xfce. In Xfce, third-party apps don't work well, expecially Qt and Electron apps which are never launched at the correct scaling.
âÂÂXfce 4.13 has a "scaling" option that you can use to specify that you want everything scaled to x2. However, even if I do that, Qt and Electron apps do not pick up the setting. I also tried using gsettings to set the "GNOME" setting in addition to Xfce's, to no avail. Qt and Electron apps still look bad, while on GNOME they look great out-of-the-box.
My Question is: how do Ubuntu, elementary and to a certain extent KDE make apps using different frameworks all scale correctly?
Of course, I know how to launch Qt apps at the correct scaling manually, but I'm wondering what makes this process so much easier on distros other than Xfce.
Is there a package that I can install from another distro that will make Xfce behave "correctly", so that if I launch a GTK3, Qt, or Electron app they get scaled correctly? Is it the launcher than passes some variables, or is it a lower-level component?
linux ubuntu gnome xfce
add a comment |Â
up vote
4
down vote
favorite
I'm testing Ubuntu Bionic, GNOME, elementary OS, KDE, Xfce 4.13 (the GTK3 version, all apps have been ported to GTK3).
All distros support hidpi across frameworks: when I launch Google Chrome/Firefox/etc. (GTK 3), VirtualBox (Qt 5), or Spotify (Electron) some component in the DE detects that my screen is 4K and does the right thing so that the app is scaled at 2x.
With the exception of Xfce. In Xfce, third-party apps don't work well, expecially Qt and Electron apps which are never launched at the correct scaling.
âÂÂXfce 4.13 has a "scaling" option that you can use to specify that you want everything scaled to x2. However, even if I do that, Qt and Electron apps do not pick up the setting. I also tried using gsettings to set the "GNOME" setting in addition to Xfce's, to no avail. Qt and Electron apps still look bad, while on GNOME they look great out-of-the-box.
My Question is: how do Ubuntu, elementary and to a certain extent KDE make apps using different frameworks all scale correctly?
Of course, I know how to launch Qt apps at the correct scaling manually, but I'm wondering what makes this process so much easier on distros other than Xfce.
Is there a package that I can install from another distro that will make Xfce behave "correctly", so that if I launch a GTK3, Qt, or Electron app they get scaled correctly? Is it the launcher than passes some variables, or is it a lower-level component?
linux ubuntu gnome xfce
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I'm testing Ubuntu Bionic, GNOME, elementary OS, KDE, Xfce 4.13 (the GTK3 version, all apps have been ported to GTK3).
All distros support hidpi across frameworks: when I launch Google Chrome/Firefox/etc. (GTK 3), VirtualBox (Qt 5), or Spotify (Electron) some component in the DE detects that my screen is 4K and does the right thing so that the app is scaled at 2x.
With the exception of Xfce. In Xfce, third-party apps don't work well, expecially Qt and Electron apps which are never launched at the correct scaling.
âÂÂXfce 4.13 has a "scaling" option that you can use to specify that you want everything scaled to x2. However, even if I do that, Qt and Electron apps do not pick up the setting. I also tried using gsettings to set the "GNOME" setting in addition to Xfce's, to no avail. Qt and Electron apps still look bad, while on GNOME they look great out-of-the-box.
My Question is: how do Ubuntu, elementary and to a certain extent KDE make apps using different frameworks all scale correctly?
Of course, I know how to launch Qt apps at the correct scaling manually, but I'm wondering what makes this process so much easier on distros other than Xfce.
Is there a package that I can install from another distro that will make Xfce behave "correctly", so that if I launch a GTK3, Qt, or Electron app they get scaled correctly? Is it the launcher than passes some variables, or is it a lower-level component?
linux ubuntu gnome xfce
I'm testing Ubuntu Bionic, GNOME, elementary OS, KDE, Xfce 4.13 (the GTK3 version, all apps have been ported to GTK3).
All distros support hidpi across frameworks: when I launch Google Chrome/Firefox/etc. (GTK 3), VirtualBox (Qt 5), or Spotify (Electron) some component in the DE detects that my screen is 4K and does the right thing so that the app is scaled at 2x.
With the exception of Xfce. In Xfce, third-party apps don't work well, expecially Qt and Electron apps which are never launched at the correct scaling.
âÂÂXfce 4.13 has a "scaling" option that you can use to specify that you want everything scaled to x2. However, even if I do that, Qt and Electron apps do not pick up the setting. I also tried using gsettings to set the "GNOME" setting in addition to Xfce's, to no avail. Qt and Electron apps still look bad, while on GNOME they look great out-of-the-box.
My Question is: how do Ubuntu, elementary and to a certain extent KDE make apps using different frameworks all scale correctly?
Of course, I know how to launch Qt apps at the correct scaling manually, but I'm wondering what makes this process so much easier on distros other than Xfce.
Is there a package that I can install from another distro that will make Xfce behave "correctly", so that if I launch a GTK3, Qt, or Electron app they get scaled correctly? Is it the launcher than passes some variables, or is it a lower-level component?
linux ubuntu gnome xfce
linux ubuntu gnome xfce
asked Aug 28 at 21:06
nbrogi
738
738
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Unfortunately there is no such a global option to set. Those distributions are setting various variables for you.
A lot of applications are taking the Xft.dpi
setting from ~/.Xresources
into account (That's the only option I've set but I barely use GUI applications)
Since Qt 5.6, Qt 5 applications can be instructed to honor screen DPI by exporting
export QT_AUTO_SCREEN_SCALE_FACTOR=1
If that doesn't work try
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
GDK 3 (GTK+ 3) can be scaled with
export GDK_SCALE=2
electron applications are difficult to handle on linux [1] [2]. They respect the text-scaling-factor
option from GNOME for example [3].
Here you have no choice but to use --force-device-scale-factor=1.5
as an argument.
Well documented Arch Linux HiDPI wiki page for further reading
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
@nbrogi: Try putting the values that you've found to work in~/.bashrc
,~/.xinitrc
,/etc/profile
, or (if my brief google about XFCE returned sane results)~/.config/xfce4/xinitrc
.
â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Unfortunately there is no such a global option to set. Those distributions are setting various variables for you.
A lot of applications are taking the Xft.dpi
setting from ~/.Xresources
into account (That's the only option I've set but I barely use GUI applications)
Since Qt 5.6, Qt 5 applications can be instructed to honor screen DPI by exporting
export QT_AUTO_SCREEN_SCALE_FACTOR=1
If that doesn't work try
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
GDK 3 (GTK+ 3) can be scaled with
export GDK_SCALE=2
electron applications are difficult to handle on linux [1] [2]. They respect the text-scaling-factor
option from GNOME for example [3].
Here you have no choice but to use --force-device-scale-factor=1.5
as an argument.
Well documented Arch Linux HiDPI wiki page for further reading
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
@nbrogi: Try putting the values that you've found to work in~/.bashrc
,~/.xinitrc
,/etc/profile
, or (if my brief google about XFCE returned sane results)~/.config/xfce4/xinitrc
.
â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
add a comment |Â
up vote
1
down vote
accepted
Unfortunately there is no such a global option to set. Those distributions are setting various variables for you.
A lot of applications are taking the Xft.dpi
setting from ~/.Xresources
into account (That's the only option I've set but I barely use GUI applications)
Since Qt 5.6, Qt 5 applications can be instructed to honor screen DPI by exporting
export QT_AUTO_SCREEN_SCALE_FACTOR=1
If that doesn't work try
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
GDK 3 (GTK+ 3) can be scaled with
export GDK_SCALE=2
electron applications are difficult to handle on linux [1] [2]. They respect the text-scaling-factor
option from GNOME for example [3].
Here you have no choice but to use --force-device-scale-factor=1.5
as an argument.
Well documented Arch Linux HiDPI wiki page for further reading
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
@nbrogi: Try putting the values that you've found to work in~/.bashrc
,~/.xinitrc
,/etc/profile
, or (if my brief google about XFCE returned sane results)~/.config/xfce4/xinitrc
.
â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Unfortunately there is no such a global option to set. Those distributions are setting various variables for you.
A lot of applications are taking the Xft.dpi
setting from ~/.Xresources
into account (That's the only option I've set but I barely use GUI applications)
Since Qt 5.6, Qt 5 applications can be instructed to honor screen DPI by exporting
export QT_AUTO_SCREEN_SCALE_FACTOR=1
If that doesn't work try
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
GDK 3 (GTK+ 3) can be scaled with
export GDK_SCALE=2
electron applications are difficult to handle on linux [1] [2]. They respect the text-scaling-factor
option from GNOME for example [3].
Here you have no choice but to use --force-device-scale-factor=1.5
as an argument.
Well documented Arch Linux HiDPI wiki page for further reading
Unfortunately there is no such a global option to set. Those distributions are setting various variables for you.
A lot of applications are taking the Xft.dpi
setting from ~/.Xresources
into account (That's the only option I've set but I barely use GUI applications)
Since Qt 5.6, Qt 5 applications can be instructed to honor screen DPI by exporting
export QT_AUTO_SCREEN_SCALE_FACTOR=1
If that doesn't work try
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2
GDK 3 (GTK+ 3) can be scaled with
export GDK_SCALE=2
electron applications are difficult to handle on linux [1] [2]. They respect the text-scaling-factor
option from GNOME for example [3].
Here you have no choice but to use --force-device-scale-factor=1.5
as an argument.
Well documented Arch Linux HiDPI wiki page for further reading
answered Aug 31 at 8:18
ploth
848115
848115
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
@nbrogi: Try putting the values that you've found to work in~/.bashrc
,~/.xinitrc
,/etc/profile
, or (if my brief google about XFCE returned sane results)~/.config/xfce4/xinitrc
.
â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
add a comment |Â
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
@nbrogi: Try putting the values that you've found to work in~/.bashrc
,~/.xinitrc
,/etc/profile
, or (if my brief google about XFCE returned sane results)~/.config/xfce4/xinitrc
.
â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
Hi, thanks for your answer. I too have found HiDPI wiki page to be the best source for this info, and use it as a reference to launch apps manually. However, I was looking into something permanent and programmatical. So, if distros set those variables for you, what is the package for instance in Ubuntu Bionic which does it? Is it directly the installer? Do they write to your home folder, so should I investigate there?
â nbrogi
Aug 31 at 13:29
1
1
@nbrogi: Try putting the values that you've found to work in
~/.bashrc
, ~/.xinitrc
, /etc/profile
, or (if my brief google about XFCE returned sane results) ~/.config/xfce4/xinitrc
.â i336_
Sep 4 at 13:48
@nbrogi: Try putting the values that you've found to work in
~/.bashrc
, ~/.xinitrc
, /etc/profile
, or (if my brief google about XFCE returned sane results) ~/.config/xfce4/xinitrc
.â i336_
Sep 4 at 13:48
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
Nice, i336. ~/.config/xfce4/xinitrc looks promising.
â nbrogi
Sep 4 at 22:05
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465383%2fwhat-makes-hidpi-work%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password