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.
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 inlp:~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)
bzr branch lp:lightdm-webkit-greeter
cd lightdm-webkit-greeter
bzr merge lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu-old
/autogen.sh (you'll have to install some dependencies here - probably only libwebkit-dev)
make
sudo make install
gksudo gedit /etc/lightdm/lightdm.conf
greeter-session=lightdm-webkit-greeter
(remember the old setting as a fallback if you can't log in with your new settings)gksudo gedit /etc/lightdm/lightdm-webkit-greeter.conf
webkit-theme=webkit
This should work to enable the default webkit login. Now you can edit the theme here:
Edit: Another warning - you can seemingly lock yourself out of gnome if this does not work.
Run this command
gksu gedit /etc/lightdm/unity-greeter.conf
You can edit any of the highlighted lines in the image. But, be sure of what you are doing.
Have you considered editing the background image to contain the text that you want displayed? This seems like the easiest way to achieve your objective....
Here is a sample of a custom lightdm-webkit-greeter based greeter : https://github.com/jfbrazeau/lightdm-webkit-pretty-greeter
It can be used as a start point to build your own greeter.
It explains how to install (or uninstall) it. The source code can freely be downloaded and modified.