* error setting console font in system.scm
@ 2020-06-13 13:53 Fulbert
0 siblings, 0 replies; 5+ messages in thread
From: Fulbert @ 2020-06-13 13:53 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
Hi Guixers,
(define myself (guix-noob-user (not (programmer))))
Trying to change console font with the following in "services" section
of my system configuration file :
----
…
(services (append (list
…
(service console-font-service-type
`(("tty3" . ,(file-append font-terminus "/share/consolefonts/ter-128n"))))
) %desktop-services))
…
----
which results in the following error when reconfiguring the system :
----
$ sudo guix system --dry-run reconfigure /etc/config.scm
guix system: error: service 'console-font-tty3' provided more than once
----
I probably missunderstand something and/or ill-format the
configuration…?… Help appreciated.
Below is the related [(guix) Base services] Texinfo section.
----
--scheme Variable: console-font-service-type
Install the given fonts on the specified ttys (fonts are per
virtual console on the kernel Linux). The value of this service is
a list of tty/font pairs. The font can be the name of a font
provided by the ‘kbd’ package or any valid argument to ‘setfont’,
as in this example:
`(("tty1" . "LatGrkCyr-8x16")
("tty2" . ,(file-append
font-tamzen
"/share/kbd/consolefonts/TamzenForPowerline10x20.psf"))
("tty3" . ,(file-append
font-terminus
"/share/consolefonts/ter-132n"))) ; for HDPI
----
[-- Attachment #2: guix-help-1.html --]
[-- Type: text/plain, Size: 1495 bytes --]
Hi Guixers,
(define myself (guix-noob-user (not (programmer))))
Trying to change console font with the following in "services" section of my sys
tem configuration file :
…
(services (append (list
…
(service console-font-service-type
`(("tty3" . ,(file-append font-terminus "/share/consolefonts/ter-128n"
))))
) %desktop-services))
…
which results in the following error when reconfiguring the system :
$ sudo guix system --dry-run reconfigure /etc/config.scm
guix system: error: service 'console-font-tty3' provided more than once
I probably missunderstand something and/or ill-format the configuration…?
Below is the related [(guix) Base services] Texinfo section.
--scheme Variable: console-font-service-type
Install the given fonts on the specified ttys (fonts are per
virtual console on the kernel Linux). The value of this service is
a list of tty/font pairs. The font can be the name of a font
provided by the ‘kbd’ package or any valid argument to ‘setfont’,
as in this example:
`(("tty1" . "LatGrkCyr-8x16")
("tty2" . ,(file-append
font-tamzen
"/share/kbd/consolefonts/TamzenForPowerline10x20.psf"))
("tty3" . ,(file-append
font-terminus
"/share/consolefonts/ter-132n"))) ; for HDPI
__________________________________________________________________
Last updated 2020-06-13 12:52:15 CEST
^ permalink raw reply [flat|nested] 5+ messages in thread
* error setting console font in system.scm
@ 2020-06-13 14:32 Fulbert
2020-06-14 4:18 ` John Soo
0 siblings, 1 reply; 5+ messages in thread
From: Fulbert @ 2020-06-13 14:32 UTC (permalink / raw)
To: help-guix
Hi Guixers,
(define myself (guix-noob-user (not (programmer))))
Trying to change console font with the following in "services" section
of my system configuration file :
----
…
(services (append (list
…
(service console-font-service-type
`(("tty3" . ,(file-append font-terminus "/share/consolefonts/ter-128n"))))
) %desktop-services))
…
----
which results in the following error when reconfiguring the system :
----
$ sudo guix system --dry-run reconfigure /etc/config.scm
guix system: error: service 'console-font-tty3' provided more than once
----
I probably missunderstand something and/or ill-format the
configuration…?… Help appreciated.
Below is the related [(guix) Base services] Texinfo section.
----
--scheme Variable: console-font-service-type
Install the given fonts on the specified ttys (fonts are per
virtual console on the kernel Linux). The value of this service is
a list of tty/font pairs. The font can be the name of a font
provided by the ‘kbd’ package or any valid argument to ‘setfont’,
as in this example:
`(("tty1" . "LatGrkCyr-8x16")
("tty2" . ,(file-append
font-tamzen
"/share/kbd/consolefonts/TamzenForPowerline10x20.psf"))
("tty3" . ,(file-append
font-terminus
"/share/consolefonts/ter-132n"))) ; for HDPI
----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: error setting console font in system.scm
2020-06-13 14:32 error setting console font in system.scm Fulbert
@ 2020-06-14 4:18 ` John Soo
2020-06-14 15:50 ` Fulbert
0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-06-14 4:18 UTC (permalink / raw)
To: Fulbert; +Cc: help-guix
Hello Fullbert,
Fulbert <fulbert@bluewin.ch> writes:
> Trying to change console font with the following in "services" section
> of my system configuration file :
>
> ----
> …
> (services (append (list
> …
> (service console-font-service-type
> `(("tty3" . ,(file-append font-terminus "/share/consolefonts/ter-128n"))))
> ) %desktop-services))
> …
> ----
>
> which results in the following error when reconfiguring the system :
>
> ----
> $ sudo guix system --dry-run reconfigure /etc/config.scm
> guix system: error: service 'console-font-tty3' provided more than once
> ----
This is because there is already a console-font-service-type in
%desktop-services. You will need to modify the existing service instead
like below. Note I have not tested this myself but something like it can be
found in the documentation of guile association lists
https://www.gnu.org/software/guile/manual/html_node/Adding-or-Setting-Alist-Entries.html
;; At the top of the file
(use-modules
...
(ice-9 match))
;; Replace %desktop-services with this:
(modify-services %desktop-services
(console-font-service-type
configuration =>
(map
(match-lambda
(("tty3" . f)
`("tty3" . (file-append font-terminus "/share/consolefonts/ter-128n")))
((tty . font) `(,tty . ,font)))
configuration)))
> I probably missunderstand something and/or ill-format the
> configuration…?… Help appreciated.
No problem. The error message is saying that such a service would
conflict with the existing one. The aim of the snippet is to keep the
other tty fonts and update the one on tty3.
Hope that helps!
- John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: error setting console font in system.scm
2020-06-14 4:18 ` John Soo
@ 2020-06-14 15:50 ` Fulbert
2020-06-14 15:59 ` John Soo
0 siblings, 1 reply; 5+ messages in thread
From: Fulbert @ 2020-06-14 15:50 UTC (permalink / raw)
To: John Soo; +Cc: help-guix
On Sat, Jun 13, 2020 at 09:18:18PM -0700, John Soo wrote:
> Hello Fullbert,
>
> Fulbert <fulbert@bluewin.ch> writes:
>
> > Trying to change console font with the following in "services" section
> > of my system configuration file :
> >
> > ----
> > …
> > (services (append (list
> > …
> > (service console-font-service-type
> > `(("tty3" . ,(file-append font-terminus "/share/consolefonts/ter-128n"))))
> > ) %desktop-services))
> > …
> > ----
> >
> > which results in the following error when reconfiguring the system :
> >
> > ----
> > $ sudo guix system --dry-run reconfigure /etc/config.scm
> > guix system: error: service 'console-font-tty3' provided more than once
> > ----
>
> This is because there is already a console-font-service-type in
> %desktop-services. […]You will need to modify the existing service instead
> like below. Note I have not tested this myself but something like it can be
> found in the documentation of guile association lists
>
> https://www.gnu.org/software/guile/manual/html_node/Adding-or-Setting-Alist-Entries.html
>
> ;; At the top of the file
> (use-modules
> ...
> (ice-9 match))
>
> ;; Replace %desktop-services with this:
>
> (modify-services %desktop-services
> (console-font-service-type
> configuration =>
> (map
> (match-lambda
> (("tty3" . f)
> `("tty3" . (file-append font-terminus "/share/consolefonts/ter-128n")))
> ((tty . font) `(,tty . ,font)))
> configuration)))
>
> > I probably missunderstand something and/or ill-format the
> > configuration…?… Help appreciated.
>
> No problem. The error message is saying that such a service would
> conflict with the existing one. The aim of the snippet is to keep the
> other tty fonts and update the one on tty3.
>
> Hope that helps!
Indeed! It works now. Thank you for your Help John !
For this to work though, I just had to correct a typo : add a `comma`
(to _unquote_, if I'm not wrong) before the `(file-append …`.
So, for reference :
----
;; At the top of the file
(use-modules
...
(ice-9 match))
;; Replace %desktop-services with this:
(modify-services %desktop-services
(console-font-service-type configuration =>
(map
(match-lambda
(("tty3" . f)
`("tty3" . ,(file-append
font-terminus
"/share/consolefonts/ter-128n.psf.gz")))
((tty . font) `(,tty . ,font))) configuration)))
----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: error setting console font in system.scm
2020-06-14 15:50 ` Fulbert
@ 2020-06-14 15:59 ` John Soo
0 siblings, 0 replies; 5+ messages in thread
From: John Soo @ 2020-06-14 15:59 UTC (permalink / raw)
To: Fulbert; +Cc: help-guix
Hi Fulbert,
Fulbert <fulbert@bluewin.ch> writes:
> For this to work though, I just had to correct a typo : add a `comma`
> (to _unquote_, if I'm not wrong) before the `(file-append …`.
> So, for reference :
> ----
> ;; At the top of the file
> (use-modules
> ...
> (ice-9 match))
>
> ;; Replace %desktop-services with this:
> (modify-services %desktop-services
> (console-font-service-type configuration =>
> (map
> (match-lambda
> (("tty3" . f)
> `("tty3" . ,(file-append
> font-terminus
> "/share/consolefonts/ter-128n.psf.gz")))
> ((tty . font) `(,tty . ,font))) configuration)))
> ----
Ah, good catch. HTH!
- John
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-14 16:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-13 14:32 error setting console font in system.scm Fulbert
2020-06-14 4:18 ` John Soo
2020-06-14 15:50 ` Fulbert
2020-06-14 15:59 ` John Soo
-- strict thread matches above, loose matches on Subject: below --
2020-06-13 13:53 Fulbert
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.