Back to Table of Contentsgentoo - A Click-Ass Filemanager Go to Obsession Developments Homepage
  LICENSE   NOTES   GUIDE   INTRO   USAGE CONFIG HISTORY CONTRIBUTING ACKS  

The gentoo Configuration File

Introduction

Like most applications, gentoo needs somewhere to store its settings when it is not running, so you don't need to reconfigure it every time. The natural choice is, of course, to store the settings in a file in the file system, and this is exactly what gentoo does. This page describes the location and format of this configuration file. Unless you're a system administrator, there should be no need to read this. Unless you have a special interest in config files, that is...

Name and Location

In keeping with good old Un*x tradition, gentoo calls its configuration file ".gentoorc". Starting the name with a period hides it from (most) shell file listings, which is convenient. Ending the name with "rc" identifies it (to Un*x people, anyway) as being a configuration file, which is also very convenient.

When gentoo starts up, it tries to load a configuration from the file "$HOME/.gentoorc". That is, it looks in the home directory of the user who started it. If the HOME environment variable isn't set, or if there is no config file to be found, gentoo checks for a file in "/usr/local/etc/.gentoorc". It is convenient to place a site-wide standard configuration there, since it will be loaded the first time a "new" users runs gentoo. If none of these files can be found, gentoo complains and then uses a minimal built-in configuration.

The configuration file is always written to the user's home directory - there is no way of specifying a different file name. If you're installing gentoo for use by several users, just copy your configuration file from your home directory to /usr/local/etc/, so it can be used as the default for users.

File Format

Again, like most other Un*x programs, gentoo uses a plain-text configuration file. Unlike some other programs though, the file format used is highly structural: it's (almost) XML! Actually, since the code that loads the file definitely doesn't qualify as being a full-blown XML loader, the file isn't really XML either. But is sure looks like it... Basically, the file uses tags plus a case-convention to define a tree of values for all configuration options.

You are not encouraged to edit around in this file by hand; let gentoo be the only entity reading and writing it! The loader code is fairly armored, but still far from bullet-proof, so don't provoke it by hacking the file.