You are not logged in.

#1 2020-01-29 08:54:12

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Opening an HTTP link in an X11 only app with Wayland browser

I'm using Wayland/Sway and have decided to configure apps to launch under Wayland by default. So environment variables like GDK_BACKEND, QT_QPA_PLATFORM, and so on are all set to use Wayland.

Most apps run well under Wayland but some including Electron-based ones don't run under Wayland. So I've modified .desktop files for them to set GDK_BACKEND=x11 or QT_QPA_PLATFORM=xcb according to the underlying GUI toolkit used by each.

The problem is when I click a link in, for instance, Slack, the GDK_BACKEND=x11 flows through xdg-open to Firefox (which is my default browser). As a result, it badly conflicts with Firefox instances launched separately and Firefox refuses to open the link saying there is another instance of Firefox running. I also tried to explicitly set Wayland backend in firefox.desktop but since Firefox creates a desktop file under .local/share/applications, I couldn't set relevant environment variables for the browser instance launched by xdg-open.

So I wonder if there is a solution to this kind of problems occurring when mixing Wayland and X11 apps together in a desktop session.

It would be great if I can modify environment of apps by creating config files separately from the desktop files or executables.

How do you all cope with this kind of problems?

Thanks in advance.

DH

Last edited by dynaxis (2020-01-29 08:55:07)

Offline

#2 2020-01-29 09:11:26

dynaxis
Member
From: Seoul/Korea
Registered: 2019-12-16
Posts: 20

Re: Opening an HTTP link in an X11 only app with Wayland browser

I set default-web-browser and default-url-scheme-handler manually using xdg-settings, and disabled the default browser checking in firefox since it keeps complaining it's not the default browser while it indeed is.

Anyway if there is a way to set environment of select apps without modifying desktop files, it would be really great.

Offline

Board footer

Powered by FluxBB