slim: chvt on exit so that user can use console
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 19 Oct 2014 01:51:09 +0000 (04:51 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 19 Oct 2014 01:51:09 +0000 (04:51 +0300)
recipes/slim/slim/chvt_on_exit.patch [new file with mode: 0644]
recipes/slim/slim_1.3.1.bb

diff --git a/recipes/slim/slim/chvt_on_exit.patch b/recipes/slim/slim/chvt_on_exit.patch
new file mode 100644 (file)
index 0000000..1b7a35a
--- /dev/null
@@ -0,0 +1,37 @@
+diff -urp slim-1.3.1_/app.cpp slim-1.3.1/app.cpp
+--- slim-1.3.1_/app.cpp        2014-10-19 03:03:12.620870228 +0300
++++ slim-1.3.1/app.cpp 2014-10-19 04:42:05.373090987 +0300
+@@ -956,7 +956,7 @@ int IgnoreXIO(Display *d) {
+ }
+-void App::StopServer() {
++void App::StopServerWork() {
+     // Stop alars clock and ignore signals
+     alarm(0);
+     signal(SIGQUIT, SIG_IGN);
+@@ -1013,6 +1013,12 @@ void App::StopServer() {
+     cerr << endl;
+ }
++void App::StopServer() {
++    StopServerWork();
++    // yet another pandora hack: switch to tty1, where user can log in
++    system("/usr/bin/chvt 1");
++}
++
+ void App::blankScreen()
+ {
+Only in slim-1.3.1_: .app.cpp.swp
+diff -urp slim-1.3.1_/app.h slim-1.3.1/app.h
+--- slim-1.3.1_/app.h  2014-10-19 03:03:12.624870228 +0300
++++ slim-1.3.1/app.h   2014-10-19 04:41:54.873090597 +0300
+@@ -34,6 +34,7 @@ public:
+     ~App();
+     void Run();
+     int GetServerPID();
++    void StopServerWork();
+     void StopServer();
+     // Lock functions
index af31089..d7e2a0c 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION="Simple Login Manager"
 HOMEPAGE="http://slim.berlios.de"
 LICENSE = "GPL"
 
 HOMEPAGE="http://slim.berlios.de"
 LICENSE = "GPL"
 
-PR = "r7"
+PR = "r8"
 
 inherit update-rc.d
 
 
 inherit update-rc.d
 
@@ -21,6 +21,7 @@ SRC_URI=" \
   file://delay.patch;patch=1 \  
   file://pam-unix2.patch;patch=1 \    
   file://pandora_xmodmap_hack.patch;patch=1 \
   file://delay.patch;patch=1 \  
   file://pam-unix2.patch;patch=1 \    
   file://pandora_xmodmap_hack.patch;patch=1 \
+  file://chvt_on_exit.patch;patch=1 \
   file://rc.slim \
   file://slim-dynwm \
   file://update_slim_wmlist \
   file://rc.slim \
   file://slim-dynwm \
   file://update_slim_wmlist \