Skip to content

Commit 54999ba

Browse files
committed
fix: prevent dtkcore from starting session bus in backend service
Unset DISPLAY environment variable before DLogManager initialization to avoid dtkcore auto-starting a D-Bus session bus, which is unnecessary for the backend service.
1 parent 2d77e26 commit 54999ba

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

service/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ int main(int argc, char *argv[])
2929
PATH += ":/sbin";
3030
qputenv("PATH", PATH.toLatin1());
3131

32+
// 避免在调用 Dtk::Core::DLogManager::registerConsoleAppender() 时 dtkcore 启动会话总线
33+
qunsetenv("DISPLAY");
34+
3235
QString frontEndDBusName;
3336
if (argc < 2) {
3437
qCritical() << "Invalid arguments count:" << argc;

0 commit comments

Comments
 (0)