Skip to content

Conversation

p3p3p3k4z
Copy link

Descripción

This pull request addresses a common issue where screen sharing on Wayland (specifically Hyprland) results in a black screen in Chromium-based browsers, often due to conflicts between multiple xdg-desktop-portal instances.

The solution has two parts:

Modified xdg.sh: Removed the code that explicitly starts xdg-desktop-portal-gtk to prevent it from conflicting with xdg-desktop-portal-hyprland.

Modified setup-fedora.sh: Added a step to automatically create a configuration file at /etc/xdg/xdg-desktop-portal/hyprland-portal.conf that sets default=hyprland. This ensures the Hyprland portal is prioritized system-wide, providing a robust solution for users with multiple desktop environments installed.

These changes ensure a more stable screen-sharing experience for new Fedora installations using this configuration.

Cambios

[ ] Improved

[x] Bug Fixes - [ ] Feature

[ ] Documentation

[ ] Other

Context

This change is necessary to fix a long-standing bug where users with multiple desktop environments installed (like GNOME alongside Hyprland) experience a black screen when trying to share their screen. The xdg.sh script, as it was, would start conflicting portals, and the setup-fedora.sh did not provide a mechanism to set Hyprland as the default portal, leaving the issue to manual intervention. This PR solves the problem by making the fix part of the standard setup process.

How Has This Been Tested?

[ ] Tested on Arch Linux/Based Distro.

[x] Tested on Fedora Linux/Based Distro.

[ ] Tested on openSuse.

Checklist

Please ensure your pull request meets the following requirements:

[x] My code follows the style guidelines of this project.

[x] I have performed a self-review of my code.

[x] I have commented on my code, particularly in hard-to-understand areas.

[x] My changes do not introduce new warnings.

[ ] I have added tests that prove my fix is effective or that my feature works.

[ ] I have made corresponding changes to the documentation

[ ] New and existing unit tests pass locally with my changes.

Screenshots

Related Issues

N/A

Additional Notes

This fix is particularly important for Fedora users, as the default installation process often leaves multiple desktop portals, which leads to this screen-sharing issue. The solution provides a clean and reliable fix without requiring manual user intervention after installation.

@mylinuxforwork
Copy link
Owner

@p3p3p3k4z I am currently not loading xdg.sh on Autostart anymore. The xdg-portals will be enabled in the background. No issues so far on Arch.

Do you think that this script is still needed?

@p3p3p3k4z
Copy link
Author

If the service no longer loads, then I don't see the need for it. In my case, I made that modification to solve the error, due to Wayland issues.

@mylinuxforwork
Copy link
Owner

Would be great if you could remove the execution of xdg.sh in the autostart.conf and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants