diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c index ba81f7b..4791584 100644 --- a/src/invoker/invoker.c +++ b/src/invoker/invoker.c @@ -416,7 +416,7 @@ static void usage(int status) " -o, --keep-oom-score Notify invoker that the launched process should inherit oom_score_adj\n" " from the booster. The score is reset to 0 normally.\n" " -T, --test-mode Invoker test mode. Also control file in root home should be in place.\n" - " -F, --desktop-file Desktop file of the application.\n" + " -F, --desktop-file Desktop file of the application to notify lipstick of launching app.\n" " -h, --help Print this help.\n\n" "Example: %s --type=qt5 /usr/bin/helloworld\n\n", PROG_NAME_INVOKER, EXIT_DELAY, RESPAWN_DELAY, MAX_RESPAWN_DELAY, PROG_NAME_INVOKER); @@ -468,7 +468,7 @@ static void notify_app_lauch(const char *desktop_file) } else { info("Failed to connect to the DBus session bus: %s", error.message); dbus_error_free(&error); - return 1; + return; } } diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp index 93c8a02..0b008c5 100644 --- a/src/launcherlib/booster.cpp +++ b/src/launcherlib/booster.cpp @@ -107,7 +107,7 @@ void Booster::initialize(int initialArgc, char ** initialArgv, int newBoosterLau SingleInstancePluginEntry * pluginEntry = singleInstance->pluginEntry(); if (pluginEntry) { - std::string lockedAppName = getLockedAppName(); + std::string lockedAppName = getFinalFileName(); if (!pluginEntry->lockFunc(lockedAppName.c_str())) { // Try to activate the window of the existing instance @@ -433,7 +433,8 @@ void Booster::setEnvironmentBeforeLaunch() if (!errno && cur_prio < m_appData->priority()) setpriority(PRIO_PROCESS, 0, m_appData->priority()); - setCgroup(m_appData->fileName()); + std::string fileName = getFinalFileName(); + setCgroup(fileName); if (!m_appData->isPrivileged()) { // The application is not privileged. Drop group ID @@ -615,9 +616,9 @@ void Booster::resetOomAdj() } } -std::string Booster::getLockedAppName() +std::string Booster::getFinalFileName() { - std::string name = m_appData->appName(); + std::string name = m_appData->fileName(); if (name == "/usr/bin/sailjail") { // This doesn't implement sailjail's parsing logic but instead // has some assumptions about the arguments: diff --git a/src/launcherlib/booster.h b/src/launcherlib/booster.h index 2e7f437..efefbae 100644 --- a/src/launcherlib/booster.h +++ b/src/launcherlib/booster.h @@ -194,8 +194,8 @@ private: //! Helper method: load the library and find out address for "main". void* loadMain(); - //! Helper method: returns application name for to use for locking - std::string getLockedAppName(); + //! Helper method: returns application name for to use for locking etc. + std::string getFinalFileName(); //! Socket connection to invoker Connection* m_connection;