Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 22283  / 1 Year ago, sun, march 19, 2023, 8:12:41

LightDM is the new login manager, and is meant to be themeable using HTML and CSS. How do I do that in Ubuntu 11.10? Can I use my own HTML file with my own text?



Things I've tried:




  • I've spent a little while googling about and found nothing very useful so far, apart from how to change the background image.

  • There is a launchpad answer referencing a theme directory but no clue as to what should go in the theme directory. It appears there used to be a /usr/share/lightdm/themes directory, but it is not on my system.

  • I've spent a while looking but haven't found the files the current theme is in - if I could find that I could try copying and adapt it - I've done dpkg -L of both the lightdm and unity-greeter packages but not seen any HTML or CSS files.

  • I have found the LightDM Reference Manual but that appears to be an API reference, not a configuration guide.

  • I have tried browsing the LightDM code but can't find any sample HTML/CSS files.



Edit: To clarify I'd like to be able to edit an HTML file so I can add text to the login screen, not just change the fonts and background image. Sorry to @jokerdino who answered an unclear question.



Edit 2: Found a few more clues, but will have to play with them later.




  • I have found /usr/share/lightdm-gtk-greeter/greeter.ui which is part of the lightdm-gtk-greeter package. It is an XML file that looks a bit like the login screen, but I'm not familiar with how to edit that.

  • I have also found this sample HTML file which I can look at the source of (provided I don't let it time out - 5 seconds). It's linked to this javascript file which fakes lightdm for the web mockup. So maybe I can try putting a modified version of the HTML file in a directory and call that the theme directory ... But will have to try later - unless someone writes up some working instructions before then - hint, hint.


More From » 11.10

 Answers
7

Caution: Do not try this if you are not completely comfortable booting without X to repair lightdm configuration.



The package lightdm-webkit-greeter is not included in the ubuntu repository yet. To build your own greeter with HTML, CSS and Javascript, you'll have to download and install the lightdm-webkit-greeter code from Launchpad (lp:lightdm-webkit-greeter). I also merged in the changes in lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu-old



You'll then have to alter the Lightdm configuration to use the webkit greeter as opposed to unity (or whatever was default).



I believe there is a bug in the lightdm-webkit-greeter.conf file, where it refers to a webkit-theme called "default", that should be "webkit".



I currently use the webkit greeter to log in and can tell you that it is slow and unpolished at the moment.



Step by step:



(be prepared to fix the greeter configuration without a GUI if this fails)




  1. bzr branch lp:lightdm-webkit-greeter

  2. cd lightdm-webkit-greeter

  3. bzr merge lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu-old

  4. ./autogen.sh (you'll have to install some dependencies here - probably only libwebkit-dev)

  5. make

  6. sudo make install

  7. gksudo gedit /etc/lightdm/lightdm.conf

  8. Set greeter-session=lightdm-webkit-greeter (remember the old setting as a fallback if you can't log in with your new settings)

  9. gksudo gedit /etc/lightdm/lightdm-webkit-greeter.conf

  10. Set the webkit-theme=webkit



This should work to enable the default webkit login. Now you can edit the theme here:



gksudo gedit /usr/share/lightdm-webkit/themes/webkit/index.html


Edit: Another warning - you can seemingly lock yourself out of gnome if this does not work.


[#42793] Monday, March 20, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lowovey

Total Points: 287
Total Questions: 98
Total Answers: 117

Location: Bosnia and Herzegovina
Member since Thu, Jan 14, 2021
3 Years ago
;