How do I make all GTK applications use a custom DPI setting?












1














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):



enter image description here



Leafpad (with DejaVu Sans 10):



enter image description here










share|improve this question
















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
















1














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):



enter image description here



Leafpad (with DejaVu Sans 10):



enter image description here










share|improve this question
















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














1












1








1







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):



enter image description here



Leafpad (with DejaVu Sans 10):



enter image description here










share|improve this question















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):



enter image description here



Leafpad (with DejaVu Sans 10):



enter image description here







x11 gtk dpi






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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










1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer























  • What configuration file should I use? What property should I set?
    – August Karlstrom
    Jul 3 '17 at 11:04











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
});


}
});














draft saved

draft discarded


















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









0














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.






share|improve this answer























  • What configuration file should I use? What property should I set?
    – August Karlstrom
    Jul 3 '17 at 11:04
















0














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.






share|improve this answer























  • What configuration file should I use? What property should I set?
    – August Karlstrom
    Jul 3 '17 at 11:04














0












0








0






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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








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


















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to make a Squid Proxy server?

第一次世界大戦

Touch on Surface Book