1 diff -urp slim-1.3.1_/app.cpp slim-1.3.1/app.cpp
2 --- slim-1.3.1_/app.cpp 2014-10-19 03:03:12.620870228 +0300
3 +++ slim-1.3.1/app.cpp 2014-10-19 17:52:30.237854286 +0300
4 @@ -956,7 +956,7 @@ int IgnoreXIO(Display *d) {
8 -void App::StopServer() {
9 +void App::StopServerWork() {
10 // Stop alars clock and ignore signals
12 signal(SIGQUIT, SIG_IGN);
13 @@ -1013,6 +1013,28 @@ void App::StopServer() {
19 +void App::StopServer() {
25 + // yet another pandora hack: switch to tty1, where user can log in
26 + // but only if we're not shutting down / rebooting
28 + while ((ut = getutent()) != NULL) {
29 + if (ut->ut_type == RUN_LVL) {
30 + runlevel = ut->ut_pid % 256;
35 + if (1 <= runlevel && runlevel <= 5)
36 + system("/usr/bin/chvt 1");
40 void App::blankScreen()
42 diff -urp slim-1.3.1_/app.h slim-1.3.1/app.h
43 --- slim-1.3.1_/app.h 2014-10-19 03:03:12.624870228 +0300
44 +++ slim-1.3.1/app.h 2014-10-19 04:41:54.873090597 +0300
45 @@ -34,6 +34,7 @@ public:
49 + void StopServerWork();