[BUG] systemctl service for hyprland fails to start
Describe the bug
It seems like the xdg.sh script is set up in a way that the user service for xdg-desktop-portal-hyprland always fails to start.
Mainly because of:
- starting /usr/lib/xdg-desktop-portal-hyprland And then running systemctl --user start xdg-desktop-portal-hyprland
Most likely it doesn't actually break anything other than when you call systemctl status xdg-desktop-portal-hyprland it will report it failed to start (because the process is already running)
Here is the error message I found in journalctl:
May 29 10:29:14 work xdg-desktop-portal-hyprland[14153]: [CRITICAL] Couldn't create the dbus connection ([org.freedesktop.DBus.Error.FileExists] Failed to request bus name (File exists))
Steps to reproduce
- Start the system
- Login to Hyprland (uwsm in my case)
- Execute systemctl --user status xdg-desktop-portal-hyprland in the terminal
Expected behavior
Service is active and running
Screenshots
No response
Distribution
Arch Linux
If Other, specify
No response
Additional context
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
This is not a dotfiles issue, I guess. Can you make sure that all your packages are updated? Maybe you need to open an issue on the xdg-desktop-portal-hyprland Github page.
I had the same issue which was causing my screen share from a Chromium browser (Teams) to not work consistently. Commenting out the calls to /usr/lib/xdg-desktop-portal-hyprland and the other portal bins in xdg.sh made it work after a logout. Seems consistent after a couple reboots.
I had the same issue which was causing my screen share from a Chromium browser (Teams) to not work consistently. Commenting out the calls to
/usr/lib/xdg-desktop-portal-hyprlandand the other portal bins in xdg.sh made it work after a logout. Seems consistent after a couple reboots.
Can you share your running xdg.sh?
#!/bin/bash
# __ ______ ____
# \ \/ / _ \ / ___|
# \ /| | | | | _
# / \| |_| | |_| |
# /_/\_\____/ \____|
#
# Setup Timers
_sleep1="0.1"
_sleep2="0.5"
_sleep3="2"
# Kill all possible running xdg-desktop-portals
killall -e xdg-desktop-portal-hyprland
killall -e xdg-desktop-portal-gnome
killall -e xdg-desktop-portal-kde
killall -e xdg-desktop-portal-lxqt
killall -e xdg-desktop-portal-wlr
killall -e xdg-desktop-portal-gtk
killall -e xdg-desktop-portal
# Set required environment variables
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland
# Stop all services
systemctl --user stop pipewire
systemctl --user stop wireplumber
systemctl --user stop xdg-desktop-portal
systemctl --user stop xdg-desktop-portal-gnome
systemctl --user stop xdg-desktop-portal-kde
systemctl --user stop xdg-desktop-portal-wlr
systemctl --user stop xdg-desktop-portal-hyprland
sleep $_sleep1
# Start xdg-desktop-portal-hyprland
#/usr/lib/xdg-desktop-portal-hyprland &
#sleep $_sleep1
# Start xdg-desktop-portal-gtk
#if [ -f /usr/lib/xdg-desktop-portal-gtk ]; then
# /usr/lib/xdg-desktop-portal-gtk &
# sleep $_sleep1
#fi
# Start xdg-desktop-portal
#/usr/lib/xdg-desktop-portal &
#sleep $_sleep2
# Start required services
systemctl --user start pipewire
systemctl --user start wireplumber
systemctl --user start xdg-desktop-portal
systemctl --user start xdg-desktop-portal-hyprland
# Run waybar
sleep $_sleep3
~/.config/waybar/launch.sh
I still have an issue with sharing a kitty terminal. Not sure why because firefox, VS Code, and full screen share work after changing the script ^. Maybe some underlying issue with xdph. Googling around and it seems to have constant problems unrelated to ML4W.
Following up, looks like screen share works flawlessly with/without the changes above on a second monitor. My main one is new/OLED, so maybe something there is causing screen share issues unrelated to ML4W. Sorry to obfuscate!
Thanks for testing.