Open sachinchaudhary1808 opened 1 month ago
I have the same issue. Do you, per chance, use foot
together with dwl
? I think this bug might happen since graphical-session.target
is not run.
Based on this https://unix.stackexchange.com/questions/597990/enabled-systemd-user-service-doesnt-start-at-login it seems like desktop environments, and dwl in particular, often don't implement graphical-session.target
.
I have the same issue. Do you, per chance, use
foot
together withdwl
? I think this bug might happen sincegraphical-session.target
is not run.Based on this https://unix.stackexchange.com/questions/597990/enabled-systemd-user-service-doesnt-start-at-login it seems like desktop environments, and dwl in particular, often don't implement
graphical-session.target
.
I'm using sway
Probably the same issue. I can confirm that adding the following snippet works:
config.systemd.user.services.foot = {
Unit = {
PartOf = [ "default.target" ];
After = [ "default.target" ];
};
Install.WantedBy = [ "default.target" ];
};
The proper fix, however, would be to start graphical-session.target
with sway
or dwl
...
I investigated a bit further. First of all, this is not a bug, the issue lies with the window manager which does not start the graphical-session.service
.
The previous snippet I send works in principle, the following approach is better however.
add the following systemd service to your config
systemd.user = {
services.dwl-session = {
enable = true;
unitConfig = {
Description = "dwl window manager session";
PartOf = "dwl-session.target";
Wants = "dwl-session.target";
};
serviceConfig = {
Type = "oneshot";
RemainAfterExit = "yes";
ExecStart = "${pkgs.coreutils}/bin/true";
Restart = "on-failure";
};
};
targets.dwl-session = {
enable = true;
unitConfig = {
Description = "dwl window manager session";
Requires = "basic.target";
BindsTo = "graphical-session.target";
Before = "graphical-session.target";
Wants = "graphical-session-pre.target";
After = "graphical-session-pre.target";
DefaultDependencies = "no";
RefuseManualStart = "yes";
RefuseManualStop = "yes";
StopWhenUnneeded = "yes";
};
};
};
dwl
via dwl -c 'systemctl start --user dwl-session.service'
This setup ensures that the graphical-session
is started, which in turn starts foot --server
.
Two caveats:
dwl
, it has to be adopted for other window managersdwl-session
gracefully, causing foot --server
to fail in the backgroundTLDR: The ticket can be closed, not a bug in home-manager
Are you following the right branch?
Is there an existing issue for this?
Issue description
so programs.foot.server.enable = true; dosen't really work i still have start foot server manually using foot --server, when i check the user service it's dead
Maintainer CC
No response
System information