-
Notifications
You must be signed in to change notification settings - Fork 175
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
Session management #263
Session management #263
Conversation
@travankor I added the dbus dependency for elogind here. Do you think it's well explained? |
src/config/session-management.md
Outdated
`systemd-logind`, a service to manage user logins. This service provides | ||
necessary features for most desktop environments and Wayland compositors. To | ||
make use of its features, install the `elogind` package and enable the `dbus` | ||
service. This might require a reboot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All you need to do is restart your session AFAIK (ie. go back to login
). When you authenticate, elogind
will start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was talking more specifically about dbus itself. That's what @flexibeast experienced, at least, IIRC. elogind
requires only that you log out and then log back in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to depend on the context. In my VM testing, i've found that GNOME requires a reboot after enabling dbus
, but KDE doesn't. i don't recall anything needing to be done after installing elogind
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Oh and i should add: logging out and back in again after enabling dbus
is not enough for GNOME. i just checked this a couple of hours ago, and it definitely needs a reboot.)
src/config/session-management.md
Outdated
If you're having any issues with `elogind`, [enable](./services/index.md) its | ||
service, as waiting for a D-Bus activation can lead to issues. | ||
|
||
If you have the [acpid(8)](https://man.voidlinux.org/acpid) service enabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can ignore
the acpid functions in elogind in /etc/elogind/logind.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have some idea on how to explain this? I couldn't find an explicit list of what acpid functions were available in logind.conf(5)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added mostly what you said, if you have some function list we could consider adding it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically everything that can accept "ignore" should all say "ignore". Like the Handle* section, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of my phrasing now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
By default, `elogind` listens for and processes ACPI events related to lid-switch
activation and presses of power, suspend and hibernate keys. This will conflict
with `acpid` if it is installed an enabled. Either disable `acpid` when enabling
`elogind` or modify `/etc/elogind/logind.conf` to ignore these events within
`elogind`. The `HandlePowerKey`, `HandleSuspendKey`, `HandleHibernateKey`
and multiple `HandleLidSwitch` options in [logind.conf(5)](https://man.voidlinux.org/logind.conf.5)
should be set to `ignore` to stop `elogind` from responding to ACPI events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@travankor "options related to controlling acpi events", possibly.
@ahesford do you think those will remain valid? I don't want to let the docs grow stale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to be agnostic, then
Either disable `acpid` when enabling `elogind` or configure `elogind`
to `ignore` ACPI events in `/etc/elogind/logind.conf`. The
[logind.conf(5) man page](https://man.voidlinux.org/logind.conf.5)
describes several configuration options, all starting with the keyword `Handle`,
that should be set to `ignore` to avoid interfering with `acpid`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you both :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixed it up a bit, I think it looks good now.
07ba31b
to
47219ea
Compare
@flexibeast would it be okay with you if I factored out the |
service. This might require a system reboot to work properly. | ||
- To use it as a user bus, you can start a given program (usually a window | ||
manager or interactive shell) with | ||
[dbus-run-session(1)](https://man.voidlinux.org/dbus-run-session.1). Most |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check, are there actually any use-cases where dbus-run-session(1)
isn't appropriate, such that users should use dbus-launch(1)
instead? @abenson?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbus-launch
can be used without the --exit-with-X11
argument in ways that dbus-run-session
cannot, like launching a short-lived program but keeping the message bus alive. However, in the context of this document, the choice is really between dbus-run-session
and dbus-launch --exit-with-x11
. I don't believe there is any case where the latter would be preferred. For one, the --exit-with-x11
option obviously requires X11. The dbus-run-session
command is more general and, in my view, takes a more robust approach to lifetime management. (DBus is kept alive as long as the child, not when some second, single-purpose process loses its connection to an X server.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, it makes sense to leave this item as is, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1586403
to
8d39fe0
Compare
- Move to config/ from config/graphical-session/ - Add D-Bus header - Expand elogind header - Add dbus dependency - Add more explanation - Update troubleshooting with acpid - xorg.md: refer to session-management for D-Bus
8d39fe0
to
0fde588
Compare
Ok, this one is a slight overhaul of the session management stuff. I still don't mention stuff like polkit, but I don't think it's that needed. D-Bus is explained in very rough terms, so any input is welcome for that part.