Double sizing your app in Linux


The setup

If you know me personally you probably have heard me talking how awful is the scene on Linux regarding HiDPI. Out of the box things aren’t great. Because of the multiple desktop and graphic systems running out of the old XServer with different ways of handling the approach to scaling, how an application handles HiDPI is quite different. If on top of that you have a multi-monitor setup (2 on my desktop), that have different dpi, things get even worse.

This is one aspect where Windows has been always superior. It can handle different dpi without a hitch, moving from one screen to another smoothly (somehow, Apple decided that they were not going to support it ¯_(ツ)_/¯, at least not by default )

Linux options

For my Linux Cinnamon setup, the following occurs:

Fixing an app scaling

For my laptop which has a HiDPI screen, I decided to fix Spotify. Early in the morning is a bit of pain trying to read with that small font.

In Linux Cinnamon you can change the Launcher settings of an application.

If you right click on the menu icon you can then follow this chain of options: Configure->Menu->Open Menu Editor

which will open the following screen: Main Menu Editor

From there you have two options, either Properties or Edit Desktop File.

For the former one you will see this screen: Properties of Launcher

And what you will want to modify is the Command box.

For the later you will see this screen: Desktop File Contents

And what you will want to modify is the Exec entry.

In both cases, just before the %U (well, I haven’t tested with arguments, so not 100% sure at the moment if it needs to be after the %U), you will want to add this: --force-device-scale-factor=2

And that should scale by 2 the size of the application screen. The scale factor must be a whole number (an integer), so options are limited.

By the way, for the meaning of %U you can check on the freedesktop site

Return to Index

Unless otherwise stated, all posts are my own and not associated with any other particular person or company.

For all code - MIT license
All other text - Creative Commons Attribution-ShareAlike 4.0 International License
Creative Commons BY-SA license image