dbus: Fix issue #114 (#115)

The line #249 calls system bus by default, dbus will deny this request,
then we need to call session bus instead.
This commit is contained in:
Ngô Huy 2023-10-13 05:17:00 +07:00 committed by GitHub
parent 3606b35a07
commit 60af24a70d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,7 +246,7 @@ void CPortalManager::init() {
m_iPID = getpid(); m_iPID = getpid();
try { try {
m_pConnection = sdbus::createDefaultBusConnection("org.freedesktop.impl.portal.desktop.hyprland"); m_pConnection = sdbus::createSessionBusConnection("org.freedesktop.impl.portal.desktop.hyprland");
} catch (std::exception& e) { } catch (std::exception& e) {
Debug::log(CRIT, "Couldn't create the dbus connection ({})", e.what()); Debug::log(CRIT, "Couldn't create the dbus connection ({})", e.what());
exit(1); exit(1);