From 1c78fe6c2394a0df086371088b271694a8955edd Mon Sep 17 00:00:00 2001 From: techge Date: Thu, 17 Feb 2022 15:17:52 +0100 Subject: [PATCH 1/3] Add i3 wm note --- docs/customization/dpi-scaling.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/customization/dpi-scaling.md b/docs/customization/dpi-scaling.md index bc7ad14..d2aa741 100644 --- a/docs/customization/dpi-scaling.md +++ b/docs/customization/dpi-scaling.md @@ -11,6 +11,7 @@ The simplest way to set dpi scaling in dom0 is to use the desktop environment's - Xfce: Qubes Menu → System Tools → Appearance → Fonts tab: Custom DPI setting: `xxx` - KDE: Qubes Menu → System Settings → Font → Force font dpi: `xxx` +- i3: add `Xft.dpi: xxx` to `/home/user/.Xresources' in dom0 Replace `xxx` with a number that fits your setup and is a multiple of 6, as numbers that aren't sometimes result in annoying rounding errors that cause adjacent bitmap font sizes to not increment and decrement linearly. From 89f3c599d3264842461fcc38cbf31548b19d1fe5 Mon Sep 17 00:00:00 2001 From: techge Date: Thu, 17 Feb 2022 15:20:28 +0100 Subject: [PATCH 2/3] Add GDK scaling --- docs/customization/dpi-scaling.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/customization/dpi-scaling.md b/docs/customization/dpi-scaling.md index d2aa741..da7533f 100644 --- a/docs/customization/dpi-scaling.md +++ b/docs/customization/dpi-scaling.md @@ -102,6 +102,37 @@ gsettings reset org.gnome.desktop.interface text-scaling-factor For more information on setting system-wide dconf values see [this page](https://help.gnome.org/admin/system-admin-guide/stable/dconf-custom-defaults.html.en). +# Troubleshooting + +## Firefox and other GTK3 applications + +Even when setting the correct dpi values, some applications might have very +small icons or similar elements. This usually happens in Firefox for example. + +To mitigate this issue it is possible to set the `GDK_SCALE` and `GDK_DPI_SCALE` +variables as described +[here](https://wiki.archlinux.org/title/HiDPI#GDK_3_(GTK_3). To test these +values first, open a terminal and type: + +~~~ +export GDK_SCALE=2 +export GDK_DPI_SCALE=0.5 +firefox +~~~ + +You can try change the values for `GDK_SCALE` and `GDK_DPI_SCALE` to your +liking, but `GDK_SCALE` needs to be an integer value. + +Once you confirmed that this is working, you can make these settings permanent +by creating a file `/etc/profile.d/dpi_GDK.sh` (ideally in the template VM) with +the following content and your own values: + +~~~ +#!/bin/sh + +export GDK_SCALE=2 +export GDK_DPI_SCALE=0.5 +~~~ Resources --------- From 561880a2127519486458503beca48119f25bb517 Mon Sep 17 00:00:00 2001 From: techge Date: Thu, 17 Feb 2022 15:38:18 +0100 Subject: [PATCH 3/3] Change headline layout --- docs/customization/dpi-scaling.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/customization/dpi-scaling.md b/docs/customization/dpi-scaling.md index da7533f..40eb946 100644 --- a/docs/customization/dpi-scaling.md +++ b/docs/customization/dpi-scaling.md @@ -102,9 +102,11 @@ gsettings reset org.gnome.desktop.interface text-scaling-factor For more information on setting system-wide dconf values see [this page](https://help.gnome.org/admin/system-admin-guide/stable/dconf-custom-defaults.html.en). -# Troubleshooting +Troubleshooting +=============== -## Firefox and other GTK3 applications +Firefox and other GTK3 applications +----------------------------------- Even when setting the correct dpi values, some applications might have very small icons or similar elements. This usually happens in Firefox for example. @@ -135,7 +137,8 @@ export GDK_DPI_SCALE=0.5 ~~~ Resources ---------- +========= + - ARCH Linux HiDPI wiki page: https://wiki.archlinux.org/index.php/HiDPI - Gnome HiDPI wiki page: https://wiki.gnome.org/HowDoI/HiDpi - Mozilla DPI-related Font Size Issues on Unix: https://www-archive.mozilla.org/unix/dpi.html