Hi Kieran,

Kieran Brandle <[email protected]> writes:

Heya!

I was wondering if I could please have some help with the config file? Ive
really wanted to do:

Turn “issue” off

Use TTY to then run openbox on login (no login manager)

However ive had no success trying to implement both, and GDM seems to be a bit of a blockade as well, please may i ask for an example of how they can
be implemented?

Both these require modifying your operating-system services.

Printing /etc/issue is controlled by the `print-issue?' field of `mingetty-configuration', used by `mingetty-service-type'.

To remove gdm, you need to delete `gdm-service-type' from your service list.

Both these can be done with modify-services:

   (operating-system
     (services
      (modify-services %desktop-services
        (delete gdm-service-type)
        (mingetty-service-type config =>
                               (mingetty-configuration
                                 (inherit config)
                                 (print-issue? #f))))))

While you can edit your operating-system definition directly, I like to put this kind of thing into a transformation function, which takes an operating-system record and returns a changed one. Building transformations like this allows me to keep configuration centralized, and easily combine different transformations to produce the final configuration. As an example:

   (define (xf-remove-gdm os)
     (operating-system
       (services
        (modify-services (operating-system-user-services os)
          (delete gdm-service-type)))))

   (define (xf-suppress-/etc/issue os)
     (operating-system
       (services
        (modify-services (operating-system-user-services os)
          (mingetty-service-type config =>
                                 (mingetty-configuration
                                   (inherit config)
                                   (print-issue? #f)))))))

   (define xfs (compose xf-remove-gdm xf-suppress-/etc/issue))

The `xfs' at the end is a procedure (that is, a function) which applies both transformations. You can either put it around your existing configuration:

   (xfs
    (operating-system
      ...
      ))

...or assign your configuration to a variable, then transform it on the last line of your config:

   (define %os
     (operating-system
       ...
       ))

   (xfs %os)

 -- Ian

Reply via email to