all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: slim: Do not reset session after failed login
@ 2016-10-18  5:31 Eric Bavier
  2016-10-18 15:20 ` Christopher Allan Webber
  2016-10-19 15:13 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Bavier @ 2016-10-18  5:31 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 143 bytes --]

Hello Guix,

The first patch fixes an often-bemoaned usability issue in SLiM.  The
second is mostly to improve aesthetics, IMHO.

`~Eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-slim-Do-not-reset-session-after-failed-login.patch --]
[-- Type: text/x-patch, Size: 2877 bytes --]

From cd6e3c5d8956c4cd89631d706a1f0be84d45275a Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 17 Oct 2016 17:17:50 -0500
Subject: [PATCH 1/2] gnu: slim: Do not reset session after failed login.

* gnu/packages/patches/slim-reset.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/display-managers.scm (slim)[source]: Use it.
---
 gnu/local.mk                          |  1 +
 gnu/packages/display-managers.scm     |  1 +
 gnu/packages/patches/slim-reset.patch | 31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 gnu/packages/patches/slim-reset.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a81c619..a22a22c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -820,6 +820,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/slim-session.patch			\
   %D%/packages/patches/slim-config.patch			\
   %D%/packages/patches/slim-sigusr1.patch			\
+  %D%/packages/patches/slim-reset.patch				\
   %D%/packages/patches/slock-CVE-2016-6866.patch		\
   %D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \
   %D%/packages/patches/soprano-find-clucene.patch		\
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 1371bb5..5479bb5 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -199,6 +199,7 @@ create smooth, animated user interfaces.")
 	     (sha256
 	      (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
              (patches (search-patches "slim-config.patch"
+                                      "slim-reset.patch"
                                       "slim-session.patch"
                                       "slim-sigusr1.patch"))))
     (build-system cmake-build-system)
diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/slim-reset.patch
new file mode 100644
index 0000000..f00a0d4
--- /dev/null
+++ b/gnu/packages/patches/slim-reset.patch
@@ -0,0 +1,31 @@
+Do not reset chosen session and maintain the session-choser dialog after a
+failed login attempt.
+
+--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
++++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
+@@ -260,13 +260,12 @@
+ }
+ 
+ void Panel::ClearPanel() {
+-	session_name = "";
+-    session_exec = "";
+ 	Reset();
+ 	XClearWindow(Dpy, Root);
+ 	XClearWindow(Dpy, Win);
+ 	Cursor(SHOW);
+ 	ShowText();
++	ShowSession();
+ 	XFlush(Dpy);
+ }
+ 
+@@ -760,9 +760,7 @@
+         pair<string,string> ses = cfg->nextSession();
+         session_name = ses.first;
+         session_exec = ses.second;
+-        if (session_name.size() > 0) {
+-                ShowSession();
+-        }
++        ShowSession();
+  }
+ 
+ /* Display session type on the screen */
-- 
2.10.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-slim-Display-login-message.patch --]
[-- Type: text/x-patch, Size: 3377 bytes --]

From 7c0af8d1f41e730fe26fd608e7c669c8ac89d765 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 17 Oct 2016 17:20:24 -0500
Subject: [PATCH 2/2] gnu: slim: Display login message.

* gnu/packages/patches/slim-login.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/display-managers.scm (slim)[source]: Use it.
---
 gnu/local.mk                          |  1 +
 gnu/packages/display-managers.scm     |  1 +
 gnu/packages/patches/slim-login.patch | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 gnu/packages/patches/slim-login.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a22a22c..3955e6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -821,6 +821,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/slim-config.patch			\
   %D%/packages/patches/slim-sigusr1.patch			\
   %D%/packages/patches/slim-reset.patch				\
+  %D%/packages/patches/slim-login.patch				\
   %D%/packages/patches/slock-CVE-2016-6866.patch		\
   %D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \
   %D%/packages/patches/soprano-find-clucene.patch		\
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 5479bb5..0eca945 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -200,6 +200,7 @@ create smooth, animated user interfaces.")
 	      (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
              (patches (search-patches "slim-config.patch"
                                       "slim-reset.patch"
+                                      "slim-login.patch"
                                       "slim-session.patch"
                                       "slim-sigusr1.patch"))))
     (build-system cmake-build-system)
diff --git a/gnu/packages/patches/slim-login.patch b/gnu/packages/patches/slim-login.patch
new file mode 100644
index 0000000..eb1bf86
--- /dev/null
+++ b/gnu/packages/patches/slim-login.patch
@@ -0,0 +1,33 @@
+Display configurable login message after successful authentication.
+
+--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
++++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
+@@ -260,19 +260,19 @@
+ 
+ void Panel::ClosePanel() {
+ 	XUngrabKeyboard(Dpy, CurrentTime);
++	XClearWindow(Dpy, Root);
+ 	XUnmapWindow(Dpy, Win);
+ 	XDestroyWindow(Dpy, Win);
+ 	XFlush(Dpy);
+--- slim-1.3.6/cfg.cpp.orig	2016-10-17 17:08:06.767666139 -0500
++++ slim-1.3.6/cfg.cpp	2016-10-17 17:06:53.115663516 -0500
+@@ -52,6 +52,7 @@
+ 	options.insert(option("lockfile","/var/run/slim.lock"));
+ 	options.insert(option("logfile","/var/log/slim.log"));
+ 	options.insert(option("authfile","/var/run/slim.auth"));
++	options.insert(option("login_msg","Logging in..."));
+ 	options.insert(option("shutdown_msg","The system is halting..."));
+ 	options.insert(option("reboot_msg","The system is rebooting..."));
+ 	options.insert(option("sessiondir",""));
+--- slim-1.3.6/app.cpp.orig	2016-10-17 17:08:41.731667384 -0500
++++ slim-1.3.6/app.cpp	2016-10-17 17:07:48.415665486 -0500
+@@ -520,6 +520,8 @@
+ 	struct passwd *pw;
+ 	pid_t pid;
+ 
++	LoginPanel->Message((char*)cfg->getOption("login_msg").c_str());
++
+ #ifdef USE_PAM
+ 	try{
+ 		pam.open_session();
-- 
2.10.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-19 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18  5:31 [PATCH] gnu: slim: Do not reset session after failed login Eric Bavier
2016-10-18 15:20 ` Christopher Allan Webber
2016-10-18 16:30   ` Eric Bavier
2016-10-19 15:13 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.