How do I make all GTK applications use a custom DPI setting?
After upgrading from Debian 8 to Debian 9, the text editor Pluma (a Gedit fork) no longer use my custom DPI setting. I noticed the same thing with the editor Geany. Here are my Xft settings in ~/.Xresources:
Xft.antialias: true
Xft.autohint: false
Xft.dpi: 100
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
The other Xft settings above are picked up Pluma, however. On the other hand, the text editor Leafpad correctly uses the DPI setting. Any clues? I use the window manager Blackbox started from a console.
Pluma (with DejaVu Sans 10):

Leafpad (with DejaVu Sans 10):

x11 gtk dpi
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
After upgrading from Debian 8 to Debian 9, the text editor Pluma (a Gedit fork) no longer use my custom DPI setting. I noticed the same thing with the editor Geany. Here are my Xft settings in ~/.Xresources:
Xft.antialias: true
Xft.autohint: false
Xft.dpi: 100
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
The other Xft settings above are picked up Pluma, however. On the other hand, the text editor Leafpad correctly uses the DPI setting. Any clues? I use the window manager Blackbox started from a console.
Pluma (with DejaVu Sans 10):

Leafpad (with DejaVu Sans 10):

x11 gtk dpi
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39
add a comment |
After upgrading from Debian 8 to Debian 9, the text editor Pluma (a Gedit fork) no longer use my custom DPI setting. I noticed the same thing with the editor Geany. Here are my Xft settings in ~/.Xresources:
Xft.antialias: true
Xft.autohint: false
Xft.dpi: 100
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
The other Xft settings above are picked up Pluma, however. On the other hand, the text editor Leafpad correctly uses the DPI setting. Any clues? I use the window manager Blackbox started from a console.
Pluma (with DejaVu Sans 10):

Leafpad (with DejaVu Sans 10):

x11 gtk dpi
After upgrading from Debian 8 to Debian 9, the text editor Pluma (a Gedit fork) no longer use my custom DPI setting. I noticed the same thing with the editor Geany. Here are my Xft settings in ~/.Xresources:
Xft.antialias: true
Xft.autohint: false
Xft.dpi: 100
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
The other Xft settings above are picked up Pluma, however. On the other hand, the text editor Leafpad correctly uses the DPI setting. Any clues? I use the window manager Blackbox started from a console.
Pluma (with DejaVu Sans 10):

Leafpad (with DejaVu Sans 10):

x11 gtk dpi
x11 gtk dpi
edited Jun 25 '17 at 14:11
August Karlstrom
asked Jun 21 '17 at 10:32
August KarlstromAugust Karlstrom
3291130
3291130
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39
add a comment |
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39
add a comment |
1 Answer
1
active
oldest
votes
GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.
The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.
You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).
(perhaps the GTK theming machinery knows about DPI, but I can't tell how)
BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f372449%2fhow-do-i-make-all-gtk-applications-use-a-custom-dpi-setting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.
The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.
You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).
(perhaps the GTK theming machinery knows about DPI, but I can't tell how)
BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
add a comment |
GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.
The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.
You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).
(perhaps the GTK theming machinery knows about DPI, but I can't tell how)
BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
add a comment |
GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.
The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.
You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).
(perhaps the GTK theming machinery knows about DPI, but I can't tell how)
BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.
GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.
The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.
You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).
(perhaps the GTK theming machinery knows about DPI, but I can't tell how)
BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.
edited Jul 3 '17 at 11:16
answered Jul 2 '17 at 6:43
Basile StarynkevitchBasile Starynkevitch
8,0412041
8,0412041
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
add a comment |
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
What configuration file should I use? What property should I set?
– August Karlstrom
Jul 3 '17 at 11:04
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f372449%2fhow-do-i-make-all-gtk-applications-use-a-custom-dpi-setting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why is your question GTK specific? Looks like some XY problem to me... Do you have the same issue with Qt based applications?
– Basile Starynkevitch
Jul 3 '17 at 11:18
I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: unix.stackexchange.com/questions/165250/…
– August Karlstrom
Jul 3 '17 at 13:39