Centralized configuration for electron apps


I run Manjaro GNOME with a HiDPI monitor and fractional scaling. Electron apps like Brave/Chrome, Slack, vscode, etc. are blurry because of fractional scaling.

I found that adding -enable-features=UseOzonePlatform -ozone-platform=wayland to the exec command solves this. (source)

While it is doable to copy every electron’s .desktop file to ~/.local/share/applications and edit it, I’m curios if there’s a better way.
Is there a centralized config option for electron in general? This would save time and won’t mess with the desktop files.

There is indeed. See Wayland - ArchWiki

Nice, thank you!

Follow-up question. The two tags remove the gnome window decoratio/title bar (what’s the correct name for it?). Therefore, I can’t rescale or close the windows.

How do I solve it?

Not for me they don’t. ¯\_(ツ)_/¯

You do have the title bar using wayland, gnome and fractional scaling and having the two options “activated”? I wonder what I did wrong :smiley:

Do I need to install electron manually/explicitly? Seems I don’t:

$ pacman -Qqe | grep electron 
$ (↑ empty output)

But I’m not sure if I need to.

Or do I need to specify a specific electron version for the config file? Currently I configured it like this:

$ cat ~/.config/electron-flags.conf

Just to visualize it:


My other laptop is running GNOME on Wayland with an AMD APU. I do not have fractional scaling enabled.

Yes, you’ll need one for each version of Electron installed like it mentions in the wiki article. The easiest way is to create symlinks of electron-flags.conf for the other versions; i.e., for electron14:

ln -s ~/.config/electron-flags.conf ~/.config/electron14-flags.conf
1 Like

How do I know, which version is used by the applications? It seems no “central” electron version was installed by pacman.

There are multiple versions of Electron. See which versions you have installed and what requires them:

❯ pacman -Qs electron
local/electron 15.2.0-1
    Build cross platform desktop apps with web technologies
local/electron10 10.4.7-2
    Build cross platform desktop apps with web technologies
local/electron11 11.5.0-2
    Build cross platform desktop apps with web technologies
local/electron13 13.5.2-1
    Build cross platform desktop apps with web technologies
local/electron9 9.4.4-3
    Build cross platform desktop apps with web technologies
❯ pacman -Qi electron11 | grep "Required By"
Required By     : android-messages-desktop  bitwarden

You could also create symlinks for every Electron version and not worry about it for now. However, you’d have to create an electron15-flags.conf when the electron package is updated to 16.

1 Like

That’s the “problem”. Pacman doesn’t list an electron version as installed :smiley:

$ pacman -Qs electron
local/fluentreader 1.0.1-1
    Modern desktop RSS reader built with Electron, React, and Fluent UI

Well. Now you know what to do if you ever install a program that depends on it. :wink:

Those all ship their own bundled version of Electron. What you’re already doing with the modified desktop files will have to suffice for those.

Therefore, I guess I can’t use a central config file for those apps, which ship with a bundled Electron.
So, I’ll keep the modified .desktop files.

The missing window title bar problems remains, but this is for another topic.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.