Changing the Grub, Splash, and GDM +Lock screen color

I have been working on a CLI app to change the purple background of Ubuntu all the way from grub to the gdm login screen.

So far all I’ve been doing is patching the files replacing the color codes using python, regex and thecolorapi.com.

The files are:

/usr/share/gnome-shell/theme/ubuntu.css
/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth
/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.grub

The result is:

My plan was to implement support for the community-snap.

After requesting a classic snap I was made aware of “alternate” and started working on a solution which involved copying and patching the themes, then change them with alternate, which would be the more correct way of doing it.

However, this will be alot of work making sure the copies are always up to date with the current themes.

So that got me thinking… Is there a way Ubuntu can implement an import statement at the bottom of the Gnome CSS. With some restriction as to what is allowed…

I am thinking in the line of some sort of “tweak light” tool that lets you at least choose the background color of the boot / lock screen.

Would you be interested in this and do you think it is possible ?

6 Likes

Seems like a neat idea :slight_smile:

2 Likes

Nice idea.
We definitely are interesting in this - but foremost because of the plymouth theme. We can already change the GDM screen from within CSS :slight_smile:
When you installed the snap you still have the default ubuntu GDM theme. You can change this with the following (unsupported) command:

 sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /snap/communitheme/current/share/gnome-shell/theme/Communitheme/gnome-shell.css 15

Anyways, to which extend can the plymouth theme be changed?
I bet @madsrh would have some neat ideas. Also @eaglers had one somewhere in “that big” thread.

We can already change the GDM screen from within CSS

Yes, but the users “cant”? :). I want anyone to be able to choose what background color Ubuntu starts with. Or at least the idea is to make a small GUI app that lets you choose.
Mayby the CSS theme can look in example(“~/.gnome-css”) for an override CSS that can override some colors etc.

Anyways, to which extend can the plymouth theme be changed?

Everything… From the GRUB background color (or picture) to the splash logo/animation and color.

EDIT: When the snapcraft team implements the “alternate” interface adding a plymouth theme will be easy.

1 Like

I was playing with changing the plymouth / grub theme to match your Yaru theme the I realized you would have another problem snaping this:

1 Like

Hi,

I maybe have a project that interests you.

I have made a command line tool to change login background of Ubuntu GDM3 login screen. I also made a graphical user interface around the command line.

I have used standards methods for Ubuntu (update-alternatives) and freedesktop.org (polkit / pkexec) in this project. The command line does as little changes as possible to change background so it will not break anything.

The command line also include a revert command, to come back to default Ubuntu login css style.

I will later implement same standard command line tool for Fedora, as Fedora and Ubuntu is slightly different in handling the CSS for the login screen.

I have hosted the project here, where you will find a lot documentation:
https://gitlab.gnome.org/larsa/gdm3-background

3 Likes

Yes in deed, we practically wrote the same thing :slight_smile: :
https://github.com/izznogooood/yact/blob/master/yact/yact.py

I iced my project waiting for snap implementation of alternate.

Have a look at my code and come back to me.

What kind of implementation are you waiting for with alternate so it could be used to install your app?
Is it planned only with CLI or a GUI too?

There is also an ongoing discussion on gnome-shell to revamp the whole login experience, that might affect the project:
https://blogs.gnome.org/aday/2018/05/09/redesigning-the-lock-screen/

I wassnt just looking at changing the GDM screen but also the plymouth theme to match.
At the time I was only thinking about Ubuntu and I thought snap would be the easiest way of distributing the software. I was / am waiting for Snapcraft to implement a alternate hook:

Then I remembered you need root to update the grub color and it kind of fell apart.

I suggested a small GUI with some tweak options but got no response so it kind of died out.

To be honest if that concept becomes reality it would be better.

I have used Linux for 20 years not, but havent done much contributing to the community before. The gnome-shell folks seems totally uninterested in theming the login screen, while Ubuntu for now seems more welcoming to it.

I have searched at lot after the best way to just put a custom background image on the login screen (Gnome shell/Ubuntu), and all solutions are the same. Hack the gdm3.css file :slight_smile:

I can tell you that on Fedora it is a bit harder, you have to extract resources from a library and the recompile it :smiley:

My suggestion if we want to try help people customize Ubuntu login screen is to make a simple GUI our self. I haven’t yet checked how easy it is to get s snap on the app store, but i will anyway need to request for admin rights for the user to make changes.

For your code, I will suggest that you keep the gdm3.css untouched, and install your custom.css with update-alternatives.

You can look at my code here to see example (its just a bash script):
https://gitlab.gnome.org/larsa/gdm3-background/blob/master/bin/gdm3-background-update#L129

You can also check the gui by just installing a deb-package to see how the user interface work with requesting admin access (polkit). Sudo is not allowed in the future to start GUI programs.

If you are interested we could make a gui app togheter, and I can adept some of my code to your python-app with the fauture (example):

  • Two tabs
  • One for simple change background image or color
  • One for your idea with coloring every step the same
  • Try to release it on snap store (or what it is called) :smiley:

Sounds like a plan. I dont know C, but if I can stick to python I am all in :). You can contact me on telegram: @izznogooood or send me a pm here and we can set up a dev environment and get going.

I did think about copying and modifying the CSS but it means we would have to maintain it along with the original and or snap depending on what people have. We can talk more about this if we decide to move forward.

PS: I am pretty sure we are both from the same Country :slight_smile:

After i change picture source in /usr/share/gnome-shell/theme/ubuntu.css. After restart. my ubuntu login screen is black and stuck. Plz help me what can i do.

Boot from Live DVD and replace ubuntu.css

I agree with y’all that there needs to be an easier way to change the colors. It’s also reported in this issue. It would be great to have it in Ubuntu Settings, instead of having to open up Grub or install some other software just to change the login screen and the splash screen and general theme colors.