How to change the screen resolution for the GDM login screen?

On newer systems, you will want to place your monitors.xml file into the gdm configuration directory, the resolution will be picked up there:

This, of course, assumes that you have gon into Settings > Displays, and have selected the resolution you want, click 'Apply', this will create a monitors.xml in .config of your home dir.

sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/monitors.xml

More details available at https://wiki.archlinux.org/index.php/GDM#Setup_default_monitor_settings


Gaurav has the right solution for Ubuntu 10.10 (use "Make Default" in System > Preferences > Monitors), however this requires a bit more work in Ubuntu 10.04 LTS. It also means your GDM will have the same resolution as your desktop's.

First find out which resolution your display can take and what its name is. In the following example my laptop display is LVDS-1 and its rated resolution is 1280x800:

$ xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       60.1 +
   1024x768       59.9* 
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 connected (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
TV-1 connected (normal left inverted right x axis y axis)
   720x576        50.0 +
   1024x768       50.0  
   800x600        50.0  
   720x480        50.0  
   640x480        50.0  
   400x300       100.0  
   320x240       100.0  
   320x200       100.0  

Note in the above output the resolution currently used is marked by an asterisk (*). Next you want to test if such resolution works and find the right command to set it up:

xrandr --output LVDS-1 --mode 800x600x32

In the above command you can change the depth (32 bit) for 24.

Next you want to add such command to the /etc/gdm/Init/Default file before /sbin/initctl ... [1]. The beginning of such file will look like this:

#!/bin/sh
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
#  -George

PATH="/usr/bin:$PATH"
OLD_IFS=$IFS

#if [ -x '/usr/bin/xsplash' ];
#then
#        /usr/bin/xsplash --gdm-session --daemon
#fi

xrandr --output LVDS-1 --mode 800x600x32
/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm

Once you've done this you can logout to see the results. I tested this in a VM environment only but it should work on a standard install ("bare metal").

[1] https://wiki.ubuntu.com/X/Config/Resolution#Setting%20xrandr%20commands%20in%20kdm/gdm%20startup%20scripts