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

Add finish behavior #369

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

JezerM
Copy link
Contributor

@JezerM JezerM commented Jul 13, 2024

Description

This PR allows to define a behavior after the user logs in:

  • Immediate: The greeter is killed on start_session (Default behavior)
  • Resettable: The greeter can use the idle and reset signals. (Same as previous set_resettable)
  • Graceful: The greeter is allowed to terminate gracefully by itself. (NEW ONE!)

Essentially, this replaces the old set_resettable with more options to choose from.

greeter-grace-timeout configuration option was added to set the timeout to kill the greeter if using the Graceful behavior.

Added

  • lightdm_greeter_set_finish_behavior method to set the finish behavior.
    • LightDMGreeterFinishBehavior enum to choose the behavior.
  • greeter-grace-timeout configuration option.

Why

Some greeters may need to perform some tasks before finishing, to terminate gracefully, which may not be performed before a successful start_session. The current behavior only allowed to either kill it now or let it be forever.

In my own web based greeters, some stuff like localStorage are only saved on disk if the browser (greeter) is closed normally (JezerM/web-greeter#68), so the current behavior does not allow for a successful save of this data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant