You are not logged in.
what exactly is the point of changing the "target to boot into"?
wiki target to boot into
recently installed swaync with its systemd unit, which requires graphical.target
swayrc github
after changing to "graphical.target" as mentioned in the wiki the unit does not start.
I also found out that you can change the target boot for the user, but it doesn't change anything.
I run Hyprland via tty with this command in .zprofile :
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec Hyprland
fifor the moment I start the unit via the hyprland config which works, that's why I'm wondering.
thanks for your insights!
Last edited by Manix (2023-09-01 10:26:26)
I don't love rosbeef
Offline
... swaync with its systemd unit, which requires graphical.target
Well no, not really. Just the default service file is configured to run only under the graphical.target.
after changing to "graphical.target" as mentioned in the wiki the unit does not start.
So is that the problem you really want help with? If so, you need to post diagnostic information (e.g., errors / logs) about that rather than focusing on another point that you only suspect to be the problem (otherwise this is just an X-Y problem).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@tribly thank you for your prompt reply.
here's the unit:
[Unit]
Description=Swaync notification daemon
Documentation=https://github.com/ErikReider/SwayNotificationCenter
PartOf=graphical-session.target
After=graphical-session.target
# ConditionEnvironment requires systemd v247 to work correctly
ConditionEnvironment=WAYLAND_DISPLAY
[Service]
Type=dbus
BusName=org.freedesktop.Notifications
ExecStart=/usr/bin/swaync
ExecReload=/usr/bin/swaync-client --reload-config ; /usr/bin/swaync-client --reload-css
Restart=on-failure
[Install]
WantedBy=graphical-session.targetafter restart :
❯ systemctl status --user swaync.service
○ swaync.service - Swaync notification daemon
Loaded: loaded (/usr/lib/systemd/user/swaync.service; enabled; preset: enabled)
Active: inactive (dead)
Docs: https://github.com/ErikReider/SwayNotificationCenter❯ systemctl get-default
graphical.target❯ systemctl --user get-default
default.targetI'm just trying to get this unit to work without going through the hyprland configuration and maybe understanding "default target to boot into".
I don't love rosbeef
Offline
What is the session type?
loginctl show-session $XDG_SESSION_ID --value --property=TypeOffline
What is the session type?
❯ loginctl show-session $XDG_SESSION_ID --value --property=Type
waylandI don't love rosbeef
Offline
What is the status of graphical-session.target for your user?
$ systemctl status --user graphical-session.targetEdit:
If you boot with the kernel parameter systemd.log_level=debug does the extra logging in the journal show why the service is not started?
Last edited by loqs (2023-08-31 16:13:34)
Offline
What is the status of graphical-session.target for your user?
❯ systemctl status --user graphical-session.target
○ graphical-session.target - Current graphical user session
Loaded: loaded (/usr/lib/systemd/user/graphical-session.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7) ❯ systemctl status --user swaync.service
○ swaync.service - Swaync notification daemon
Loaded: loaded (/usr/lib/systemd/user/swaync.service; enabled; preset: enabled)
Active: inactive (dead)
Docs: https://github.com/ErikReider/SwayNotificationCenter
Aug 31 18:33:48 archnico systemd[640]: swaync.service: Watching D-Bus name 'org.freedesktop.Notifications'.
Aug 31 18:33:48 archnico systemd[640]: swaync.service: D-Bus name org.freedesktop.Notifications now not owned by anyone.
Aug 31 18:36:04 archnico systemd[640]: swaync.service: Next restart interval calculated as: 100msthere's a change but I'm not sure what to make of it.
I don't love rosbeef
Offline
Offline
Doesn't work. I already had skip username and getty unit enabled.
❯ cat /etc/systemd/system/getty@tty1.service.d/skip-username.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -- nico' --noclear --skip-login - $TERM
Environment=XDG_SESSION_TYPE=wayland❯ systemctl status getty@tty1.service
● getty@tty1.service - Getty on tty1
Loaded: loaded (/usr/lib/systemd/system/getty@.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/getty@tty1.service.d
└─skip-username.conf
Active: active (running) since Fri 2023-09-01 05:29:46 CEST; 1min 24s ago
Docs: man:agetty(8)
man:systemd-getty-generator(8)
https://0pointer.de/blog/projects/serial-console.html
Main PID: 602 (login)
Tasks: 0 (limit: 38148)
Memory: 2.9M
CPU: 23ms
CGroup: /system.slice/system-getty.slice/getty@tty1.service
‣ 602 "login -- nico"
Sep 01 05:29:46 archnico systemd[1]: Started Getty on tty1.
Sep 01 05:29:59 archnico login[602]: gkr-pam: unable to locate daemon control file
Sep 01 05:29:59 archnico login[602]: gkr-pam: stashed password to try later in open session
Sep 01 05:29:59 archnico login[602]: pam_unix(login:session): session opened for user nico(uid=1000) by nico(uid=0)
Sep 01 05:29:59 archnico login[602]: gkr-pam: unlocked login keyringI don't love rosbeef
Offline
https://man.archlinux.org/man/core/syst … User_Units
"BindsTo=graphical-session.target"
The problem is likely that this will fire too early, so the super-elegant solution would be to create a special service that binds to the target and explicitly start that service w/ sway:
https://github.com/i3/i3/issues/5186#is … 1405779520
Offline
so it's not because graphical.target? (get-default)
if i have to create a unit specifically for this service, I prefer to start it via the Hyprland config for the time being.
the psd.service unit works correctly, maybe modify the swaync unit directly?
[Unit]
Description=Profile-sync-daemon
Documentation=man:psd(1) man:profile-sync-daemon(1)
Documentation=https://wiki.archlinux.org/index.php/Profile-sync-daemon
Wants=psd-resync.service
RequiresMountsFor=/home/
After=winbindd.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/profile-sync-daemon startup
ExecStop=/usr/bin/profile-sync-daemon unsync
Environment=LAUNCHED_BY_SYSTEMD=1
[Install]
WantedBy=default.targetI don't love rosbeef
Offline
Graphical.target and graphical-session.target are two different animals. The latter, which is the one relevant here, is intended to make certain that services which only make sense in the context of a GUI (such as, for example, notification popups) only run while a GUI session is in operation and exit when it isn't. The former, which swaync service expressly *doesn't* have as a requisite (see swaync issue #51) relates to graphical logins like sddm or the like which are not recommended for sway.
AFAICT, the swaync service is designed to be activated via dbus not directly via target (or otherwise). It looks like there's some dbus issue with org.freedesktop.Notifications which you may wish to look into.
Offline
Graphical.target and graphical-session.target are two different animals. The latter, which is the one relevant here, is intended to make certain that services which only make sense in the context of a GUI (such as, for example, notification popups) only run while a GUI session is in operation and exit when it isn't. The former, which swaync service expressly *doesn't* have as a requisite (see swaync issue #51) relates to graphical logins like sddm or the like which are not recommended for sway.
Okay, it's less confusing now.
Hyprland doesn't have a "*-session.target" unit, unlike sway. maybe that explains it.
https://wiki.archlinux.org/title/Sway#M … th_systemd
The best thing would be to install a display manager...
AFAICT, the swaync service is designed to be activated via dbus not directly via target (or otherwise). It looks like there's some dbus issue with org.freedesktop.Notifications which you may wish to look into.
I'm not going to dwell on it too much, the unit launch is working correctly in the Hyprland configuration at the moment. If anything changes, I'll come back here!
thanks
I don't love rosbeef
Offline