From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGkON-0008UU-Og for guix-patches@gnu.org; Sun, 28 Oct 2018 08:42:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGkOJ-0004YR-KN for guix-patches@gnu.org; Sun, 28 Oct 2018 08:42:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42538) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGkOJ-0004Y9-Dy for guix-patches@gnu.org; Sun, 28 Oct 2018 08:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGkOJ-0007NS-BU for guix-patches@gnu.org; Sun, 28 Oct 2018 08:42:03 -0400 Subject: [bug#33186] [PATCH 3/7] services: kmscon: Add an auto-login option. Resent-Message-ID: From: Mathieu Othacehe Date: Sun, 28 Oct 2018 21:40:39 +0900 Message-Id: <20181028124043.21773-4-m.othacehe@gmail.com> In-Reply-To: <20181028124043.21773-2-m.othacehe@gmail.com> References: <20181028124043.21773-2-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33186@debbugs.gnu.org Add an auto-login option that behaves as the one of mingetty-service. * gnu/services/base.scm (kmscon-configuration)[auto-login]: New field. (kmscon-service-type): Pass it to kmscon command. * doc/guix.texi: Document it. --- doc/guix.texi | 6 +++++- gnu/services/base.scm | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 87579d414..c58d7909f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31,7 +31,7 @@ Copyright @copyright{} 2016, 2017, 2018 Jan Nieuwenhuizen@* Copyright @copyright{} 2016 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2017, 2018 Clément Lassieur@* -Copyright @copyright{} 2017 Mathieu Othacehe@* +Copyright @copyright{} 2017, 2018 Mathieu Othacehe@* Copyright @copyright{} 2017 Federico Beffa@* Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* Copyright @copyright{} 2017 Thomas Danckaert@* @@ -10873,6 +10873,10 @@ A gexp denoting the name of the log-in program. The default log-in program is @item @code{login-arguments} (default: @code{'("-p")}) A list of arguments to pass to @command{login}. +@item @code{auto-login} (default: #f) +When passed a login name, as a string, the specified user will be logged +in automatically without prompting for their login name or password. + @item @code{hardware-acceleration?} (default: #f) Whether to use hardware acceleration. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 4c341309b..8a8df45a1 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2018 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -2040,6 +2041,8 @@ This service is not part of @var{%base-services}." (default (file-append shadow "/bin/login"))) (login-arguments kmscon-configuration-login-arguments (default '("-p"))) + (auto-login kmscon-configuration-auto-login + (default #f)) (hardware-acceleration? kmscon-configuration-hardware-acceleration? (default #f))) ; #t causes failure @@ -2051,6 +2054,7 @@ This service is not part of @var{%base-services}." (virtual-terminal (kmscon-configuration-virtual-terminal config)) (login-program (kmscon-configuration-login-program config)) (login-arguments (kmscon-configuration-login-arguments config)) + (auto-login (kmscon-configuration-auto-login config)) (hardware-acceleration? (kmscon-configuration-hardware-acceleration? config))) (define kmscon-command @@ -2059,7 +2063,10 @@ This service is not part of @var{%base-services}." "--vt" #$virtual-terminal "--no-switchvt" #$@(if hardware-acceleration? '("--hwaccel") '()) - "--" #$login-program #$@login-arguments)) + "--" #$login-program #$@login-arguments + #$@(if auto-login + #~(#$auto-login) + #~()))) (shepherd-service (documentation "kmscon virtual terminal") -- 2.17.1