Skip to content
Snippets Groups Projects

Add weston-wrapper

Closed David Redondo requested to merge davidre/weston:restart into main
1 unresolved thread

A tiny helper binary that restarts the compositor when it crashes. Useful even when clients do not support restarting to restart the compositor without the session going down. Based on kwin_wrapper from KWin.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Pekka Paalanen
  • reopened

  • David Redondo resolved all threads

    resolved all threads

  • David Redondo added 1 commit

    added 1 commit

    Compare with previous version

  • David Redondo added 1 commit

    added 1 commit

    Compare with previous version

  • David Redondo added 1 commit

    added 1 commit

    Compare with previous version

  • David Redondo resolved all threads

    resolved all threads

    • Out of interest, what's the usecase for this? Our generally-advised method of having watchdogs is to launch via a systemd service.

    • The important part is keeping the socket on the file system.. Keeping the file on the fs is doable using a systemd service but only feasibly hardcoded socket names. Once you try and find the next socket that's free and export the right environment variables you end up with something like the wrapper.

      I'm happy to close this as a MR. It was primarily made so the GTK devs would be easily able to test some other changes I had made for making GTK apps to handle the case of a compositor restarting.

    • Oh right, that ... seems pretty niche. I would've assumed that you could've picked a static socket name if you're doing it for local development?

      I think I'm going to close this out, and we can just keep this as documentation for if someone else needs it at some point in time. Thanks though!

    • Hi!

      I have recently implemented a generic wrapper (named wl-restart) similar to this that currently has support for Kwin (same args as kwin_wayland_wrapper), hyprland (merged, KDE CLI args), sway (unmerged, KDE CLI args or env vars), and labwc (unmerged, KDE CLI args or env vars).

      The Labwc devs have voiced interest in a generic env var based mechanism (WAYLAND_SOCKET_NAME and WAYLAND_SOCKET_FD) instead of a CLI arg, since some compositors use different CLI arg conventions (e.g. river).

      Would Weston be interested in merging support for recognizing either the KDE CLI args (--socket is already there, plus --wayland-fd for FD handover) or the env var mechanism? (WAYLAND_SOCKET_NAME and WAYLAND_SOCKET_FD)

      Recognizing the env var could also be potentially gated behind a --socket-handover CLI option.

      I'm also open to suggestions regarding the socket passing mechanism. I do think having a generic restarting wrapper could be useful for smaller compositors to avoid duplicating work.

    • Please register or sign in to reply
  • closed

  • Please register or sign in to reply
    Loading