unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* GRUB theming - background
@ 2020-04-07 16:48 白い熊
  2020-04-07 17:39 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-04-07 16:48 UTC (permalink / raw)
  To: help-guix

Hi Guix:

I have this nice GNU hacker background that ages ago some system installed as the GRUB background then. I'd like to use it as GRUB background in Guix System now.

I tried to set it thus, along the lines of GRUB theming instruction in the manual:

(grub-configuration
(theme (grub-theme
(inherit %default-theme)
(background_image '("/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")))))

But it doesn't work — gives me an invalid field specifier — so
I guess “background_image” cannot be specified this way. Any other way to do it?

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊

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

* Re: GRUB theming - background
  2020-04-07 16:48 GRUB theming - background 白い熊
@ 2020-04-07 17:39 ` Tobias Geerinckx-Rice
  2020-04-07 17:58   ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-04-07 17:39 UTC (permalink / raw)
  To: help-guix

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

白い熊,

白い熊 写道:
> (background_image 
> '("/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")))))

The ‘invalid field specifier’ is ‘background_image’, which isn't 
part of the (undocumented) grub-theme record.

Try something roughly like (unfortunately untested):

(grub-theme
 (inherit %default-theme)
 (images
  (list (grub-image
         (aspect-ratio 4/3) ; or 16/9, &c., to match…
         (file (local-file
                "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))))))

‘local-file’ takes care of creating an immutable copy of 
gnu-grub.jpg in the store, where it can be seen and safely used by 
the sandboxed build environment.

Kind regards,

T G-R

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

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

* Re: GRUB theming - background
  2020-04-07 17:39 ` Tobias Geerinckx-Rice
@ 2020-04-07 17:58   ` 白い熊
  2020-04-07 19:18     ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-04-07 17:58 UTC (permalink / raw)
  To: GNU Guix help

Apr 7, 2020 19:40:56 Tobias Geerinckx-Rice <me@tobias.gr>:

> Try something roughly like (unfortunately untested):
>
> (grub-theme
> (inherit %default-theme)
> (images
> (list (grub-image
> (aspect-ratio 4/3) ; or 16/9, &c., to match…
> (file (local-file
> "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))))))

This unfortunately also gives me “invalid field specifier”.

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊

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

* Re: GRUB theming - background
  2020-04-07 17:58   ` 白い熊
@ 2020-04-07 19:18     ` Tobias Geerinckx-Rice
  2020-04-07 20:06       ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-04-07 19:18 UTC (permalink / raw)
  To: help-guix

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

白い熊,

白い熊 写道:
>> (grub-theme
>> (inherit %default-theme)
>> (images
>> (list (grub-image
>> (aspect-ratio 4/3) ; or 16/9, &c., to match…
>> (file (local-file
>> "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))))))
>
> This unfortunately also gives me “invalid field specifier”.

OK, can you be more specific?  ‘Invalid field specifier’ on its 
own doesn't tell us anything.

I pasted my previous example into my own system.scm and it built 
fine:

(operating-system
 …
 (bootloader (bootloader-configuration
              (bootloader grub-efi-bootloader)
              (target "/boot/efi")
              (theme (grub-theme
                      ;; This probably makes little sense in 
                      practice,
                      ;; unless your image suits the default 
                      colours:
                      (inherit %default-theme)
                      (images (list (grub-image
                                     (aspect-ratio 4/3)
                                     (file (local-file 
                                     "/home/…")))))))
              (timeout (seconds 1)))
 …)

What does your operating-system's (bootloader …) field look like, 
and what did Guix actually say?

Kind regards,

T G-R

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

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

* Re: GRUB theming - background
  2020-04-07 19:18     ` Tobias Geerinckx-Rice
@ 2020-04-07 20:06       ` 白い熊
  2020-04-09 15:08         ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-04-07 20:06 UTC (permalink / raw)
  To: GNU Guix help

Apr 7, 2020 21:18:36 Tobias Geerinckx-Rice <me@tobias.gr>:

> OK, can you be more specific? ‘Invalid field specifier’ on its own doesn't tell us anything.
>
> I pasted my previous example into my own system.scm and it built fine:
>
> (operating-system
> …
> (bootloader (bootloader-configuration
> (bootloader grub-efi-bootloader)
> (target "/boot/efi")
> (theme (grub-theme
> ;; This probably makes little sense in practice,
> ;; unless your image suits the default colours:
> (inherit %default-theme)
> (images (list (grub-image
> (aspect-ratio 4/3)
> (file (local-file "/home/…")))))))
> (timeout (seconds 1)))
> …)
>
> What does your operating-system's (bootloader …) field look like, and what did Guix actually say?

I'm sorry, Tobias, I was mistaken — I thought it had to go in the “(grub-configuration” section under “(bootloader”. Thanks for posting your config — I saw the mistake.

Anyhow, now “system reconfigure” still won't finish.

With the bootloader section like:

(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))

… it reconfigures fine.

If I change to:

(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")
(theme (grub-theme
(inherit %default-theme)
(images (list (grub-image
(aspect-ratio 4/3) ; or 16/9, &c., to match…
(file (local-file "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")))))))))

… the reconfigure fails with:

substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/sn21yqw850b1kwlqkph9pkzl5wkdhcb7-system.drv
/gnu/store/m5rlvm9c15k0z89yk3af2786kfpwm07g-provenance.drv
/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv
/gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv
building /gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv...
\builder for `/gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv' failed with exit code 1
build of /gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv failed
View build log at '/var/log/guix/drvs/z2/b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv.bz2'.
cannot build derivation `/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv': 1 dependencies couldn't be built
guix system: error: build of `/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv' failed

The build log contains:

Backtrace:
2 (primitive-load "/gnu/store/8xhx6nv3dy9y1gkpn1884bwclvj?")
In gnu/build/svg.scm:
46:4 1 (svg->png "/gnu/store/srr4fpapz69jz4p5y0f8b81iyf8spsrj?" ?)
In unknown file:
0 (rsvg-handle-new-from-file "/gnu/store/srr4fpapz69jz4p5?")

ERROR: In procedure rsvg-handle-new-from-file:
Throw to key `rsvg-error' with args `("rsvg-handle-new-from-file" "" () ())'.

Thanks for helping. :@)

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊

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

* Re: GRUB theming - background
  2020-04-07 20:06       ` 白い熊
@ 2020-04-09 15:08         ` 白い熊
  2020-04-14 10:18           ` ison
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-04-09 15:08 UTC (permalink / raw)
  To: GNU Guix help

Apr 7, 2020 22:07:13 白い熊 <help-guix_gnu.org@sumou.com>:

> ERROR: In procedure rsvg-handle-new-from-file:
> Throw to key `rsvg-error' with args `("rsvg-handle-new-from-file" "" () ())'.

Tobias, I've inspected the error and done some digging - I've tried to reconfigure using a PNG file just to be safe - it's all the same.

Anyhow, based on my latest fail log, I get:

===
Backtrace:
2 (primitive-load "/gnu/store/a85xz515j3dak1w89nz1gndnd19?")
In gnu/build/svg.scm:
46:4 1 (svg->png "/gnu/store/zbrpy072h2bw66d2qpczz9ki26vb9saj?" ?)
In unknown file:
0 (rsvg-handle-new-from-file "/gnu/store/zbrpy072h2bw66d2?")

ERROR: In procedure rsvg-handle-new-from-file:
Throw to key `rsvg-error' with args `("rsvg-handle-new-from-file" "" () ())'.
===

So, inspecting the above, I see:

~ $ ls -l /gnu/store/zbrpy072h2bw66d2*
-r--r--r-- 2 root root 418689 1970-01-01 1970 /gnu/store/zbrpy072h2bw66d2qpczz9ki26vb9saj-gnu-grub.png
~ $ ls -l /gnu/store/a85xz515j3dak1w89nz1gndnd19*
-r--r--r-- 2 root root 160 1970-01-01 1970 /gnu/store/a85xz515j3dak1w89nz1gndnd1989mj7-grub-image.png-builder
~ $ cat /gnu/store/a85xz515j3dak1w89nz1gndnd1989mj7-grub-image.png-builder
(begin (use-modules (gnu build svg)) (svg->png "/gnu/store/zbrpy072h2bw66d2qpczz9ki26vb9saj-gnu-grub.png" ((@ (guile) getenv) "out") #:width 1024 #:height 768))


The image is the converted image, I checked.

So, why the rsvg-error here? Why is it failing?


-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊

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

* Re: GRUB theming - background
  2020-04-09 15:08         ` 白い熊
@ 2020-04-14 10:18           ` ison
  2020-04-16 16:06             ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: ison @ 2020-04-14 10:18 UTC (permalink / raw)
  To: 白い熊; +Cc: help-guix

I got the same error until changing to an SVG type image, then it worked.
I just converted from a PNG using inkscape.

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

* Re: GRUB theming - background
  2020-04-14 10:18           ` ison
@ 2020-04-16 16:06             ` 白い熊
  2020-09-12 14:53               ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-04-16 16:06 UTC (permalink / raw)
  To: GNU Guix help

Apr 14, 2020 12:19:27 ison <ison@airmail.cc>:

> I got the same error until changing to an SVG type image, then it worked.
> I just converted from a PNG using inkscape.

Indeed, it works with SVG :@)

Many thanks for pointing it out.

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊

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

* Re: GRUB theming - background
  2020-04-16 16:06             ` 白い熊
@ 2020-09-12 14:53               ` 白い熊
  2020-09-14 21:27                 ` Joshua Branson
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-09-12 14:53 UTC (permalink / raw)
  To: help-guix


Apr 16, 2020 6:06:04 PM 白い熊 <help-guix_gnu.org@sumou.com>:

> Apr 14, 2020 12:19:27 ison <ison@airmail.cc>:
> 
>> I got the same error until changing to an SVG type image, then it worked.
>> I just converted from a PNG using inkscape.
>> 
> Indeed, it works with SVG :@)
> 
> Many thanks for pointing it out.
> 
With the latest d. Guix pull I now get a failure on system reconfigure:

/home/shiroikuma/system.scm:48:22: error: (grub-theme (inherit %default-theme) (images (list (grub-image (aspect-ratio 4/3) (file (local-file "/home/shiroikuma/grub.svg")))))): extraneous field initializers (images)

How to resolve this?
-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen

白い熊



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

* Re: GRUB theming - background
  2020-09-12 14:53               ` 白い熊
@ 2020-09-14 21:27                 ` Joshua Branson
  2020-09-15  5:39                   ` 白い熊
  0 siblings, 1 reply; 13+ messages in thread
From: Joshua Branson @ 2020-09-14 21:27 UTC (permalink / raw)
  To: 白い熊; +Cc: help-guix


I'm not certain how to resolve the error, but that is a syntax error.
Your error message is saying "Hey pal!  You code is almost working, but
you have a syntax error around your (images ...)  code."

Is "images" the proper syntax?

Also, it's also very helpful when you paste your code along with the
error message.  That can help people better assist you.  Good luck!  :)

-- 
Joshua Branson
Sent from Emacs and Gnus


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

* Re: GRUB theming - background
  2020-09-14 21:27                 ` Joshua Branson
@ 2020-09-15  5:39                   ` 白い熊
  2020-09-15 17:07                     ` Joshua Branson
  0 siblings, 1 reply; 13+ messages in thread
From: 白い熊 @ 2020-09-15  5:39 UTC (permalink / raw)
  To: help-guix

I'm using the code proposed in the beginning of this thread, namely:

(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")
(theme (grub-theme
(inherit %default-theme)
(images (list (grub-image
(aspect-ratio 4/3) ; or 16/9, &c., to match…
(file (local-file "/home/shiroikuma/0/pictures/grub/gnu-grub.svg"))))))))

And it was working before the latest Guix git pull — it reconfigured the system and themed Grub. Now it gives the error mentioned.
-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen

白い熊

Sep 14, 2020 11:27:29 PM Joshua Branson <jbranso@dismail.de>:

> I'm not certain how to resolve the error, but that is a syntax error.
> Your error message is saying "Hey pal!  You code is almost working, but
> you have a syntax error around your (images ...)  code."
> 
> Is "images" the proper syntax?
> 
> Also, it's also very helpful when you paste your code along with the
> error message.  That can help people better assist you.  Good luck!  :)
> 


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

* Re: GRUB theming - background
@ 2020-09-15  6:13 Stefan
  0 siblings, 0 replies; 13+ messages in thread
From: Stefan @ 2020-09-15  6:13 UTC (permalink / raw)
  To: help-guix_gnu.org; +Cc: help-guix

Hi 白い熊!

The handling of background images for GRUB got improved. Now PNG files are supported, too.

Change your code to something like this:

(theme (grub-theme (resolution '(1920 . 1080))
                   (image (local-file "/home/shiroikuma/0/pictures/grub/gnu-grub.png")))


Bye

Stefan




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

* Re: GRUB theming - background
  2020-09-15  5:39                   ` 白い熊
@ 2020-09-15 17:07                     ` Joshua Branson
  0 siblings, 0 replies; 13+ messages in thread
From: Joshua Branson @ 2020-09-15 17:07 UTC (permalink / raw)
  To: 白い熊; +Cc: help-guix


Sometimes the API can change. I saw this code in the thread today:

(theme (grub-theme (resolution '(1920 . 1080))
                   (image (local-file "/home/shiroikuma/0/pictures/grub/gnu-grub.png")))


Notice that it uses "image" and not "images".  I don't know if that is
the fix...I am just pointing that out.

-- 
Joshua Branson
Sent from Emacs and Gnus


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

end of thread, other threads:[~2020-09-15 17:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 16:48 GRUB theming - background 白い熊
2020-04-07 17:39 ` Tobias Geerinckx-Rice
2020-04-07 17:58   ` 白い熊
2020-04-07 19:18     ` Tobias Geerinckx-Rice
2020-04-07 20:06       ` 白い熊
2020-04-09 15:08         ` 白い熊
2020-04-14 10:18           ` ison
2020-04-16 16:06             ` 白い熊
2020-09-12 14:53               ` 白い熊
2020-09-14 21:27                 ` Joshua Branson
2020-09-15  5:39                   ` 白い熊
2020-09-15 17:07                     ` Joshua Branson
  -- strict thread matches above, loose matches on Subject: below --
2020-09-15  6:13 Stefan

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