add login-proxy option
There are cases where systemd-logind is not used/running. Result is that bcklight module will not run. Add an option that, when set to false, allows backlight module to work without systemd-logind.
This commit is contained in:
@ -150,6 +150,7 @@ BacklightBackend::BacklightBackend(std::chrono::milliseconds interval,
|
||||
throw std::runtime_error("No backlight found");
|
||||
}
|
||||
|
||||
#ifdef HAVE_LOGIN_PROXY
|
||||
// Connect to the login interface
|
||||
login_proxy_ = Gio::DBus::Proxy::create_for_bus_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SYSTEM, "org.freedesktop.login1",
|
||||
@ -160,6 +161,7 @@ BacklightBackend::BacklightBackend(std::chrono::milliseconds interval,
|
||||
Gio::DBus::BusType::BUS_TYPE_SYSTEM, "org.freedesktop.login1",
|
||||
"/org/freedesktop/login1/session/self", "org.freedesktop.login1.Session");
|
||||
}
|
||||
#endif
|
||||
|
||||
udev_thread_ = [this] {
|
||||
std::unique_ptr<udev, UdevDeleter> udev{udev_new()};
|
||||
|
Reference in New Issue
Block a user