Skip to content

Conversation

@andrew-sayers
Copy link

If started during login, this service exits with a warning "cannot open display: :1". Systemd then restarts it successfully a few moments later.

Delay start until it is likely to succeed.

If started during login, this service exits with a warning
"cannot open display: :1".  Systemd then restarts it successfully
a few moments later.

Delay start until it is likely to succeed.
@andrew-sayers
Copy link
Author

Note after further testing - basic.target is not stopped if you log out then immediately back in again, so this fix doesn't solve the problem for the most obvious test scenario. You should be able to confirm this fix by logging out, waiting about 30 seconds for your instance of systemd --user to time out, then logging back in.

This loophole could probably be fixed by adding e.g. After=dbus.service, but that feels like it would add real-world fragility for the sake of hypothetical robustness.

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