Ubuntu – Snap-Apps on high DPI desktops

hdpisnap

I'm using Ubuntu GNOME 17.04 on a high DPI laptop. Gnome (more less) automatically scales applications to be (more or less) usable.

However, snap-apps (e.g. ubuntu-clock-app, keepassxc) are displayed very small, even the mouse pointer is tiny.

Is there a possibility to set high DPI settings for snap-apps?

Best Answer

You can (at least temporarily, until the app's next update, then you might have to do this again) solve this by adding --force-device-scale-factor=2 as a command line parameter.

This can be done by editing the specific app's (e.g. KeepassXC) .desktop file. To find and edit it, follow those steps in a terminal (ctrl + alt + t):

List the files to find the desktop file to edit:

ls /var/lib/snapd/desktop/applications

Open gedit as admin (sudo can't [EDIT: couldn't, at least back in 2018] open graphical apps on Wayland. If you're on X, you can also use sudo instead of the admin:// pseudo-protocol), for example:

gedit admin:///var/lib/snapd/desktop/applications/spotify_spotify.desktop

At the Exec= line, add --force-device-scale-factor=2 before %U

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify --force-device-scale-factor=2 %U
Related Question