Customize the Ubuntu 16.04 Login Screen

There are many reasons to customize any computer’s login screen, from fun/”leetness” to corporate branding and legal notices. However, it is notoriously difficult to find a painless way to do it on modern Ubuntu. You’ll find sites with irrelevant advice for older versions, sites that tell you to install this or that package, dead end forums, and other no-funs. BUT you won’t have to go through all that. I was able to find the perfect a way for you to easily customize your Ubuntu 16.04 login screen.

This way I’m about to show you is not exactly a walk in the park either (especially if you’re not comfortable with the command line), and some may call it a “hack”. But, it is definitely the quickest and most direct way I’ve found to do it. We can do it in 3 simple(ish) steps.

The Plan

Working from a fresh install of Ubuntu 16.04 with all the standard defaults, we are simply going to 1) edit a configuration file, 2) compile it, and 3) logout of Ubuntu to immediately see the results.

Let’s get to it:

Step 0: Make a backup copy of the config file
(do yourself a favor and don’t skip this step)

I know, I said 3 steps. I shoved this in as step 0 because best practices. Here, we are moving into the directory and renaming the .xml file to .xml.orig.
Note: You’ll need superuser privileges (sudo) for this and the other commands.

cd /usr/share/glib-2.0/schemas/
sudo cp com.canonical.unity-greeter.gschema.xml com.canonical.unity-greeter.gschema.xml.orig

Ok, now on to the good stuff:

Step 1: Edit the config file (CAREFULLY)

Use your editor of choice to open the config file.

sudo vi /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml

If you see something like this, you are good to go: Screenshot of default greeter config file

Take a minute to get familiar with the file, then edit carefully (watch those quotes and double-check your file paths/names). Here are some things you might be interested in playing with:

  1. Background Image See line 4 and set “background” to a path of your choosing (original image size: 4096x2304px). NOTE: It looks like pure ‘banner text’ is a no-go. So I inserted my legalese/warning text into this background image (peek at the before/after screenshots down below to see what I mean).

  2. Draw User Backgrounds See line 12 (‘draw-user-backgrounds’). Set this to false so individual user profile wallpapers don’t take precedence over yours.

  3. Draw Grid See line 16 (‘draw-grid’). Up to you, but I set this to false too. If you look at a standard Ubuntu 16.04 login screen, ‘draw-grid’ makes the overlay of little dots (again, see screenshot down below).

  4. Logo See line 24 (‘logo’). This is an image that will be in the bottom left corner by default. It’s currently where it says “Ubuntu 16.04” (original image size 245x43px)

  5. Background Logo See line 28 (‘background-logo’). This image is placed in the center of the screen when you have multiple monitors. (original image size 66x66px)

  6. Font See line 40 (‘font-name). Currently set to ‘Ubuntu 11’. Tip: Open gedit and go into the Edit->Preferences->Font&Colors to get more. I tried ‘Monospace Regular 11’, but no luck. Let me know if you find one that works for you. Shoot me a tweet @ZacharyKeeton

Tip: There are several other useful options. For example, you can choose to hide the hostname and the other ‘indicators’ in the top menu bar. Check them out. If you look at my customized login screen below, you’ll see I removed everything from my top menu bar.

Step 2: Compile the config file

Once you have everything set to your liking, save and close. Then, run the following command to compile and cache the new config file (finding this was my happy-dance moment after plenty of web searching pain. Found it here:

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Step 3: Logout (with fingers crossed)

Now you should be able to logout and see the results. If not, repeat steps 2 and 3 as necessary. You probably have a bad path/filename or some other typo.

Mine went from this:

Screenshot of default Ubuntu 16.04 login screen

To this:

Screenshot of customized Ubuntu 16.04 login screen

Disclaimer: NOT a real root9B screen. The scary warning is just random filler/sample text.

Again, it looks like pure ‘banner text’ is a no-go without a lot of extra pain. So I inserted my legalese/warning text into this background image (yes, I had to wake up The GIMP).

And after I log in, it still looks like this:

Screenshot of a normal Ubuntu 16.04 desktop

Step 4: DRINK!

Happy customizing! Send comments to @ZacharyKeeton or reach out through some of the other links below.

Written on January 3, 2017