How do you implement a warning banner in Fedora?

Solution 1:

Fedora 11 and after:

  1. Install gconf-editor
  2. Edit /apps/gdm/simple-greeter.
  3. Change banner_message_enable to true and mark as default (it will ask you to be root to confirm the change).
  4. Change banner_message_text to the content of the warning banner and mark as default (again, asking to be root).

Now, if you log out, you'll see the warning banner message just below the computer name in the login dialog. It will be center justified, but this can be changed. The dialog appears to resize for the text, so you can use more than one line of text as the message.

To change the justification of the text, you need to edit /usr/share/gdm/gdm-greeter-login-window.glade. Look for the text box id'ed "auth-banner-label". The justify tag is fairly obvious, just use the rest of the xml as a guide to see what to change.

Before Fedora 11:

This works for Fedora 10 and RedHat EL5. It doesn't work for Fedora 11 or Fedora 12 though.

  1. Look in /usr/share/gdm/themes/a-theme-name/a-theme-name.xml and edit that file with a text editor.
  2. After the first two pixmap entries add the following to the file:
<item type="rect">
  <pos anchor="n" x="50%" y="10" width="box" height="box" />
  <box>
    <item type="label">
      <normal font="Sans 14" color="#ffffff"/>
      <text>
INSERT BANNER TEXT HERE
      </text>
    </item>
  </box>
</item>

Obviously replace "INSERTBANNER TEXT HERE" with your banner and a-theme-name is the name of the theme that is being used by GDM.