SWAT /

Ubuntu Login Customization

Reading

Outdoors

Games

Hobbies

LEGO

Food

Code

Events

Nook

sidebar

Ubuntu Login Customization

Ubuntu Login Screen Customization

This is all based around Ubuntu Maverick Meerkat 10.10, and whatever version of Gnome/GDM it's using, but should work on versions slightly plus/minus those.

Fairly recently, Gnome dumped its highly customizable GDM greeter (where you enter your passsword and such to login) in favor of a much stripped down, faster booting version. This instantly killed the very artsy and sophisticated login screens that were previously possible, e.g., with the user selection, password entry, and such all placed and styled to match the background artwork, themed loading animations, and so on.

On top of that huge buzzkill---I mean, load times are important and all, but sacrifices must be made in the name of art!---the change also made it a pain in the ass to do simple things like changing your login screen's background image. If you look around the Internet there's generally a lot of gnashing of teeth about this and unfortunate solutions like editing your GDM startup scripts to bring up the Appearance dialog, editing what you want, then dropping out and repairing your GDM startup scripts back to sanity. There are also programs around like ubuntu-tweak, startupmanager, and such that are supposed to re-enable this minimal level of GDM customization, but I have no idea---I haven't gotten them to work properly and actually give me those options, in several versions of Ubuntu. In any case it would be definitely unfortunate if a simple, standard customization like this required you to not only install and use some random GUI to do so, but required you to do so from a non-standard, unsupported repository. The dangerous wilds of Ubuntu package-land, as it were. It would also be unfortunate if forced to do so while trying to configure settings outside of a graphical user context.

Fortunately, you don't need sketchy programs to take care of this, you can do plenty fine on destroying your computer all on your lonesome, as follows.

Login Background Image

Here's a command that will set GDM's background image, where foo is the absolute filename of the PNG or similar you want to use:

  # sudo -u gdm gconftool --type string \
      --set /desktop/gnome/background/picture_filename foo

What's happening is simply that you're setting the background for the gdm user, not just the login screen. Fortunately though you never use that except to login, so it's pretty reasonable. This is the same thing the above-mentioned Appearance dialog hack does, but more elegantly. In particular, doing the Appearance hack would be very, very tedious to accomplish when working without being able to start GDM, but this command works just fine in that environment.

Note that you could perhaps find and directly edit the files storing the gconf values, but that's definitely widely frowned upon. Some things you should be scared of! Apparently...

Login Logo Image

Now, personally, while I think the 10.10 login background is the most hideous thing since the Romero easter egg in the end of Doom II, the new Ubuntu logo's fine. But it's got to go. Punishment for their appeasement of the GDM team's shenanigans.

The logo that appears above the hostname in the login dialog lives here:

  /usr/share/icons/LoginIcons/apps/64/computer.svg

You could just blow away that file to change the image, but if you're the sort of person that takes that kind of approach as anything but a last resort or when operating inside an extreme deadline-arriving type of context, then you should just go back to the copy of MicrosoftBob you were using until yesterday as your operating system of choice.

More cleanly, this is a command that will change the logo icon, where foo is the icon name (not a filename!) you want to use:

  # sudo -u gdm gconftool --type string \
      --set /apps/gdm/simple-greeter/logo_icon_name foo

A good example icon name (foo) is 'bash', the icon for which is a cute little terminal picture. Note that the greeter pulls its icons from the LoginIcons theme package, but that conveniently inherits from the standard Humanity package (and others), so you have a wide array of icons readily available. Look around inside /usr/share/icons/LoginIcons/ and /usr/share/icons/Humanity/ for others.

That said, if you want to add a new icon, simply add it into the LogicIcons folders, then either remove the MMAPable icon cache associated with the theme, or rebuild it. Fortunately this is easy. As an example:

  # cd /usr/share/icons/LoginIcons/apps/64
  # sudo cp /usr/share/icons/Humanity/categories/64/gnome-globe.svg mushi.svg
  # cd ../..
  # sudo gtk-update-icon-cache .
  # sudo -u gdm gconftool --type string \
      --set /apps/gdm/simple-greeter/logo_icon_name mushi

The gtk-update-icon-cache command should report "Cache file created successfully." When you log out, the red Ubuntu icon should now have become a very tasteful networked globe.

Conclusion

Other parameters exist for changing some of the greeter's settings, e.g., to set it to a different interface theme. If you're interested in that, play around with gconf-editor and look at the properties in /apps/gdm/simple-greeter. You could also change the general settings if you edit the gdm user's settings, i.e., run gconf-editor via gksudo -u gdm.

Recent Changes (All) | Edit SideBar Page last modified on October 22, 2010, at 06:46 PM Edit Page | Page History