From: Mathieu Othacehe <othacehe@gnu.org>
To: guix-devel@gnu.org
Subject: Towards a graphical installer?
Date: Mon, 11 May 2020 15:27:29 +0200 [thread overview]
Message-ID: <87k11iwqim.fsf@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Hello,
A way to move forward with the installer could be to propose an ISO
image starting a desktop-environment by default. The attached patch
modifies the installation image so that it starts a GNOME session. The
installer is then automatically started, inside a gnome-terminal.
The resulting ISO image is bigger: 3.9G without compression and 1.7G
with compression.
Now, I'm not sure this is something we want to merge as-is. Maybe, it's
time to port the installer to a GTK3 application, or a Web
application. As we already have something working, porting (gnu
installer) to a new graphical backend, could be not so hard.
I don't think I'll have the bandwidth to do this anytime soon, but is
someone is interested, I'm willing to help/review :).
Thanks,
Mathieu
[-- Attachment #2: installer.png --]
[-- Type: image/png, Size: 51497 bytes --]
[-- Attachment #3: 0001-installer-Use-GNOME3-desktop-environment.patch --]
[-- Type: text/x-diff, Size: 6583 bytes --]
From 3ec7528c0a7bcc318e380f41f7cbd91df9927b8a Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Mon, 11 May 2020 15:25:08 +0200
Subject: [PATCH] installer: Use GNOME3 desktop-environment.
---
gnu/installer.scm | 33 ++++++++++++++++++++++++-
gnu/system/install.scm | 55 ++++++++++++++++++++++++++++++------------
2 files changed, 71 insertions(+), 17 deletions(-)
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 79113cb0ef..adaec0db83 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -37,6 +37,7 @@
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages disk)
#:use-module (gnu packages file-systems)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:autoload (gnu packages gnupg) (guile-gcrypt)
@@ -45,10 +46,13 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages package-management)
#:use-module (gnu packages xorg)
+ #:use-module (gnu services)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system locale)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
- #:export (installer-program))
+ #:export (installer-program
+ installer-skel))
(define module-to-import?
;; Return true for modules that should be imported. For (gnu system …) and
@@ -442,3 +446,30 @@ selected keymap."
(setenv "LANG" "en_US.UTF-8")
(execl #$(program-file "installer-real" installer-builder)
"installer-real"))))
+
+(define (desktop-installer)
+ (program-file
+ "desktop-installer"
+ #~(begin
+ (let ((program
+ (string-append "sleep 3 ; " #$(installer-program))))
+ (execl "/run/setuid-programs/sudo"
+ "sudo"
+ #$(file-append gnome-terminal "/bin/gnome-terminal")
+ "--maximize"
+ "--"
+ "/bin/sh" "-c"
+ program)))))
+
+(define (installer-skel)
+ `((".config"
+ ,(file-union
+ "installer-skel"
+ `(("autostart/installer.desktop"
+ ,(mixed-text-file "installer.desktop" "[Desktop Entry]
+Version=1.0
+Terminal=False
+Type=Application
+Name=Guix System Installer
+Exec=" (desktop-installer) "
+")))))))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index fe49ffdb94..37816e5839 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -32,10 +32,13 @@
#:use-module ((guix packages) #:select (package-version))
#:use-module ((guix store) #:select (%store-prefix))
#:use-module (gnu installer)
+ #:use-module (gnu services avahi)
+ #:use-module (gnu services desktop)
#:use-module (gnu services dbus)
#:use-module (gnu services networking)
#:use-module (gnu services shepherd)
#:use-module (gnu services ssh)
+ #:use-module (gnu services xorg)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootloaders)
@@ -341,10 +344,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
(list (service virtual-terminal-service-type)
- (service kmscon-service-type
- (kmscon-configuration
- (virtual-terminal "tty1")
- (login-program (installer-program))))
+ (normal-tty "tty1")
(login-service (login-configuration
(motd motd)))
@@ -448,7 +448,28 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
;; installer. Some may also need a kernel parameter like nomodeset
;; or vga=793, but we leave that for the user to specify in GRUB.
- (service uvesafb-service-type))))
+ (service uvesafb-service-type)
+
+ ;; GNOME related services.
+ (service slim-service-type
+ (slim-configuration
+ (auto-login? #t)
+ (default-user "guest")))
+
+ polkit-wheel-service
+ x11-socket-directory-service
+
+ (service avahi-service-type)
+ (udisks-service)
+ (service upower-service-type)
+ (accountsservice-service)
+ (service colord-service-type)
+ (geoclue-service)
+ (service polkit-service-type)
+ (elogind-service)
+ (service ntp-service-type)
+
+ (service gnome-desktop-service-type))))
(define %issue
;; Greeting.
@@ -465,7 +486,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
(timezone "Europe/Paris")
(locale "en_US.utf8")
(bootloader (bootloader-configuration
- (bootloader grub-bootloader)
+ (bootloader grub-efi-bootloader)
(target "/dev/sda")))
(label (string-append "GNU Guix installation "
(package-version guix)))
@@ -490,25 +511,27 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
(type "tmpfs")
(check? #f))
- ;; XXX: This should be %BASE-FILE-SYSTEMS but we don't need
- ;; elogind's cgroup file systems.
- (list %pseudo-terminal-file-system
- %shared-memory-file-system
- %immutable-store)))
+ %base-file-systems))
+
+ ;; Our /etc/sudoers file. Since 'guest' initially has an empty password,
+ ;; allow for password-less sudo.
+ (sudoers-file (plain-file "sudoers" "\
+root ALL=(ALL) ALL
+%wheel ALL=NOPASSWD: ALL\n"))
- (users (list (user-account
+ (users (cons (user-account
(name "guest")
(group "users")
(supplementary-groups '("wheel")) ; allow use of sudo
(password "")
- (comment "Guest of GNU"))))
+ (comment "Guest of GNU"))
+ %base-user-accounts))
(issue %issue)
(services %installation-services)
- ;; We don't need setuid programs, except for 'passwd', which can be handy
- ;; if one is to allow remote SSH login to the machine being installed.
- (setuid-programs (list (file-append shadow "/bin/passwd")))
+ (skeletons (append (installer-skel)
+ (default-skeletons)))
(pam-services
;; Explicitly allow for empty passwords.
--
2.26.2
next reply other threads:[~2020-05-11 13:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 13:27 Mathieu Othacehe [this message]
2020-05-11 15:17 ` Towards a graphical installer? Jonathan Brielmaier
2020-05-11 16:01 ` Tobias Geerinckx-Rice
2020-05-13 7:11 ` Mathieu Othacehe
2020-05-11 16:29 ` pelzflorian (Florian Pelz)
2020-05-12 2:58 ` raingloom
2020-05-12 3:49 ` John Soo
2020-05-13 7:20 ` Mathieu Othacehe
2020-05-13 9:28 ` pelzflorian (Florian Pelz)
2020-05-24 20:17 ` Ludovic Courtès
2020-05-11 19:50 ` Pierre Neidhardt
2020-05-11 20:03 ` Leo Famulari
2020-05-11 22:27 ` Christopher Lemmer Webber
2020-05-12 7:09 ` Pierre Neidhardt
2020-05-12 15:33 ` Christopher Lemmer Webber
2020-05-13 5:44 ` dftxbs3e
2020-05-13 7:56 ` Pierre Neidhardt
2020-05-12 6:10 ` dftxbs3e
2020-05-12 6:13 ` dftxbs3e
2020-05-12 20:53 ` hamzeh
2020-05-14 8:08 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k11iwqim.fsf@gnu.org \
--to=othacehe@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).