generic: disable session manager via SESSION_MANAGER environment variable unset too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-26 06:40:25 +03:00
parent d286e28fab
commit cb5f63cc72
4 changed files with 11 additions and 3 deletions

View file

@ -37,11 +37,11 @@ int main(int argc, char **argv)
{
// Disable Session Management the right way (C)
//
// ksmserver has global shortcuts. disableSessionManagement() does not prevent Qt from
// ksmserver has global shortcuts. disableSessionManagement() does not prevent Katie from
// registering the app with the session manager. We remove the address to make sure we do not
// get a hang on kglobalaccel restart (kglobalaccel tries to register with ksmserver,
// ksmserver tries to register with kglobalaccel).
unsetenv( "SESSION_MANAGER" );
::unsetenv("SESSION_MANAGER");
KAboutData aboutdata(
"kglobalaccel",

View file

@ -36,6 +36,10 @@
int main(int argc, char **argv)
{
// NOTE: disables session manager entirely, for reference:
// https://www.x.org/releases/X11R7.7/doc/libSM/xsmp.html
::unsetenv("SESSION_MANAGER");
KAboutData aboutdata("knotify", "knotify4", ki18n("KNotify"),
KDE_VERSION_STRING, ki18n("KDE Notification Daemon"),
KAboutData::License_GPL, ki18n("(C) 1997-2008, KDE Developers"));

View file

@ -251,7 +251,7 @@ int main( int argc, char* argv[] )
options.add("lockscreen", ki18n("Starts the session in locked mode"));
KCmdLineArgs::addCmdLineOptions( options );
putenv((char*)"SESSION_MANAGER=");
::unsetenv("SESSION_MANAGER");
checkComposite();
KApplication *a;

View file

@ -36,6 +36,10 @@
int main(int argc, char **argv)
{
// NOTE: disables session manager entirely, for reference:
// https://www.x.org/releases/X11R7.7/doc/libSM/xsmp.html
::unsetenv("SESSION_MANAGER");
// GS 5/2001 - I changed the name to "KDE" to make it look better
// in the titles of dialogs which are displayed.
KAboutData aboutdata("kuiserver", "kdelibs4", ki18n("Job Manager"),