Customizing login picture background

In the login there is a picture of a person (head plus upper body in gray).
Do you know how to change this picture or rather where its is located or rather how to change its background? Or is there a possibility to delete the picture?
It seems to be that it is not root.face.icon what is located in /usr/share/sddm/faces.

thanks to this topic

I know now how to change the image, what should be not bigger than 256x256.
But there is still a small border around the image.
How can I change the background of that border or rather the background of the user name or rather the background of the password field?

This is likely from the PNG file itself, likely due to transparency issues.

Feel free to upload your icon if you’d like us to confirm.

this is my login screen:


You can see the white border around the picture, and the white background behind the user name and behind the password field.

Oh. You have to dig into the theme CSS for that.

1 Like

Oh. You have to dig into the theme CSS for that.

Where do I find the theme CSS?

Well, it’s QML not CSS to be fair. Default should be /usr/share/sddm/themes/lubuntu/Main.qml. Theme docs are here though they are sparse. tl;dr, you’ll have to hunt and experiment. :slight_smile:

1 Like

I changed in Main.qml all colors I found, and I controlled the login screen;
some color changed, but the white space around the picture is still there, like the picture above;
I even added in Background a color and I added in PictureBox a color;
but no chance; there must be a trick; I can program CSS but not QML;
it must be just a small setting; but unfortunately I don’t know where

It took me quite a while to unravel what’s happening here but I think I finally figured it out. Unfortunately the end result is that some very heavy lifting needs to be done.

So the piece that really is background for individual users is the PictureBox. The problem is that, as you discovered, it doesn’t have a color property. You may notice at the top of the Main.qml file the line import SddmComponents 2.0. That’s actually importing some QML from the SDDM project itself that’s installed at /usr/lib/x86_64-linux-gnu/qt5/qml/SddmComponents/PictureBox.qml. That includes a Rectangle with id: canvas with a hardcoded color that is ultimately the background. Change the color there and all is well. But you probably don’t want to make a change to something that may similarly be imported by other QML files.

So what’s the solution? Well, if you look at themes like Deepin’s or Clairvoyance, you won’t find a PictureBox anywhere. Instead, they fully implement their own solutions for displaying the whole login information.

I really like that both of them break down the pieces of the layout into separate QML files, making everything far more reasonable. If you wanted to refactor the default theme in addition to making a new one, I wouldn’t complain :wink:

2 Likes

thank you for your help;
indeed if I change the color of id: canvas, then there is no white border any more;
I tried to put the Rectangle with canvas in Main.qml, but it did not work (in CSS it would work);
I don’t know how to program qml, but what about the idea, if I contact the author by email to ask him, if he can make for Lubuntu 21.04 a Main.qml with more options, like background-color around the picture and the border-line-color around the picture and the password?
Or is that not a good idea?

The Lubuntu SDDM theme derives almost directly from the default one that ships with upstream SDDM. In other words, SDDM themselves are the developers. Regardless of what changes were made by the Lubuntu Team, that troublesome PictureBox type created by SDDM remains.

I don’t think that the Lubuntu folks are going to be of much help given that we’ve done little more than maintain it since it was created by Lubuntu co-founder Julien Lavergne in 2015 (this is a rare case where it’s NOT @tsimonq2’s fault). The last big change was my addition of a suspend button.

I don’t know what SDDM’s feelings are about themes but I have a suspicion they aren’t interested in creating or maintaining much beyond what they offer. I’m surprised that despite the existence of 145 SDDM themes on GitHub and several more on GitLab, there seems to be no effort on their part to combine efforts. I certainly don’t think they’d be into making a custom theme for a distro.

So the solutions are figuring out how to repair the one we have, building off of the work of someone else, or starting anew. Since the last is going to take the most work and the first has already proven rather problematic, perhaps the middle option is the best idea. To that end, SDDM also provides three other themes which are available as separate packages which do not use the PictureBox. I’m not sure if they’re going to be better or worse, but that would be a good place to start.

If I’m perfectly honest, I’m rather annoyed by the state our theme is in. It’s clearly unmaintainable and that’s unacceptable. I’m really trying hard to resist the urge to fix it myself, as I would likely start from scratch and that would take me away from other things that really desperately need to be done.

So again, if you’d like to help out, I would be absolutely ecstatic. You could literally improve the experience for every Lubuntu user, not to mention helping out Lubuntu Developers.

If that’s something you’d be interested in, I would use these resources:

And, if not, I understand. Honestly, I appreciate you bringing all this up in the first place, as it at least illustrates the need to resolve this issue.

I’ve created a task on our Phabricator to track this issue with some of my thoughts on the subject. If you or anyone else would like to get to work on this, feel free to assign it to yourself. Naturally, any additional feedback is always helpful.

2 Likes