unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* this conf doesnt work. Why ?
@ 2018-03-17 20:46 Catonano
  2018-03-18 10:15 ` Thorsten Wilms
  2018-03-19  4:08 ` Chris Marusich
  0 siblings, 2 replies; 6+ messages in thread
From: Catonano @ 2018-03-17 20:46 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2939 bytes --]

the machine boots, but it doesn't start a desktop environment, SLIM doesn't
come up

If I login as root, startx isn't available

What's wrong with this definition ?


;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.

(use-modules (gnu) (gnu system nss))
(use-modules (gnu packages tryton))
(use-modules (gnu packages databases))
;(use-modules (gnu packages xorg))
(use-modules (gnu services xorg))
(use-service-modules desktop)
(use-package-modules certs gnome)
;(use-service-modules databases)

;(use-service-modules trytond)

(define %my-services
  (modify-services
   (cons* (gnome-desktop-service)
      (cons*
       (service agetty-service-type
            (agetty-configuration (tty "ttyS0")))
       %desktop-services))
   (slim-service-type config =>
              (slim-configuration
               (inherit config)
               (startx (xorg-start-command
                #:configuration-file
                (xorg-configuration-file
                 ;; Setup X to use a swiss german keyboard layout.
                 #:extra-config
                 '("Section \"InputClass\"
        Identifier \"keyboard-all\"
        Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\"
        MatchIsKeyboard \"on\"
EndSection"))))))))


(operating-system
  (host-name "antelope")
  (timezone "Europe/Paris")
  (locale "it_IT.utf8")

  ;;This is to be able to login into a guest system
  (kernel-arguments '("console=ttyS0"))

  ;; Assuming /dev/sdX is the target hard disk, and "my-root"
  ;; is the label of the target root file system.
  (bootloader (grub-configuration (target "/dev/sda")))

  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4")

                      )
                      %base-file-systems))

  (users (cons (user-account
                (name "catonano")
        (password (crypt " " "ab"))
                (comment "Alice's brother")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/catonano"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
           ;;python-trytond
           ;;tryton
           ;;postgresql
                   %base-packages))

  ;; Add GNOME and/or Xfce---we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with Wicd,
  ;; and more.

  (services %my-services)

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

[-- Attachment #2: Type: text/html, Size: 4238 bytes --]

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

* Re: this conf doesnt work. Why ?
  2018-03-17 20:46 this conf doesnt work. Why ? Catonano
@ 2018-03-18 10:15 ` Thorsten Wilms
  2018-03-18 11:38   ` Catonano
  2018-03-19  4:08 ` Chris Marusich
  1 sibling, 1 reply; 6+ messages in thread
From: Thorsten Wilms @ 2018-03-18 10:15 UTC (permalink / raw)
  To: help-guix

On 17.03.2018 21:46, Catonano wrote:
> the machine boots, but it doesn't start a desktop environment, SLIM 
> doesn't come up
> 
> If I login as root, startx isn't available
> 
> What's wrong with this definition ?

> (use-modules (gnu) (gnu system nss))
> (use-modules (gnu packages tryton))
> (use-modules (gnu packages databases))
> ;(use-modules (gnu packages xorg))
> (use-modules (gnu services xorg))

You don't have to repeat the use-modules form, it can be used like this:
(use-modules (gnu)
              (gnu system nss)
              (gnu packages tryton)
              (gnu packages databases)
              (gnu packages xorg))

I'm actually surprised the other way works, but noticed it appears for 
"Globally-Visible Packages" at:
https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html


> (use-service-modules desktop)
> (use-package-modules certs gnome)
> ;(use-service-modules databases)
> 
> ;(use-service-modules trytond)

> (define %my-services
>    (modify-services
>     (cons* (gnome-desktop-service)
>        (cons*
>         (service agetty-service-type
>              (agetty-configuration (tty "ttyS0")))
>         %desktop-services))
>     (slim-service-type config =>
>                (slim-configuration
>                 (inherit config)
>                 (startx (xorg-start-command
>                  #:configuration-file
>                  (xorg-configuration-file
>                   ;; Setup X to use a swiss german keyboard layout.
>                   #:extra-config
>                   '("Section \"InputClass\"
>          Identifier \"keyboard-all\"
>          Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\"
>          MatchIsKeyboard \"on\"
> EndSection"))))))))

Why do you use one level of indirection for no gain? This can go into 
services, directly.

That modify-services looks very suspicious. Why the nested cons*?
modify-services should be fed with one list of services, followed by 
(type variable => body) clauses, like in:


(modify-services %desktop-services
   (mingetty-service-type config =>
     (mingetty-configuration
       (inherit config)
       (motd (plain-file "motd" "Howdy FOSDEM!"))))
   (upower-service-type config =>
     (upower-configuration
       (inherit config)
       (ignore-lid? #true)
       (percentage-critical 5.))))


modify-services %desktop-services
  (udev-service-type config =>
    (udev-configuration (inherit config)
     (rules (append (udev-configuration-rules config)
                    (list %example-udev-rule))))))


Aside of that, I wonder if you have to put the xorg server into either 
global packages, or install it for root.


> (operating-system
>    (host-name "antelope")
>    (timezone "Europe/Paris")
>    (locale "it_IT.utf8")
> 
>    ;;This is to be able to login into a guest system
>    (kernel-arguments '("console=ttyS0"))
> 
>    ;; Assuming /dev/sdX is the target hard disk, and "my-root"
>    ;; is the label of the target root file system.
>    (bootloader (grub-configuration (target "/dev/sda")))
> 
>    (file-systems (cons (file-system
>                          (device "my-root")
>                          (title 'label)
>                          (mount-point "/")
>                          (type "ext4")
> 
>                        )
>                        %base-file-systems))
> 
>    (users (cons (user-account
>                  (name "catonano")
>          (password (crypt " " "ab"))
>                  (comment "Alice's brother")
>                  (group "users")
>                  (supplementary-groups '("wheel" "netdev"
>                                          "audio" "video"))
>                  (home-directory "/home/catonano"))
>                 %base-user-accounts))

(crypt " " "ab") looks suspicious to me, but I haven't read up on how it 
should be used.


>    ;; This is where we specify system-wide packages.
>    (packages (cons* nss-certs         ;for HTTPS access
>                     gvfs              ;for user mounts
>             ;;python-trytond
>             ;;tryton
>             ;;postgresql
>                     %base-packages))
> 
>    ;; Add GNOME and/or Xfce---we can choose at the log-in
>    ;; screen with F1.  Use the "desktop" services, which
>    ;; include the X11 log-in service, networking with Wicd,
>    ;; and more.
> 
>    (services %my-services)
> 
>    ;; Allow resolution of '.local' host names with mDNS.
>    (name-service-switch %mdns-host-lookup-nss))
> 


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

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

* Re: this conf doesnt work. Why ?
  2018-03-18 10:15 ` Thorsten Wilms
@ 2018-03-18 11:38   ` Catonano
  2018-03-18 11:42     ` Catonano
  0 siblings, 1 reply; 6+ messages in thread
From: Catonano @ 2018-03-18 11:38 UTC (permalink / raw)
  To: t_w_; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2654 bytes --]

Than you Thorsten

This is a simpler version (I gave up on thhe customized slim service :- )
and it works, the graphicl env shows up



2018-03-18 11:15 GMT+01:00 Thorsten Wilms <t_w_@freenet.de>:


>
> That modify-services looks very suspicious. Why the nested cons*?
>

I simply didn't remember how to use cons* ;-)


> Aside of that, I wonder if you have to put the xorg server into either
> global packages, or install it for root.



;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.

(use-modules (gnu) (gnu system nss))
;(use-modules (gnu packages tryton))
;(use-modules (gnu packages databases))
;(use-modules (gnu packages xorg))
(use-modules (gnu services xorg))
(use-service-modules desktop)
(use-package-modules certs gnome)
;(use-service-modules databases)

;(use-service-modules trytond)



(operating-system
  (host-name "antelope")
  (timezone "Europe/Paris")
  (locale "it_IT.utf8")

  ;;This is to be able to login into a guest system
  (kernel-arguments '("console=ttyS0"))

  ;; Assuming /dev/sdX is the target hard disk, and "my-root"
  ;; is the label of the target root file system.
  (bootloader (grub-configuration (target "/dev/sda")))

  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4")

                      )
                      %base-file-systems))

  (users (cons (user-account
                (name "catonano")
        (password (crypt " " "ab"))
                (comment "Alice's brother")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/catonano"))
               %base-user-accounts))


  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
           ;;python-trytond
           ;;tryton
           ;;postgresql
                   %base-packages))

  ;; Add GNOME and/or Xfce---we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with Wicd,
  ;; and more.

  (services

   (cons*
    (service agetty-service-type
         (agetty-configuration (tty "ttyS0")))
    (gnome-desktop-service)
    (xfce-desktop-service)
    %desktop-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

[-- Attachment #2: Type: text/html, Size: 4125 bytes --]

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

* Re: this conf doesnt work. Why ?
  2018-03-18 11:38   ` Catonano
@ 2018-03-18 11:42     ` Catonano
  0 siblings, 0 replies; 6+ messages in thread
From: Catonano @ 2018-03-18 11:42 UTC (permalink / raw)
  To: t_w_; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

something that leaves me bafffled is this

(length %my-services) => 33
(length %desktop-services) => 33

Shouldn't %my-services be a bit longer ?

I even pretty printed it but it's a list of records, pretty-print doesn't
do wonders on it, it's not exactly easy to inspect :-/

[-- Attachment #2: Type: text/html, Size: 428 bytes --]

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

* Re: this conf doesnt work. Why ?
  2018-03-17 20:46 this conf doesnt work. Why ? Catonano
  2018-03-18 10:15 ` Thorsten Wilms
@ 2018-03-19  4:08 ` Chris Marusich
  2018-03-19  5:54   ` Catonano
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Marusich @ 2018-03-19  4:08 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

Catonano <catonano@gmail.com> writes:

> (define %my-services
>   (modify-services
>    (cons* (gnome-desktop-service)
>       (cons*
>        (service agetty-service-type
>             (agetty-configuration (tty "ttyS0")))
>        %desktop-services))
>    (slim-service-type config =>
>               (slim-configuration
>                (inherit config)
>                (startx (xorg-start-command
>                 #:configuration-file
>                 (xorg-configuration-file
>                  ;; Setup X to use a swiss german keyboard layout.
>                  #:extra-config
>                  '("Section \"InputClass\"
>         Identifier \"keyboard-all\"
>         Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\"
>         MatchIsKeyboard \"on\"
> EndSection"))))))))

This looks wrong to me.  If this works, I think it's only by accident.
Check out the docstring for modify-services in gnu/services.scm, which
says:

  Modify the services listed in SERVICES according to CLAUSES and return
  the resulting list of services.  Each clause must have the form:

    (TYPE VARIABLE => BODY)

So, every clause after modify-services needs to have that form.  This
may also be the reason why the length of your %my-services is the same
as %desktop-services.  I think maybe the gnome-desktop-service and the
agetty-service-type service you've created are just being ignored
somehow.

Does this make sense?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: this conf doesnt work. Why ?
  2018-03-19  4:08 ` Chris Marusich
@ 2018-03-19  5:54   ` Catonano
  0 siblings, 0 replies; 6+ messages in thread
From: Catonano @ 2018-03-19  5:54 UTC (permalink / raw)
  To: Chris Marusich; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 3047 bytes --]

2018-03-19 5:08 GMT+01:00 Chris Marusich <cmmarusich@gmail.com>:

> Catonano <catonano@gmail.com> writes:
>
> > (define %my-services
> >   (modify-services
> >    (cons* (gnome-desktop-service)
> >       (cons*
> >        (service agetty-service-type
> >             (agetty-configuration (tty "ttyS0")))
> >        %desktop-services))
> >    (slim-service-type config =>
> >               (slim-configuration
> >                (inherit config)
> >                (startx (xorg-start-command
> >                 #:configuration-file
> >                 (xorg-configuration-file
> >                  ;; Setup X to use a swiss german keyboard layout.
> >                  #:extra-config
> >                  '("Section \"InputClass\"
> >         Identifier \"keyboard-all\"
> >         Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\"
> >         MatchIsKeyboard \"on\"
> > EndSection"))))))))
>
> This looks wrong to me.  If this works, I think it's only by accident.
> Check out the docstring for modify-services in gnu/services.scm, which
> says:
>
>   Modify the services listed in SERVICES according to CLAUSES and return
>   the resulting list of services.  Each clause must have the form:
>
>     (TYPE VARIABLE => BODY)
>
> So, every clause after modify-services needs to have that form.  This
> may also be the reason why the length of your %my-services is the same
> as %desktop-services.  I think maybe the gnome-desktop-service and the
> agetty-service-type service you've created are just being ignored
> somehow.
>
> Does this make sense?
>
> --
> Chris
>

Yes, the version you are commenting is not current anymore ;-)

I did read the manual and I wrote snippets that I experimented in a REPL

The current version mostly works, my services aren't being ignored anymore

The problem I'm having now is that Xorg doesn't like the configuration I'm
providing it with

But the Scheme code I wrote is working

I'm not gonna delve into Xorg conf though. Not my thing, sorry

I pasted an excerpt of the log it's giving me, anyway

This is the version that is working right now

(define %my-services
  (modify-services
      %desktop-services
;    (slim-service-type config =>
;                    (slim-configuration
;                     (inherit config)
;                     (startx (xorg-start-command
;                              #:configuration-file
;                              (xorg-configuration-file
                               ;; Setup X to use a swiss german keyboard
layout.
;                               #:extra-config
;                               '("Section \"InputClass\"
;        Identifier \"keyboard-all\"
;        Option \"XkbLayout\" \"ch\"
;        MatchIsKeyboard \"on\"
;EndSection"))))))
    (gnome-desktop-service-type config => (gnome-desktop-configuration
(inherit config)))
    (agetty-service-type config => (agetty-configuration (inherit config)
                             (tty "ttyS0")))
    (xfce-desktop-service-type config => (xfce-desktop-configuration
(inherit config)))

    ))

[-- Attachment #2: Type: text/html, Size: 4669 bytes --]

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

end of thread, other threads:[~2018-03-19  5:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-17 20:46 this conf doesnt work. Why ? Catonano
2018-03-18 10:15 ` Thorsten Wilms
2018-03-18 11:38   ` Catonano
2018-03-18 11:42     ` Catonano
2018-03-19  4:08 ` Chris Marusich
2018-03-19  5:54   ` Catonano

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).