Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regolith 3: Unable to screen share my windows when using SWAY #920

Open
tigrato opened this issue Sep 29, 2023 · 22 comments
Open

Regolith 3: Unable to screen share my windows when using SWAY #920

tigrato opened this issue Sep 29, 2023 · 22 comments
Labels
bug Something isn't working needs-triage Any bug that requires classification by a contributor

Comments

@tigrato
Copy link

tigrato commented Sep 29, 2023

Describe the bug

Regolith3-sway is unable to screen share any of my screens/windows in Chrome/Firefox.

To Reproduce
Open a google meet video and try sharing your screen

Expected behavior
Regolith sway should support screen sharing

Configuration file(s)
Default config doesn't work.

I tried adding XDG_CURRENT_DESKTOP=sway to ~/.config/environment.d/xdg.conf. With that config, I can share a single display from my computer (I can't select which one) but I loose access to Regolith settings.

Installation Details

  • Regolith Install Type: PPA
  • Regolith Version: 3.0
  • PPA url: [default: ppa:regolith-linux/release]
  • Host OS (for PPA): UBUNTU 23.04

Additional context
Add any other context about the problem here.

@tigrato tigrato added bug Something isn't working needs-triage Any bug that requires classification by a contributor labels Sep 29, 2023
@SoumyaRanjanPatnaik
Copy link

SoumyaRanjanPatnaik commented Sep 29, 2023

Try seeing the environment variable to GNOME:sway. Also you should be able to use the mod+c keybinding to access settings in case this doesn't work

@tigrato
Copy link
Author

tigrato commented Sep 29, 2023

I tried it and it doesn't work either.the behavior is exactly the same as if it was set to GNOME

Regarding the mod+c command when XDG_CURRENT_DESKTOP=sway, it doesn't work and the settings doesn't show up on available applications as well.

@SoumyaRanjanPatnaik
Copy link

What is the output of the following command?
echo $XDG_CURRENT_DESKTOP

I have set it to GNOME:sway (notice the colon in between), and it works flawlessly for me. Screen sharing works, and the app launcher (ilia) shows me an entry for the settings app.

@tigrato
Copy link
Author

tigrato commented Sep 29, 2023

I had to uninstall xdg-desktop-portal-gnome, install slurp and set XDG_CURRENT_DESKTOP=GNOME:sway in order for it to work correctly.

Thank you @SoumyaRanjanPatnaik !

@SoumyaRanjanPatnaik
Copy link

Was slurp not auto installed?

@tigrato
Copy link
Author

tigrato commented Sep 29, 2023

No 😢

@Marcello09
Copy link

Hello, i'm also facing the same problem.

Ubuntu 22.04. Fresh install of regolith3. Can´t screen share.
slupt is not installed by default.

I've created a config file in ~/.config/environment.d setting XDG_CURRENT_DESKTOP=GNOME:sway but no success in sharing screen yet

@Marcello09
Copy link

I had to uninstall xdg-desktop-portal-gnome, install slurp and set XDG_CURRENT_DESKTOP=GNOME:sway in order for it to work correctly.

Thank you @SoumyaRanjanPatnaik !

Doing exacly this worked for me. I had to set the environment in my .zshrc since putting it into .config/enviroment.d/sway_env.conf did not set the environment variable.

@SoumyaRanjanPatnaik
Copy link

Doing exacly this worked for me. I had to set the environment in my .zshrc since putting it into .config/enviroment.d/sway_env.conf did not set the environment variable.

I assume that sway_env worked and .zshrc didn't (since sway doesn't import .profile, .bashrc, .zshrc, etc, during the session start). However, the startup script explicitly loads .config/enviroment.d/sway_env.conf.

Glad that you managed to solve this issue though.

@lawrencegripper
Copy link

I think I found why the sway_env file in environment.d didn't work. It looks like the sway launcher loads those environment.d then sets the XDG_CURRENT_DESKTOP meaning these get overridden.

https://github.com/regolith-linux/regolith-session/blob/859cc680413992df3085a3d7b509775920f4e7f8/usr/bin/regolith-session-wayland#L39-L45

Added a mini-PR here to fix that up, so the setting can be easily overridden.

@kgilmer
Copy link
Member

kgilmer commented May 2, 2024

Hi @lawrencegripper , I haven't been tracking this issue, but noticed your change coincided with some updates we're making for Regolith 3.2. Could take a peek at the version of the Wayland session and comment if you see any concerns?

https://github.com/regolith-linux/regolith-session/blob/feat/systemd-session-merge/usr/bin/regolith-session-wayland#L49

@SoumyaRanjanPatnaik
Copy link

Can anyone facing this issue check if the xdg-desktop-portal-regolith-wayland-config package is installed?

@lawrencegripper
Copy link

lawrencegripper commented May 2, 2024

@kgilmer will take a look (fair warning this is not my area of expertise), here was the tweak I've made locally to get me override the XDG_CURRENT_DESKTOP

@SoumyaRanjanPatnaik - It doesn't look like I have that package installed

dpkg -s xdg-desktop-portal-regolith-wayland-config 
dpkg-query: package 'xdg-desktop-portal-regolith-wayland-config' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.

It doesn't show up in a search for me either (using https://regolith-desktop.org/release-3_1-ubuntu-jammy-amd64 jammy InRelease )

❯ apt search xdg-desktop-portal-regolith-wayland-config
Sorting... Done
Full Text Search... Done

@SoumyaRanjanPatnaik
Copy link

It doesn't show up in a search for me either (using https://regolith-desktop.org/release-3_1-ubuntu-jammy-amd64 jammy InRelease )

AFAIK xdg-desktop-portal-regolith-* should support jammy. Maybe its the InRelease portion of the source (https://regolith-desktop.org/release-3_1-ubuntu-jammy-amd64 jammy InRelease). Maybe try swapping InRelease with main.

Full disclaimer I don't have a complete understanding of how apt sources work, and might be wrong about this, since you were able to upgrade to regolith 3.1

@Marcello09
Copy link

Can anyone facing this issue check if the xdg-desktop-portal-regolith-wayland-config package is installed?

Just checket, it is not.
The only packages installed related to xdg-desktop are the follow

xdg-desktop-portal-gtk/jammy,now 1.14.0-1build1 amd64 [installed,automatic]
xdg-desktop-portal-wlr/jammy,now 0.5.0-3 amd64 [installed,automatic]
xdg-desktop-portal/jammy-updates,now 1.14.4-1ubuntu2~22.04.1 amd64 [installed,automatic]

@SoumyaRanjanPatnaik
Copy link

@kgilmer seems like the regolith backend for xdg-dekstop-portal isn't installed on jammy.

@kgilmer
Copy link
Member

kgilmer commented May 7, 2024

@kgilmer seems like the regolith backend for xdg-dekstop-portal isn't installed on jammy.

Hmm, that package is associated via Recommends, here. (The config package expresses a Depends on the root package) I don't see any varation in the package model that would explain why this package wouldn't be installed on a specific release. I wonder if, when apt is upgrading from one release to another, if it ignores changes to Recommends in the upgraded version of the package...

@vitorarins
Copy link

Hi, I also have this issue. Running on Ubuntu Jammy. Do I understand correctly that I need to install the xdg-desktop-portal-regolith-wayland-config package?
If so, how do I get it? Because as stated before, it doesn't appear when doing apt search.

my apt sources list for regolith is deb [arch=amd64 signed-by=/usr/share/keyrings/regolith-archive-keyring.gpg] https://regolith-desktop.org/release-3_1-ubuntu-jammy-amd64 jammy main

@mfisher87
Copy link
Member

mfisher87 commented Dec 26, 2024

I don't see any varation in the package model that would explain why this package wouldn't be installed on a specific release.

@kgilmer For me, when I installed Regolith 3.2 today, that package did show up in the apt output as a recommended package. However, it's not available for me to install. Source https://regolith-desktop.org/release-3_2-ubuntu-jammy-amd64 jammy main

@kgilmer
Copy link
Member

kgilmer commented Dec 30, 2024

Good catch, yes the package wasn't available on jammy. Oversight on my part. The above PRs should address this for the 3.3 release. If you'd like this fix earlier you'd be able to install the package from the unstable stage once the PRs are merged and a build is available.

@mfisher87
Copy link
Member

🙌 Amazing, thank you Ken!

kgilmer added a commit to regolith-linux/xdg-desktop-portal-regolith that referenced this issue Dec 31, 2024
* fix: update package dependency to use variant also available on jammy

addresses regolith-linux/regolith-desktop#920


---------

Co-authored-by: Regolith Linux <[email protected]>
@mfisher87
Copy link
Member

mfisher87 commented Jan 14, 2025

I got this working on my machine by installing xdg-desktop-portal-regolith-wayland-config from unstable, then setting

XDG_CURRENT_DESKTOP=sway

Embarrassingly, I think I did it in the most wrong way possible, as setting in ~/.config/environmend.d was having no effect; I modified /usr/bin/regolith-session-wayland.

I also set MOZ_WAYLAND_ENABLE=1 early on, I haven't tested whether that was essential.

I am only able to share an entire screen, not individual windows like I'm used to. Is that expected?

khos2ow pushed a commit to regolith-linux/xdg-desktop-portal-regolith that referenced this issue Jan 27, 2025
* fix: update package dependency to use variant also available on jammy

addresses regolith-linux/regolith-desktop#920

---------

Co-authored-by: Regolith Linux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Any bug that requires classification by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants