I want to be able to change the 'Incorrect Password' text to a different color in the lightdm login screen, but I can't figure out how. I'm using Ubuntu 16.04 LTS, Unity 7.4, and I have the following programs installed:

  • Default system settings
  • Unity tweak tool
  • Ubuntu tweaks
  • CCSM
  • dconf editor

I can't find an option to change the text color anywhere, so if someone could help me out that would be much appreciated :)

  • 2
    Which text are you talking about? Where and when does it appear? – Zanna May 3 '17 at 5:23
  • 1
    @Zanna I guess OP wants to change the one in unity-greeter of Lightdm login screen. But there is still little doubt. @ OP Please mention whether or not you're using the default login screen of Ubuntu – Anwar May 3 '17 at 11:47
  • 1
    @Anwar, yes I'm using the default login screen. My apologies for the confusion – cheesits456 May 3 '17 at 16:02
  • unity-greeter will be your login screen. check this code.launchpad.net/unity-greeter – sbharti May 15 '17 at 10:25
  • 1
    He sent you a link to the source code of the unity-greeter, so you can find the thing you want to change there, build it and deploy on your system. That's what I get out of his comment it at least. – Ziazis May 16 '17 at 9:35

You need to recompile unity-greeter for that. Here is how to do it.

Download the source

Download the unity-greeter package source for Xenial from (the one with .tar.xz extension) here https://launchpad.net/ubuntu/xenial/+source/unity-greeter and extract it into your home directory.

Change the source

Now open the file src/prompt-box.vala and go to the line no. 438 The relevant area of the source will be like this

        Gdk.RGBA color = { 1.0f, 1.0f, 1.0f, 1.0f };
        if (is_error)
            color.parse ("#df382c");
        label.override_color (Gtk.StateFlags.NORMAL, color);

Now change the hex value of the color to your desired value. I used #33A0FF to test it.


Now you need to recompile it. You may need development packages to do so. I needed these package to install libindicator-dev libido3-0.1-dev liblightdm-gobject-1-dev libindicator3-dev libunity-settings-daemon-dev unity-settings-daemon-dev

All dependency requirements can be fulfilled by installing these packages

sudo apt install autoconf-archive gir1.2-gdesktopenums-3.0 gir1.2-gnomedesktop-3.0 gir1.2-gtk-2.0 gir1.2-ido3-0.1 gir1.2-xkl-1.0 gnome-common gnome-desktop3-data gsettings-desktop-schemas-dev libcanberra-dev libcanberra0 libdbus-glib-1-dev libgnome-desktop-3-12 libgnome-desktop-3-dev libgtk2.0-dev libido3-0.1-dev libindicator-dev libindicator3-dev libindicator7 liblightdm-gobject-1-dev libtdb1 libunity-gtk3-parser0 libvorbisfile3 libxkbfile-dev libxklavier-dev sound-theme-freedesktop unity-gtk-module-common unity-gtk3-module unity-settings-daemon-dev xvfb

Now, go to the root of the extracted folder and use these commands sequentically to build


If first command complains about some missing packages or header files, you need to research which package may contain that header file. Usually the package name would be something starting with the lib prefix and ending with -dev suffix and contain the name of the file that was missing.

Once you successfully make the build, install it using

sudo make install

Now just login and see the effect!

Here is a screenshot after I modified the text color (taken using dm-tool)

lightdm unity greeter error color change

| improve this answer | |

Short of rebuilding lightdm, you can't change the 'Incorrect Password' text or its colour as lightdm uses hardcoded messages. Running

sudo -u lightdm dbus-launch gsettings list-keys com.canonical.unity-greeter

gives you the list of settings which you can change. GDM and MDM have themes which may support changing the colour of the alert.

| improve this answer | |
  • can you please edit answer to include the details of what GDM and MDM are and how to use them? – cheesits456 May 18 '17 at 6:23
  • GDM is the GNOME Display Manager whereas MDM is for Mint. I didn't add more info as I have very less experience with them. sudo apt-get install gdm installs gdm. Try this to see how you can add themes to gdm. – RecursiveCursive May 18 '17 at 6:32
  • ty - will try this – cheesits456 May 18 '17 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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