Wednesday, September 9, 2009

Hack Karmic's GDM Login Screen

gdm_user_list

One of my favorite things about Linux is the ability to customize everything. The Gnome Display Manager (GDM) is an excellent example. A quick look at gnome-look.org illustrates the diversity and choice Linux users have for a screen they might only see for 5 seconds.

Changing your GDM was once a simple processes with an excellent GUI behind it. With Ubuntu 9.10 Karmic Koala the GDM has been rewritten to properly take advantage of xsplash, Ubuntu's new X based boot. While these changes will significantly improve boot time, customizable GDMs are going to suffer. Ubuntu developers have already stated that a level of customization once offered with the old GDM will not be available for Karmic.

Until then we can hack the GDM to change the background, theme, fonts and some minor features. While not as robust as before, it's better then the ugly brown sand option that Karmic testers are stuck with.

LoginWindow
- This is th old GDM configuration screen. notice the options and themes you can choose from.

gdm-new
- This is the new GDM screen. Not many options.

1. Logout of your current session and return to the GDM
2. Switch to the tty command line prompt using Ctrl-Alt-F1
3. Login using your normal login/password
4. at the command line prompt type: export DISPLAY=:0.0
5. then type: sudo -u gdm gnome-control-center
6. Switch back to the gdm screen using ALT-F7
7. The gnome-control-center should be loaded. Use it to configure your GDM.
8. Click on the Appearances icon, in appearances you can change your GDM's font, theme and background image.
9. Close the gnome-control-center and login normally.

For more GDM hacks check out part two of this article.


Have a question or problem that this article doesn't cover?
Ask our Ubuntu Mini 9 Google Group for help.

36 comments:

pconwell said...

Okay, dumb question. The Ubuntu team got rid of the old GDM to speed up boot, so if I bring back parts of the old GDM, will it slow down boot?

redDEAD said...

You're not bringing back anything form the old GDM.

If you change your GDM theme,it doesnt get slower. GDM has to load a background image, a theme and a font no matter what you do. All you are doing is pointing it at different files. Changing those three things will not slow down boot.

Johnathon Harmon said...

Every time i try this is says Gtk-WARNING **: cannot open display: :0.0

What sould i do that is just not working.

redDEAD said...

reboot and make sure you are at the tty prompt.

ba said...

Don't get the most important point #7: "use it to configure your gdm". But how? All I get is the "login screen" GUI in which I cannot configure the gdm screen effectively.

ba said...

Btw, I found some other instructions here:

http://ubuntuforums.org/showpost.php?p=7576112&postcount=365

Anonymous said...

Thanks for that, haven't got a netbook but I'm trying Karmic Alpha 6 & that not being able to use gdmsetup to change that default gdm screen was really annoying me...

Only thing you're missing I worked out by myself. If anyone wants to change the default gdm noise (that drum sample is getting old) open a terminal, &...

cd /usr/share/sounds/ubuntu/stereo

The sound it plays is system-ready.ogg, which is just a symbolic link to dialog-question.ogg, so find another ogg file you want, & (using button-toggle-off.ogg as an example)...

sudo rm system-ready.ogg

sudo ln -s button-toggle-off.ogg system-ready.ogg

If you have another ogg file & want to use that then just...

sudo ln -s /path/to/your.ogg system-ready.ogg

flimm said...

There's an easier way of doing this. Just replace Human and HighContrastInverse with the theme names of your choice. Enter these commands into any terminal:

sudo -u gdm gconftool-2 -t string -s /apps/metacity/general/theme Human
sudo -u gdm gconftool-2 -t string -s /desktop/gnome/interface/gtk_theme Human
sudo -u gdm gconftool-2 -t string -s /desktop/gnome/interface/icon_theme HighContrastInverse

Anonymous said...

I don't get it. Your howto is nice but it only makes it possible to change the theme aka the appearance like the colors. You can not chose another GDM theme with this way or am I wrong?

Antunes said...

If you check the web, they say that this might not even be possible in karmic. The old gdm themes will probly not work.

redDEAD said...

No more being able to change the gdm in Karmic. This guide/KArmic only allows you to change the icons, background and font.

Anonymous said...

@Antunes & redDEAD

I see, thank you. Is it still somehow possible to change the user listing so that everyone needs to enter their username by hand?

thanks

Vantrax said...

you need to edit via gconf-editor through /apps/gdm/simple-greeter/disable_user_list true

rfurgy said...

Ok, as far as I can tell, so far there is no easy way to change your login screen for Ubuntu 9.10. But I was able to change the background for the login screen manually.

The JPG files used for the login screen are located in /usr/share/images/xsplash

I did the following to change my login screen background:

1) Created a folder called 'login.screen' in my home folder, then another folder inside that named originals and copied the originals into it.

2) Find a desktop background/wallpaper (or any JPG you might want to use) and
copy it into the first folder you created (in my case the 'login.screen' folder)

3) Open the JPG you would like to use with GIMP and use the IMAGE > SCALE IMAGE to scale it to each respective size while using the FILE > SAVE AS and naming them after the originals (example bg_800x600.jpg).

4) Once I had my replacements, I logged into root in Terminal and changed to the directory where they where. The dir command can be used to make sure you are there.

5) Now in the folder with the replacements, I used the following command to move them into the folder where the login screen will look for them:
mv (file name) /usr/share/images/xsplash

That while logged in as root will move the file you designated in the command to that folder and overwrite the images you didn't have permission for.

I know it's kind of a long way to do it but it works for now. To speed things up you can use the up arrow key in Terminal to pick previously typed commands. So I used that to quickly re-enter the command and then just changed the file name till I had them all moved.

POW! On a reboot you will see a much different login screen. Hope this helps ;P

Anonymous said...

How about hacking 2.28 and 2.26-1 gnome gdm together? :)

Brandon said...

If you correctly followed the steps 1-6 after you had switched back to the GDM screen you be able to edit it under Appearances like it says and treat it like a desktop theme. but keep the taskbar simple I find it only loads the img part under the shutdown menu's icon. Noticeable changes include basic color change, mouse, text, fonts, and of course Background. Not as customizable as the OLD gdm from jaunty and back but at least its something until a proper editor is released.

Diego said...

Thanks a lot for this... I was really bored about that, now I just have to delete those annoying sounds files and I'm done.

Thanks again!!!

Shadow said...

Great hack ! Thanks a lot. It was disappointing the lack of options in karmic's System->Administration->Login Screen

About rfurgy tip, it is a pretty cool hack too. You can use the "-r" option in mv command to move the entire directory though. It avoids the tedious "use the up arrow key in Terminal to pick previously typed commands" since it will replace all files at once !

Airencracken said...

I hope that there will be more options for customization in the future. This is a very Apple-ish move and I dislike the regression.

Anonymous said...

It's unbelievable that Ubuntu has done this. For the sake of a few milliseconds boot time they have permanetly plastered my usernames on the login screen and removed my ability to customize it to my needs. This is akin to something that M$ would do. They are catering to a small grp of e-peen fanatics worried about a quicker boot time to the detriment of 99% of their user base who don't give a damn about a second or two at boot. On top of this they have COMPROMISED THE BASIC SECURITY OF THE SYSTEM BY GIVING AWAY HALF THE LOGIN INFORMATION. STUPID! STUPID!! STUPID!!! This has prompted me to start looking for another distro.

Vantrax said...

Just so you know anonymous.... this is the default setting of the new rewrite of Gnome.

Every distro will be using it. Ubuntu is just the first to hit a release cycle after the release.

aaaa said...

OK, so I changed the login background. But after pressing Return to actually log in, I get the ugly brown-black background image again. It seems to be some kind of login splash screen showing a progress bar.

And before showing the actual login window this splash screen with the running progress bar is shown too.

Any idea how to completely get rid of this ugly brown image?

Anonymous said...

Setting /apps/gdm/simple-greeter/disable_user_list to true in gconf-editor does not work. I tried it on two pc's but in both cases I got the list with users again.

Icewalker said...

Anonymous is correct. Part of security is hiding as much as you can. Giving away login information is foolish. And the new Gnome GDM is definitely a regression. I also agree with the statement about a few seconds of boot time saved. Since I'm running linux, I don't have to reboot all the bloody time and thus, I am up and running 24x7 anyway.

This move is definitely very Apple-ish on Gnome's part. Gnome used to be very very configurable years ago but as time goes back, less and less options are made available. This truly saddens me!

Anonymous said...

Like many companies gnome forgot what got them to there current status. They are removing the very reason people one peace at a time.

Anonymous said...

I agree with some people here, I do not understand why they stick to milliseconds instead of users.... is this a philosophy of linux developers? I mean, this login screen is u g l y and cannot be changed for the sake of what... one or two seconds?

ahhh, by the way, if there is a command of one or two lines, and a graphic option to do the same task, sorry buds, but I will stick to the graphic option, since the command lines will be harder to remember when I do not have them written somewhere.

ibbleismyword said...

Thanks a bunch for the tip. I despised the new screen. If they're going to get rid of our ability to customize the login screen, they at least could have picked a good looking screen.
Has anyone figured out how to get rid of the brown loading bar yet? aaaa asked this question about a month ago, and I don't see any replies.

ibbleismyword said...

Ha! I found out how to replace the brown loading screen. The post is here:

http://ubuntuforums.org/archive/index.php/t-1337381.html

Basically, you replace the image /usr/share/images/xsplash/bg_screenresolution.jpg with the image of your choice. See the above link for full instructions.

d0wn said...

Quicker way that I found from #ubuntu on Freenode: sudo dpkg-reconfigure gdm, then when it comes up, just choose gdm instead of kdm.

Heber Maia said...

To change de ugly brown background go to /usr/share/images/xsplash.
Rename bg_2560x1600.jpg to bg_2560x1600.jpg.bkp
Paste the image you want like bg_2560x1600.jpg

Heber Maia said...

To change the ugly brown-black background image go to /usr/share/images/xsplash and rename the bg_2560x1600.jpg file to bg_2560x1600.jpg.bkp.
Now paste de image you want with the name bg_2560x1600.jpg
Be happy

Cliff Hammer said...

Sure would have been great if there was the simple option to change the login screen!
But,on the other hand, I'm just thankful there's a FREE system like this Ubuntu that "almost" conquers M$ in every way.

"THANKS" to all of you folks out there who have spent so much time and effort on Ubuntu and similar programs! :)

Reg said...

So I typed in the code, but now everytime I get to the login screen the appearance options pop up. How do i make this stop?

urmi said...

same problem as Reg,
how to stop the appearance box from coming up every time i go to the login page?

Nick said...

Thanks.
If accessing a VirtualBox VM over the Internet via vRDP. Initial rendering time of the login screen after removing the background image is now 3-4 seconds rather than over a minute.

Daniel N. said...

Anonymous its right, this is an stupidity, that GDM is no longer customizable.

Idiots, i'm going back to LinuxMint Isadora 9, who cares about 2 or 3 stupid seconds of booting in exchange for the beatiful previous GDM customization tool???

Sorry my english is not so good.