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

Restart xwayland if it crashes #186

Open
Ottatop opened this issue Mar 30, 2024 · 3 comments
Open

Restart xwayland if it crashes #186

Ottatop opened this issue Mar 30, 2024 · 3 comments
Labels
enhancement New feature or request low priority Low priority items xwayland Concerns xwayland

Comments

@Ottatop
Copy link
Collaborator

Ottatop commented Mar 30, 2024

Currently if xwayland crashes or exits by someone killing the Xwayland process then xwayland is just dead. Ideally we'd attempt a restart, but that creates a problem: restarting the xwayland server will increment DISPLAY by 1. It should be easy to send a message to a config to get it to set the new DISPLAY, but any already open applications can't get the updated DISPLAY. Unsure of how to deal with that.

@Ottatop Ottatop added enhancement New feature or request xwayland Concerns xwayland low priority Low priority items labels Mar 30, 2024
@ildar
Copy link

ildar commented Mar 31, 2024 via email

@Ottatop
Copy link
Collaborator Author

Ottatop commented Mar 31, 2024

when Xserver crashes, 95% apps using it get a signal and go away. So it's not really a problem (usually).

Did not know that. I was thinking more Wayland applications that could spawn xwayland ones that are already open, like terminals. Though I guess there isn't really a way to update their environment variables.

if you take a few seconds before restart then the DISPLAY may not increase.

Interesting, I'll try that out once I get around to implementing this issue. If it works then the above doesn't need worrying about.

@LogicalOverflow
Copy link
Contributor

Looking at Smithay, not changing the DISPLAY should be doable. You can specify a DISPLAY to use when starting xwayland, so forcing re-use of the same value isn't an issue. If the locking "just works" (i.e. is automatically released when xwayland crashes), then just restarting xwayland with the fixed display on crash (or retrying if it fails to start) should be enough already.

I might give implementing this a shot, if/when I find time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Low priority items xwayland Concerns xwayland
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants