wf-shell: There's no way to exit a session on wf-shell

There was no easy way to exit a session through the wf-shell, I had to open a terminal and run kill wayfire to do so. It’s not much work to do it this way, but I believe it could be implemented and make for a better user experience.

Perhaps even create a “canonical” way of exiting a session that doesn’t rely on simply killing a process. I’m open to helping with developing this, because this is a project I’m really interested in right now!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 35 (20 by maintainers)

Commits related to this issue

Most upvoted comments

@soreau’s based script is dank af. I give it a 5/7

@nwg-piotr I just asked how a compositor should be exited from a panel or whatever, and I was told that the following can be done:

1. Open the wayland socket which is typically `$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY`

2. Use SO_PEERCRED to get the PID of the compositor on that socket

3. Send SIGINT to the compositor

All of this can happen in a small C program, or maybe a python script.

On a side note, wayfire doesn’t handle SIGINT properly, but that is a problem with Wayfire itself.

I have created https://github.com/soreau/wayland-logout based on this.

To exit wayfire, you can use Ctrl+Alt+Backspace.

There is not a way to do this with wf-shell yet as far as I know.