Configuring GNOME HiDPI

My laptop (unfortunately) has a HiDPI display. When I ran the installer, I picked GNOME as my desktop environment. However, my display doesn’t work with the default GNOME configuration.

For some reason, GNOME says it’s scaling at 200% in the settings menu, but there seems to be some mismatch with other parts of the system. Some apps, like Emacs, appear tiny.

Anyway after checking the Arch Wiki, I tried running these (slightly modified) commands.

$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <2>}, {'Gtk/CursorThemeSize', <48>}]"
$ gsettings set org.gnome.desktop.interface scaling-factor 2

And everything seems to be working now! :raising_hands:

(Gah. Zoom is still tiny. Gotta manually fix. :slightly_frowning_face: )


Question: How do I capture this configuration in a Guix config file?? Can it go into my system or home config??

Follow up:

I just realized that gsettings isn’t installed by default. I installed it on the user profile not the system.

Looks like I got gsettings from the glib package.

wegei8@guixbtw ~/guix-config$ ls -al /home/wegei8/.guix-home/profile/bin/gsettings
lrwxrwxrwx 1 root root 73 Dec 31  1969 /home/wegei8/.guix-home/profile/bin/gsettings -> /gnu/store/m94abzcc5q8vgbw4sqy54c6dshkf56sj-glib-2.83.3-bin/bin/gsettings

Looking at guix search, it looks like there are multiple outputs to the glib package. I installed :bin.

$ guix search glib
name: glib
version: 2.83.3
outputs:
+ doc: documentation
+ static: static libraries
+ bin: executable programs and scripts
+ debug: debug information
+ out: everything else

Again, in my case, I installed on the user profile and then ran the commands above. This is how you can install the bin output of glib via CLI.

$ guix install glib:bin

OR, if you’re using guix home.

(use-modules (gnu home)
             (gnu packages glib))

(home-environment
  (packages (list `(,glib "bin"))))

I don’t really understand the syntax, but it works. :person_shrugging:

`(,glib "bin")

Quasiquote, something, something. I should probably read more about Scheme…

Uh, also, wait. There’s one more thing I want to mention! If you don’t want/need gsettings all the time, you don’t even have to install it! You can just do this!

guix shell glib:bin

Then you run whatever gsettings command you want and exit the shell when you’re done! No need to keep it around.

(Although, there are reasons you may want to permanently install glib:bin (on the user profile)…)

Relevant mailing list thread: GNOME - some apps not scaling on HiDPI display/profile contains conflicting entries.