Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.
share|improve this question
add comment

4 Answers

up vote 11 down vote accepted

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.

share|improve this answer
    
Nice answer, thank you. Didn't realise it was quite so immature at the moment :/ –  Hamish Downer Oct 19 '11 at 18:34
1  
Yeah it is quite rough around the edges. To follow progress on getting it into ubuntu repos: Webkit Greeter is not in Ubuntu Oneiric repos –  Niel Thiart Oct 20 '11 at 8:27
add comment

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.

enter image description here

share|improve this answer
    
I was hoping for an HTML file to edit, so I could add text - I'll edit the question so it is clearer. –  Hamish Downer Oct 19 '11 at 8:51
add comment

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

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....

share|improve this answer
    
I'd considered it, but at the time of asking the question I'd read lots of things about the HTML/CSS possibilities and wanted to find out what was involved. I may well go this route for now. –  Hamish Downer Oct 25 '11 at 11:38
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.