Bug 19292

Summary: Default grub2-theme, plymouth, sddm and ksplash backgrounds should all match at correct aspect ratio
Product: Mageia Reporter: Barry Jackson <zen25000>
Component: RPM PackagesAssignee: Donald <watersnowrock>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: jyri2000, watersnowrock
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: mageia-theme CVE:
Status comment:
Attachments: patch
proposed change to theme to use default.png rather than default.jpg
sddm patch
mageia-plasma5-config patch
themes diff

Description Barry Jackson 2016-09-04 00:57:46 CEST
Description of problem:
I have changed the way grub2 handles the background image file so that irrespective of theme used, the background image is has a fixed name and path.

This should allow mga-bg-res to easily copy a replacement background on first boot that has the correct aspect ratio for the system.

The attached patch for mga-bg-res should do this.







Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Barry Jackson 2016-09-04 01:00:05 CEST
Created attachment 8386 [details]
patch

Patch that should work - partially tested by running mga-bg-res directly but not via the service.
Comment 2 Rémi Verschelde 2016-09-06 08:05:53 CEST
The patch looks good to me, can you commit it on git?

Keywords: (none) => PATCH
Assignee: bugsquad => atelier-bugs

Comment 3 Barry Jackson 2016-09-06 12:46:34 CEST
(In reply to Rémi Verschelde from comment #2)
> The patch looks good to me, can you commit it on git?

I'd rather someone else did it as I have never touched Mga git - not even sure I'd have rights.

Donald said he would look at it later this week when I mentioned it on Atelier ML.

It would be good if a similar addition for the Plymouth b/g could be added at the same time.

If you have a wide screen (that does not approximate to 4:3), did you notice any change in grub2 background after recent update of grub2? It should now be using the correct aspect ratio rather than a stretched 4:3. I can only test with 4:3 which is default.
Comment 4 Barry Jackson 2016-09-06 14:44:00 CEST
OK I did some reading and managed to push the change to git:

commit 6cfbce46434a36c0a053cd2960847c916291a8fb (HEAD -> master, origin/master, origin/HEAD)
Author: Barry Jackson <barjac@mageia.org>
Date:   Tue Sep 6 13:38:29 2016 +0100

    Copy background at correct aspect ratio as /boot/grub2/themes/grub2-mageia-default.png if themes dir exists
Comment 5 Barry Jackson 2016-09-08 00:27:01 CEST
Created attachment 8392 [details]
proposed change to theme to use default.png rather than default.jpg

@remi
I tested plymouth with background.jpg linked to default.jpg and it did not work. so I propose that we change to .png throughout, whilst keeping the default.jpg link and image files for now in case something uses it that we have forgotten/didn't know about.

This patch is my first draft of a move from default.jpg to default.png in mga-bg-res.sh.

It also removes Mageia-Default/plymouth/background.png and replaces it with a symlink to default.png. I don't find any reference to background.png in the plymouth sources anywhere, only in mga git.

WDYT?
Barry Jackson 2016-09-08 00:31:43 CEST

Summary: Change mga-bg-res to copy default b/g at correct res to /boot/grub2/themes/ => Make grub2-theme*, plymouth and ksplash backgrounds match at correct aspect ratio for a system

Comment 6 Rémi Verschelde 2016-09-08 07:37:04 CEST
(In reply to Barry Jackson from comment #5)
> Created attachment 8392 [details]
> proposed change to theme to use default.png rather than default.jpg
> 
> @remi
> I tested plymouth with background.jpg linked to default.jpg and it did not
> work.

You should have kept the name "background.*png*" and make it symlink to default.jpg. The filename plymouth looks for is likely hardcoded, but the format may not be that strict.

so I propose that we change to .png throughout, whilst keeping the
> default.jpg link and image files for now in case something uses it that we
> have forgotten/didn't know about.
> 
> This patch is my first draft of a move from default.jpg to default.png in
> mga-bg-res.sh.
> 
> It also removes Mageia-Default/plymouth/background.png and replaces it with
> a symlink to default.png. I don't find any reference to background.png in
> the plymouth sources anywhere, only in mga git.
> 
> WDYT?

I'd be for dropping the jpg from our package altogether, and only package the png files (+ a default.jpg that would link to default.png).
Barry Jackson 2016-09-08 18:02:16 CEST

Summary: Make grub2-theme*, plymouth and ksplash backgrounds match at correct aspect ratio for a system => Default grub2-theme, plymouth, sddm and ksplash backgrounds should all match at correct aspect ratio

Comment 7 Donald 2016-09-11 23:47:54 CEST
I'll get a Mageia system running tomorrow, needs to be UEFI, which is fine, if only my Bios would actually recognise and boot UEFI sticks...

I'll see what is needed to make Plymouth and co behave with png, shouldn't be too much work.

There's a fair few updates needed anyway so adding this won't be much work at all.

The one concern I have with switching to .png fully is icewm, no idea how intelligent it will be with that stuff.

Status: NEW => ASSIGNED
CC: (none) => watersnowrock
Assignee: atelier-bugs => watersnowrock

Comment 8 Barry Jackson 2016-09-12 18:23:23 CEST
Hi Donald,
I have all this working here with changes in mageia-theme, plymouth, sddm, and mageia-plasma5-config.

I'm not too hot with git, so I have not pushed my local changes or committed any of the changes to the other packages yet.

It would be good if you could look at my efforts so far before putting any work into it, but I am hesitant to commit my changes. WDYT?

The only issue that I have left to fix is the plymouth background on first boot which is missing (just plain light blue which looks OK but not ideal) - second boot is fine after mga-bg-res has run.

My changes in brief are:
1. Switch all jpg in mga-bg-res to png and create default.png also create default.jpg link pointing to default.png.

2 Remove all jpgs from backgrounds in git by not creating or installing them in Makefile.

3. Remove background.png from plymouth in git.

4. Remove background.png from plymouth package and replace it with symlink to default.png.

5. Replace default.jpg symlink in sddm package and replace it with default.png

6. Replace background.png in mageia-plasma5-config-6.20160907.tar.xz and replace it with symlink to default.png.

I just can not figure out how mageia-theme generates the initial default.jpg on install that is there on first boot. I have spent hours and hours studying the spec and scripts but it eludes me :\

Here is a fresh Cauldron net-installed with the new packages available at install: http://mtf.no-ip.co.uk/pub/linux/barjac/video/mga6boot.mp4

It's OK in KDE, Gnome, Mate and I think I tried something else but I forget - it's been a long few days :\
Comment 9 Barry Jackson 2016-09-14 16:32:52 CEST
Freeze push requested for mageia-theme
Comment 10 Jüri Ivask 2016-09-15 11:01:21 CEST
After yesterday evening updates of mageia-theme-1.5.0.52-1.mga6 and mageia-theme-1.5.0.52-2.mga6 SDDM has now white background and Plasma Desktop lockscreen displays Plasma default background (Next) instead of Mageia one.

SDDM mga-coffee theme had background defined as: background=/usr/share/mga/backgrounds/default.jpg

Although that default.jpg is symlinked to default.png (which is symlinked to "real" background png file) such double symlinking seems not to work.

Editing mga-coffee theme theme.conf to: background=/usr/share/mga/backgrounds/default.png makes SDDM to display Mageia background correctly.

Also Plasma 5 lockscreen background, which was by default /usr/share/mga/backgrounds/default.jpg does not like that double symlinking and displays Next background instead. Setting it to /usr/share/mga/backgrounds/default.png makes lockscreen to display Mageia background as it should be.

CC: (none) => jyri2000

Comment 11 Barry Jackson 2016-09-15 11:23:36 CEST
(In reply to Jüri Ivask from comment #10)
> After yesterday evening updates of mageia-theme-1.5.0.52-1.mga6 and
> mageia-theme-1.5.0.52-2.mga6 SDDM has now white background and Plasma
> Desktop lockscreen displays Plasma default background (Next) instead of
> Mageia one.

Yes this was expected until all the changes are completed.

> 
> SDDM mga-coffee theme had background defined as:
> background=/usr/share/mga/backgrounds/default.jpg
> 
> Although that default.jpg is symlinked to default.png (which is symlinked to
> "real" background png file) such double symlinking seems not to work.
> 

Yes, this will be linked directly to default.png now that default.png exists, which was not the case until yesterday.

> Editing mga-coffee theme theme.conf to:
> background=/usr/share/mga/backgrounds/default.png makes SDDM to display
> Mageia background correctly.
> 

Correct

> Also Plasma 5 lockscreen background, which was by default
> /usr/share/mga/backgrounds/default.jpg does not like that double symlinking
> and displays Next background instead. Setting it to
> /usr/share/mga/backgrounds/default.png makes lockscreen to display Mageia
> background as it should be.

Again, this is work in progress.
Comment 12 Donald 2016-09-15 11:38:44 CEST
If no one beats me to it, I'll fix sddm and plasma-config today
Comment 13 Barry Jackson 2016-09-15 13:52:07 CEST
(In reply to Donald from comment #12)
> If no one beats me to it, I'll fix sddm and plasma-config today

OK that's great.
I have working versions and will attach svn and git diffs which may be of use.
You are certainly more conversant with git than I so I would rather you made the changes.
Comment 14 Barry Jackson 2016-09-15 13:55:52 CEST
Created attachment 8413 [details]
sddm patch
Comment 15 Barry Jackson 2016-09-15 13:57:55 CEST
Created attachment 8414 [details]
mageia-plasma5-config patch
Comment 16 Barry Jackson 2016-09-15 14:01:11 CEST
Created attachment 8415 [details]
themes diff
Comment 17 Barry Jackson 2016-09-15 14:38:15 CEST
Above is of course Software/Plasma5/config not themes, and it only shows deletion of /usr/share/plasma/look-and-feel/org.mageia.breeze.desktop/contents/splash/images/background.png in the details view for some reason.

sddm-14 has only been pushed to testing so far BTW.

Barry
Comment 18 Donald 2016-09-15 15:42:13 CEST
It my as well get pushed to release if it has the fix. I need to clean up the side themes so that will be a whole new release to start with.
Comment 19 Barry Jackson 2016-09-15 17:29:20 CEST
I did not commit anything to svn for sddm or mageia-plasma5-config or to git for these.
I can later (as in the attached diffs) if you wish.
Comment 20 Barry Jackson 2016-09-15 17:37:31 CEST
To clarify,

I originally worked on this bug with sddm-13.x.x and recently noticed sddm-14 was in svn.

I queried with neoclust whether it would be OK to push it to core when we/you had done the changes. He told me it had been only pushed to testing so far by him and that theme needed work.

I have tested the above changes on a build of sddm-14 locally, but none of the changes have been committed anywhere yet by me.
Comment 21 Barry Jackson 2016-09-25 18:06:51 CEST
All necessary changes have now been committed and tested and for me this is now resolved.

Closing as fixed.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED