Tuesday, October 30, 2007

Linux: Display a login banner for Gnome (GDM) Desktop

You can easily use /etc/issue file to display a pre-login message / login warning banner for text based session. You can also force OpenSSH (SSHD) to display a login message or banner. But how do you force GDM to display a login banner for all local and remote users?
GDM is a replacement for XDM, the X Display Manager. GDM runs and manages the X servers for both local and remote logins (using XDMCP). You can easily configure GDM to display message. You need to open gdm custom configuration file:

[a] RHEL / CentOS / Fedora Linux : Open /etc/gdm/custom.conf file.
[b] Debian / Ubuntu Linux : Open /etc/gdm/gdm.conf-custom file.

This file is the appropriate place for specifying your customizations to the GDM configuration. If you run gdmsetup, it will automatically edit this file for you and will cause the daemon and any running GDM GUI programs to automatically update with the new configuration. Not all configuration options are supported by gdmsetup, so to modify some values it may be necessary to modify this file directly by hand.

Display a login banner for Gnome / GDM under Linux

Open /etc/gdm/custom.conf file:
# vi /etc/gdm/custom.conf

Find out [greeter] section and append following text:
DefaultWelcome=false
Welcome=Message for local users
RemoteWelcome=Message for remote login users

Save and close the file.


Viewers Online