Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
X11:lxde
slim
slim-1.3.5-disable-ck-for-systemd.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File slim-1.3.5-disable-ck-for-systemd.patch of Package slim
Index: b/app.cpp =================================================================== --- a/app.cpp +++ b/app.cpp @@ -140,11 +140,14 @@ App::App(int argc, char** argv) daemonmode = false; force_nodaemon = false; firstlogin = true; +#ifdef USE_CONSOLEKIT + consolekit_support_enabled = true; +#endif Dpy = NULL; /* Parse command line Note: we force a option for nodaemon switch to handle "-nodaemon" */ - while((tmp = getopt(argc, argv, "vhp:n:d?")) != EOF) { + while((tmp = getopt(argc, argv, "vhsp:n:d?")) != EOF) { switch (tmp) { case 'p': /* Test theme */ testtheme = optarg; @@ -165,6 +168,11 @@ App::App(int argc, char** argv) std::cout << APPNAME << " version " << VERSION << endl; exit(OK_EXIT); break; +#ifdef USE_CONSOLEKIT + case 's': /* Disable consolekit support */ + consolekit_support_enabled = false; + break; +#endif case '?': /* Illegal */ logStream << endl; case 'h': /* Help */ @@ -173,6 +181,9 @@ App::App(int argc, char** argv) << " -d: daemon mode" << endl << " -nodaemon: no-daemon mode" << endl << " -v: show version" << endl +#ifdef USE_CONSOLEKIT + << " -s: start for systemd, disable consolekit support" << endl +#endif << " -p /path/to/theme/dir: preview theme" << endl; exit(OK_EXIT); break; @@ -569,6 +580,7 @@ void App::Login() { #endif #ifdef USE_CONSOLEKIT + if (consolekit_support_enabled) { /* Setup the ConsoleKit session */ try { ck.open_session(DisplayName, pw->pw_uid); @@ -577,6 +589,7 @@ void App::Login() { logStream << APPNAME << ": " << e << endl; exit(ERR_EXIT); } + } #endif /* Create new process */ @@ -588,6 +601,7 @@ void App::Login() { char** child_env = pam.getenvlist(); # ifdef USE_CONSOLEKIT + if (consolekit_support_enabled) { char** old_env = child_env; /* Grow the copy of the environment for the session cookie */ @@ -600,6 +614,7 @@ void App::Login() { memcpy(child_env, old_env, sizeof(char*)*n); child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); child_env[n] = NULL; + } # endif /* USE_CONSOLEKIT */ #else @@ -621,6 +636,7 @@ void App::Login() { child_env[n++]=StrConcat("MAIL=", maildir.c_str()); child_env[n++]=StrConcat("XAUTHORITY=", xauthority.c_str()); # ifdef USE_CONSOLEKIT + if (consolekit_support_enabled) child_env[n++]=StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); # endif /* USE_CONSOLEKIT */ child_env[n++]=0; @@ -666,12 +682,14 @@ void App::Login() { } #ifdef USE_CONSOLEKIT + if (consolekit_support_enabled) { try { ck.close_session(); } catch(Ck::Exception &e) { logStream << APPNAME << ": " << e << endl; }; + } #endif #ifdef USE_PAM Index: b/app.h =================================================================== --- a/app.h +++ b/app.h @@ -110,6 +110,10 @@ private: char *testtheme; bool testing; +#ifdef USE_CONSOLEKIT + bool consolekit_support_enabled; +#endif + std::string themeName; std::string mcookie; Index: b/slim.service =================================================================== --- a/slim.service +++ b/slim.service @@ -3,7 +3,7 @@ Description=SLiM Simple Login Manager After=systemd-user-sessions.service [Service] -ExecStart=/usr/bin/slim -nodaemon +ExecStart=/usr/bin/slim -nodaemon -s Restart=on-failure [Install]
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor