Skip to content
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

[discussion] Session management #6327

Closed
fwsmit opened this issue Jun 16, 2021 · 3 comments
Closed

[discussion] Session management #6327

fwsmit opened this issue Jun 16, 2021 · 3 comments
Labels
enhancement New feature or incremental improvement

Comments

@fwsmit
Copy link
Contributor

fwsmit commented Jun 16, 2021

Upon logging in you often want to start a few services/daemons that need to keep running while sway is running. After sway has stopped you want those services to stop as well.
There are a few options for starting services:

  • With sway exec
    The issue with this approach is that the service isn't automatically stopped when stopping sway. This is a dealbreaker for me, as this leads to very subtle issues like No notifications showing up after logging out and logging in. dunst-project/dunst#851.
  • With startup
    This seems to be the official approach for session management in sway. It seems like this would work OK, but the big issue here is that there is no documentation AFAIK, other than what's on the sway wiki. The project also seems to be unmaintained, since the last commit is more than a year old.
  • With systemd
    This approach is officially NOT supported, however it seems to be the only one that has actual documentation and can stop processes when sway exits.

I think we either need more documentation for startup, or select another solution as the official one and promote it. I'm curious what others think about this issue.

@fwsmit fwsmit added the enhancement New feature or incremental improvement label Jun 16, 2021
@emersion
Copy link
Member

Wayland clients are supposed to quit when they get disconnected from the compositor.

What is startup? I don't know about it, and there's nothing official about it.

@fwsmit
Copy link
Contributor Author

fwsmit commented Jun 16, 2021

Wayland clients are supposed to quit when they get disconnected from the compositor.

Thanks, I didn't know that. This would solve the particular issue I had and probably most of these issues. I'm still curious if there might be edge cases.
I can think of a few:

  • An X11 client: will probably stop when xwayland stops
  • An non-graphical user client, for example darkman. This is a service that turns on dark mode at certain times by setting the GTK/QT system theme. This one might be an issue if you log out and log back in. Maybe it will start multiple times.
  • swayidle: I've had issues with this one when running sway inside a window for development. After closing sway, swayidle was still running. After a few minutes my system went to sleep because swayidle saw no input. This may be a swayidle issue though.

What is startup? I don't know about it, and there's nothing official about it.

My bad, I misinterpreted that then. Systemd is very clearly marked in the wiki as unofficial and startup, as the only alternative, was not.

@emersion
Copy link
Member

Systemd is very clearly marked in the wiki as unofficial and startup, as the only alternative, was not.

Updated the wiki page to add a clear disclaimer. We don't officially support any service manager. Systemd just happens to be the service manager people open the most issues about.

Closing since there aren't actionable items here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement
Development

No branches or pull requests

2 participants