From e7b4daa9280327df72a5e2a24475789c2a78a51c Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Tue, 27 Apr 2021 13:16:46 +0200 Subject: [PATCH] sway: fix screen sharing --- .config/Code - OSS/User/settings.json | 3 ++- .config/sway/config | 5 +++++ .local/bin/fix_xdg_desktop_portal_sharing.sh | 8 ++++++++ .profile | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 .local/bin/fix_xdg_desktop_portal_sharing.sh diff --git a/.config/Code - OSS/User/settings.json b/.config/Code - OSS/User/settings.json index b40bea0..3961872 100644 --- a/.config/Code - OSS/User/settings.json +++ b/.config/Code - OSS/User/settings.json @@ -50,5 +50,6 @@ }, "[scss]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "redhat.telemetry.enabled": false } \ No newline at end of file diff --git a/.config/sway/config b/.config/sway/config index 33c7cca..24eef61 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -327,3 +327,8 @@ exec_always { gsettings set $gnome-schema cursor-theme 'Adwaita' gsettings set $gnome-schema font-name '$font_family $gtk_font_size' } + +# ------------------------------------------------------------------------------ +# xdg-desktop-portal +# ------------------------------------------------------------------------------ +exec /home/loherj/.local/bin/fix_xdg_desktop_portal_sharing.sh diff --git a/.local/bin/fix_xdg_desktop_portal_sharing.sh b/.local/bin/fix_xdg_desktop_portal_sharing.sh new file mode 100755 index 0000000..1e296e0 --- /dev/null +++ b/.local/bin/fix_xdg_desktop_portal_sharing.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Import the WAYLAND_DISPLAY env var from sway into the systemd user session. +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + +# Stop any services that are running, so that they receive the new env var when they restart. +systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr +systemctl --user start pipewire-media-session diff --git a/.profile b/.profile index 6d65d6f..c679cd8 100644 --- a/.profile +++ b/.profile @@ -1,3 +1,4 @@ +export XDG_CURRENT_DESKTOP=sway export MOZ_ENABLE_WAYLAND=1 export CLUTTER_BACKEND=wayland export QT_QPA_PLATFORM=wayland-egl