-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
systemd-desktop - replace contents to rely on uwsm to start a systemd session. Remove hyprland-session.service #8376
Conversation
Also, I didn't add uwsm dependency as we've yet to decide - whether it should be a mandatory systemd dependency or optional. |
Shouldn't be required, as users can also write their own services instead of using uwsm. It's just easier and probably more correct to use uwsm. |
Fair. Though I guess I'd avoid adding uwsm opt dep to this PR myself, to not mess things up, for now. UPD: Optional dependency thing can be done disto-side, as I understand. In case of Arch, just adding it into PKGBUILD should be enough. |
Some extras.
It works.
|
@izmyname I just tested with GDM, seems to work fine. |
In this case, I think the PR is ready. |
- don't package systemd user unit / systed wayland session, installation path is wrong but it's not worth fixing as there's PR already to drop them anyway (hyprwm/Hyprland#8376)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, so since this is essentially replacing Hyprland.desktop file.
In order to get this actually picked up by display-manager.service
, we need to put this under /usr/share/wayland-sessions
or NixOS equivalent. I suppose we need to update the Nix packaging.
Non uwsm Hyprland.desktop is still available and will be installed alongside hyprland-uwsm.desktop
The PR already does it. |
I guess this should also be in the PR. diff --git a/nix/default.nix b/nix/default.nix
index 29d31485..4fef0f97 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -171,7 +171,7 @@ in
''}
'';
- passthru.providedSessions = ["hyprland"];
+ passthru.providedSessions = ["hyprland" "hyprland-uwsm"];
meta = {
homepage = "https://github.com/hyprwm/Hyprland"; |
@fufexan hope I didn't miss anything |
Looks fine. |
@izmyname I think this patch fixes meson autodetecting systemd: diff --git a/meson.build b/meson.build
index 76765645..e4abad36 100644
--- a/meson.build
+++ b/meson.build
@@ -52,8 +52,12 @@ backtrace_dep = cpp_compiler.find_library('execinfo', required: false)
epoll_dep = dependency('epoll-shim', required: false) # timerfd on BSDs
# Handle options
-if get_option('systemd').enabled()
- systemd = dependency('systemd')
+systemd_option = get_option('systemd')
+systemd = dependency('systemd', required: systemd_option)
+systemd_option.enable_auto_if(systemd.found())
+
+if (systemd_option.enabled())
+ message('Enabling systemd integration')
add_project_arguments('-DUSES_SYSTEMD', language: 'cpp')
subdir('systemd')
endif
diff --git a/nix/default.nix b/nix/default.nix
index 4fef0f97..4756b1c8 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -152,7 +152,6 @@ in
(mapAttrsToList mesonEnable {
"xwayland" = enableXWayland;
"legacy_renderer" = legacyRenderer;
- "systemd" = withSystemd;
})
(mapAttrsToList mesonBool {
"b_pch" = false; Also tested with Nix by removing explicit option passing. |
After some tests I've concluded that installing the uwsm desktop file on NixOS has no benefit or is even detrimental. This is why I've added a feature flag to both Meson and CMake which is enabled by default, but can be easily disabled by users. Also, the
|
Remove hyprland-session.service.
The file in the repo cannot be used in NixOS due to missing full paths, and the fact that `uwsm` does not have access to `PATH` to find the listed binaries. Might be useful in other situations as well.
Will be enabled in the NixOS module.
If there's no option overriding from the CLI, and the systemd dep is found, then I have no clue what's going on. |
Not the goal of this PR, so I think it can be fixed later. It doesn't break any existing workflow, anyway. |
Ok, I'll merge this and the wiki PR in a few hours when I'm free again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
IMHO, makes sense to make an announcement for the people, who use old hyprland-session.service. |
Sure, I'll do that. |
Thanks, everyone! |
Thank you for all the help! |
just spotted all this work you folks have been doing on this - looks awesome :) (before using uwsm) the whole thing about launching portals and invocation of |
Also, is there a place to discuss this further? I have found myself with a few questions after reading the Wiki entry, for example, does this mean I should prepend anything using the exec dispatcher with |
Not yet but we can create a discussion.
Yes. That and if you use an app launcher that supports prepending a launch prefix (like fuzzel or anyrun), you should also use that for the added benefit of also having those apps be bound to systemd units.
Yes. |
except flatpaks, hyprctl commands (like for hyprpaper) and clients for already started systemd processes (like footclient to foot-server), I suppose. @fufexan btw, do you start a launcher, itself, with |
Yeah I start the launcher with I don't notice slowdowns. Maybe because I always give it the full desktop entry path and it doesn't have to search again. |
Did the same for fuzzel Although, probably, launching fuzzel, itself, without prefix isn't that critical, in my case - as I rarely keep it open for a long time and it isn't launched when I shutdown. |
If a launcher doesn't live long, there is little point of wrapping it itself other than pedantic reasons. |
Thanks for the clarification! |
Also, some closing thoughts, regarding a proper systemd/xdg support. @fufexan I think the next and final step for Hyprland to be fully on par with existing desktop environments would be implementing |
That would be cool - you guys are doing amazing work. @izmyname mentioned making Hyprland "fully on par with existing desktop environments" which definitely describes most of the stuff I've been hoping/wishing for surrounding this stuff. It sounds kindof like a "project" in itself, or some changes in the general direction of "make it somewhat more like a desktop environment", so I'm sure someone could come up with a good title for a discussion thread. There's a lot of things autostarted when using uwsm, is hyprpolkitagent part of this? Just thinking my HL config might have some |
hyprpolkit, hypridle and hyprpaper (git version) have their own systemd services you can enable on startup
You don't need to explicitly autostart xdph. It's automatically started via D-Bus. |
Honestly I've never worked on xdph directly, but I will try to take a look when I have time. I don't use flatpaks myself so I'll have to ask you to aid with testing when that time comes. |
That goes without a question |
I notice the wiki suggests using |
If |
I've made a discussion #8459. |
Apologies for bumping the old discussion, but since there isn't a suitable xdph-related discussion thread, I post it here. @fufexan you might be interested to take a look at how KDE implements the background. https://github.com/KDE/xdg-desktop-portal-kde/blob/master/src/background.cpp https://github.com/KDE/xdg-desktop-portal-kde/blob/master/src/background.h Surprisingly, there seem to be just two relatively small files. I hope it doesn't lead to the need of changes within the compositor, itself, to avoid possible complexity of implementing the interface. |
They look small but there are a lot of includes in there as well :) |
True. GNOME xdp seems to be less complicated, though https://github.com/GNOME/xdg-desktop-portal-gnome/blob/main/src/background.h https://github.com/GNOME/xdg-desktop-portal-gnome/blob/main/src/background.c |
Also, here's an issue on xdp-wlr tracker, regarding |
Describe your PR, what does it fix/add?
As proposed and discussed here #8339 offload Hyprland systemd management to uwsm. This entry, in particular, is meant to be started with a display manager
Is there anything you want to mention?
See below
Is it ready for merging, or does it need work?
Yes