Personal tools
You are here: Home Team Members Randy Berry Custom GDM Configuration For Auto And Timed Login

Custom GDM Configuration For Auto And Timed Login

by Randy Berry last modified Jul 15, 2010 07:43 PM
— filed under:

Since Fedora 9 "gdmsetup" has been missing from the available options. This howto shows you how to add various auto login features to GDM. Features that are not available through the GUI.

Applicable to Fedora Versions

  • All versions Fedora 9 and above.

Requirements

  1. Gnome Display Manager (GDM) must be your primary display manager.

Doing the work

Adding "Automatic Login" feature.

The automatic login feature will automatically login as a specific user each time you boot the computer. Use this feature only on a single user machine as it will not provide you with an option to login as another user.
 Note: Fedora 13 does not automatically select Auto-Login.
 However, if manually selected at GDM automatic login will commence.
 Note: GDM will not allow you to auto-login as root!  You must choose a normal user for this feature.
 Note: If you intend to use the Timed Login feature you cannot use Automatic Login. You must choose one or the other.

  1. Using VI to edit your custom configuration.  Open a terminal and enter the following command:
  2. su -c "vi /etc/gdm/custom.conf"
  3. Enter root password when prompted.
  4. Your default custom.conf file should look something like this:
    # GDM configuration storage
    
    [xdmcp]
    
    [chooser]
    
    [security]
    
    [debug]
    
  5. Enter edit mode on VI by pressing the 'i' key.
  6. Add the following lines to the end of your file. Where <username> is the name of the user you wish to auto login.
  7. [daemon]
    AutomaticLoginEnable=true
    AutomaticLogin=<username>
  8. Press ESC
  9. Enter ':wq' to save your new file, vi will automatically save and exit. (Always make backups before saving!)
  10. Reboot! Your computer should auto log in as your specified user.


Adding "Timed Login" feature.

The timed login feature will login as a specific user after a set period of time, thus allowing you to login as another user at boot up if you so choose.
 Note: Fedora 13 does not automatically select Auto-Login.
 However, if manually selected at GDM automatic login will commence.
 Note: If you've used the Automatic Login feature you cannot use both. You must choose one or the other.
 Note: GDM will not allow a timed-login as root!  You must choose a normal user for this feature.


  1. Using VI to edit your custom configuration.  Open a terminal and enter the following command:
  2. su -c "vi /etc/gdm/custom.conf"
  3. Enter root password when prompted.
  4. Your default custom.conf file should look something like this:
    # GDM configuration storage
    
    [xdmcp]
    
    [chooser]
    
    [security]
    
    [debug]
    
  5. Enter edit mode on VI by pressing the 'i' key.
  6. Add the following lines to the end of your file. Where <username> is the name of the user you wish to time login.
    Note: The "TimedLoginDelay"  value must be equal to 10 or a greater value.
  7. [daemon]
    TimedLoginEnable=true
    TimedLogin=<username>
    TimedLoginDelay=30
  8. Press ESC
  9. Enter ':wq' to save your new file, vi will automatically save and exit. (Always make backups before saving!)
  10. Reboot! Your computer should wait said amount of time before auto logging in as your specified user.

Reverting the changes

To revert the changes simply remove the added lines or comment them out by using the # before each line of the changes or change the 'true' value to 'false' and re-save your custom conf file. Your system will now operate normally prompting you to manually login as normal. Note: the [daemon] line may be left without problems.

Example:
# GDM configuration storage

[xdmcp]

[chooser]

[security]

[debug]

[daemon]
# TimedLoginEnable=true
# TimedLogin=<username>
# TimedLoginDelay=30

Troubleshooting

If you run into trouble at login

If you do run into trouble at login don't panic! You can still get into your system.
  1. Reboot your computer, after BIOS 'beep' press the 'e' key to edit your boot options and booting into runlevel 3
  2. You can do this by adding '3' to the end of your kernel line. Note: These changes will not be permanent. 

    Example:
  3. kernel /vmlinuz-2.6.31.9-174.fc12.i686.PAE ro root=/dev/mapper/vg_localhost-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us quiet 3
  4. After booting with the above changes login as root, enter root password when prompted. 
  5. Enter the following command:
    vi /etc/gdm/custom.conf
  6. Enter edit mode on VI by pressing the 'I' key.
  7. Recheck your entries or revert the changes simply removing the added lines or comment them out by using the # before each line of the changes or change the 'true' value to 'false' and re-save your custom conf file. Your system will now operate normally prompting you to login as a given user. Note: the [daemon] line may be left without problems.

    Example:
    # GDM configuration storage
    
    [xdmcp]
    
    [chooser]
    
    [security]
    
    [debug]
    
    [daemon]
    # AutomaticLoginEnable=true
    # AutomaticLogin=<username>
  8. Press ESC
  9. Enter ':wq' to save your new file, vi will automatically save and exit. (Always make backups before saving!)
  10. Reboot! Your computer should now reboot normally allowing you to manually login.

Common problems and fixes

There are no known problems, these configuration changes should work as intended. These configuration settings are taken directly from the Gnome Documentation website. However,  if you do run into any problems be sure to let us know!

More Information

 

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

Added Reading

 
Document Action
Document Actions
Log in


Forgot your password?
New user?