From 60af24a70d46d604eea8835f0d0b10fb5f0f041c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Huy?= Date: Fri, 13 Oct 2023 05:17:00 +0700 Subject: [PATCH] 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. --- src/core/PortalManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PortalManager.cpp b/src/core/PortalManager.cpp index aeb6e0f..156a1b0 100644 --- a/src/core/PortalManager.cpp +++ b/src/core/PortalManager.cpp @@ -246,7 +246,7 @@ void CPortalManager::init() { m_iPID = getpid(); 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) { Debug::log(CRIT, "Couldn't create the dbus connection ({})", e.what()); exit(1);