add text to the gnome panel

Latest response

We need to add some text in the gnome panel. we have a requirement to display the word "Unclassified" at all times. Is this possible?

Responses

Hi Edwin,

One quick trick for adding text to the gnome-panel is to change the clock text format to include this indicator.

We've included the details on this procedure below. Hopefully this is close to what you're looking to achive.

Kind regards,
Michael Kolbas


Reasons for changing the gnome-panel Clock Applet format:

  • The benefits to this approach are that the indicator..

    • Would rarely, if ever, be obstructed by a window. (unlike desktop background changes)

    • Would have high visibility since users frequently check the time.

  • The clock text format can be changed to do any of the following:

    • Include extra text around the displayed time.

    • Customize the format of the clock (include seconds, day of the week, etc)

How to apply the changes and enforce them for all users

  • The example below shows how to apply the change globaly, and enforces this as mandatory for all user accounts on the system.1

  • To change the clock format at a (mandatory) global level:

    1. Open a terminal on the system and become root using su -

    2. Set the /apps/panel/applets/clock/prefs/format key to "custom"

      # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --set --type string /apps/panel/applets/clock/prefs/format custom
      
    3. Set the format of the clock text using the strftime()2 format

    # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --set --type string /apps/panel/applets/clock/prefs/custom_format '[UNCLASIFIED] %I:%M %p'
    
    1. The user will then need to logout fully and then log back in to see the changes take effect.

    Note: These changes can also be set per user or as a default instead of mandatory.
    Note: This procedure was tested for RHEL 5 and RHEL 6.


  1. Details on how mandatory gconf settings work can be found in the article: How to set or unset mandatory or default user profile for Gnome users in Red Hat Enterprise Linux? 

  2. Running the command "man strftime" will show the different time format conversion specifiers (%I, %M, etc). 

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.