| | @@ -112,20 +112,26 @@ |
| 112 | 112 | |
| 113 | 113 | |
| 114 | 114 | Environment Variables |
| 115 | 115 | --------------------- |
| 116 | 116 | |
| 117 | | -On most platforms, the location of the user’s account-wide `.fossil` |
| 118 | | -file is either `FOSSIL_HOME` or `HOME`, in that order. This ordering |
| 119 | | -lets you put this file somewhere other than at the top of your user’s |
| 120 | | -home directory by defining `FOSSIL_HOME` to mask the always-defined |
| 121 | | -`HOME`. |
| 117 | +On most platforms, the location of the user’s account-wide |
| 118 | +[configuration database][configdb] |
| 119 | +file is either `FOSSIL_HOME`, `XDG_CONFIG_HOME`, or `HOME`, in that order. |
| 120 | +This ordering lets you put this file somewhere other than at the top |
| 121 | +of your user’s home directory by defining `FOSSIL_HOME` to mask |
| 122 | +the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined |
| 123 | +by some desktop environments as an alternative location for |
| 124 | +configuration files. If the `XDG_CONFIG_HOME` location is used, then |
| 125 | +the name of the configuration database is `fossil.db` instead of |
| 126 | +`.fossil`. See the [configuration database location][configloc] discussion |
| 127 | +for additional information. |
| 122 | 128 | |
| 123 | 129 | For native Windows builds and for Cygwin builds, the file is called |
| 124 | | -`_fossil` instead to avoid problems with old programs that assume file |
| 125 | | -names cannot begin with a dot, as was true in old versions of Windows |
| 126 | | -and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a |
| 130 | +`_fossil` instead of `.fossil` to avoid problems with old programs that |
| 131 | +assume file names cannot begin with a dot, as was true in old versions |
| 132 | +of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a |
| 127 | 133 | problem with such files, but still we take the safe path in case you’re |
| 128 | 134 | on a system with software that can’t cope.) We start our search with |
| 129 | 135 | `FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead |
| 130 | 136 | try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we |
| 131 | 137 | concatenate `HOMEDRIVE` + `HOMEPATH`. |
| | @@ -149,16 +155,13 @@ |
| 149 | 155 | local interactive user via the command line). This can be useful for |
| 150 | 156 | local (or remote) testing of the moderation subsystem and its impact |
| 151 | 157 | on the contents and status of wiki pages. |
| 152 | 158 | |
| 153 | 159 | |
| 154 | | -`FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment |
| 155 | | -variable found in the environment from the list `FOSSIL_HOME`, |
| 156 | | -`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 157 | | -`HOMEPATH` (Windows, used together), and `HOME` is used as the |
| 158 | | -location of the `~/.fossil` file. |
| 159 | | - |
| 160 | +`FOSSIL_HOME`: Location of [configuration database][configdb]. |
| 161 | +See the [configuration database location][configloc] description |
| 162 | +for additional information. |
| 160 | 163 | |
| 161 | 164 | `FOSSIL_USE_SEE_TEXTKEY`: If set, treat the encryption key string for |
| 162 | 165 | SEE as text to be hashed into the actual encryption key. This has no |
| 163 | 166 | effect if Fossil was not compiled with SEE support enabled. |
| 164 | 167 | |
| | @@ -195,15 +198,12 @@ |
| 195 | 198 | |
| 196 | 199 | `GATEWAY_INTERFACE`: If present and the `--nocgi` option is not, assume |
| 197 | 200 | fossil is invoked from a web server as a CGI command, and act |
| 198 | 201 | accordingly. |
| 199 | 202 | |
| 200 | | -`HOME`: Location of the `~/.fossil` file. The first environment |
| 201 | | -variable found in the environment from the list `FOSSIL_HOME`, |
| 202 | | -`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 203 | | -`HOMEPATH` (Windows, used together), and `HOME` is used as the |
| 204 | | -location of the `~/.fossil` file. |
| 203 | +`HOME`: Potential location of the [configuration database][configdb]. |
| 204 | +See the [configuration database location][configloc] description for details. |
| 205 | 205 | |
| 206 | 206 | `HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file. |
| 207 | 207 | The first environment variable found in the environment from the list |
| 208 | 208 | `FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows), |
| 209 | 209 | `HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is |
| | @@ -402,27 +402,45 @@ |
| 402 | 402 | first found environment variable from the list `FOSSIL_USER`, `USER`, |
| 403 | 403 | `LOGNAME`, and `USERNAME`, is the user name. As a final fallback, if |
| 404 | 404 | none of those are set, then the default user name is "root". |
| 405 | 405 | |
| 406 | 406 | |
| 407 | | -### Home Directory |
| 408 | | - |
| 409 | | -Fossil keeps some information interesting to each user in the user's |
| 410 | | -home directory. This includes the global settings and the list of |
| 411 | | -repositories and checkouts used by `fossil all`. |
| 412 | | - |
| 413 | | -The user's home directory is specified by the first environment |
| 414 | | -variable found in the environment from the list `FOSSIL_HOME`, |
| 415 | | -`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 416 | | -`HOMEPATH` (Windows, used together), and `HOME`. |
| 417 | | - |
| 418 | | -SQLite has its own notion of the user's home directory, which is only |
| 419 | | -exposed if the interactive SQL shell is run with the "fossil |
| 420 | | -sqlite3" command. Being a separate library, SQLite uses many of the |
| 421 | | -same variables to find the home directory, but uses them in a |
| 422 | | -different order, and does not use the `FOSSIL_HOME` variable at all. |
| 423 | | - |
| 407 | +### Configuration Directory (often the Home Directory) |
| 408 | + |
| 409 | +Fossil keeps some information pertinent to each user in the user's |
| 410 | +[configuration database file][configdb]. |
| 411 | +The configuration database file includes the global settings |
| 412 | +and the list of repositories and checkouts used by `fossil all`. |
| 413 | + |
| 414 | +On Unix systems, the configuration database is called by one of the |
| 415 | +following names (in order): |
| 416 | + |
| 417 | + * `$FOSSIL_HOME/.fossil` |
| 418 | + * `$XDG_CONFIG_HOME/fossil.db` |
| 419 | + * `$HOME/.fossil` |
| 420 | + |
| 421 | +The name used is the first in the above list for which the corresponding |
| 422 | +environment varible is defined. On most systems, the third name is the |
| 423 | +one that is used. |
| 424 | + |
| 425 | +On Windows, the configuration database is called one of these (in order) |
| 426 | + |
| 427 | + * `%FOSSIL_HOME%/_fossil` |
| 428 | + * `%LOCALAPPDATA%/_fossil` |
| 429 | + * `%APPDATA%/_fossil` |
| 430 | + * `%USERPROFILES%/_fossil` |
| 431 | + * `%HOMEDRIVE%%HOMEPATH%/_fossil` |
| 432 | + |
| 433 | +As before, the first case in when the corresponding environment variables |
| 434 | +exist is the one used. This is ususally the second case. Note that the |
| 435 | +`FOSSIL_HOME` environment variable can always be set to determine the |
| 436 | +location of the configuration database. Note also that the configuration |
| 437 | +database file itself is called `.fossil` or `fossil.db` on unix but |
| 438 | +`_fossil` on windows. |
| 439 | + |
| 440 | +You can run the "[fossil info](/help?cmd=info)" command from an open |
| 441 | +check-out to see the location of the configuration database. |
| 424 | 442 | |
| 425 | 443 | |
| 426 | 444 | ### SQLite VFS to use |
| 427 | 445 | |
| 428 | 446 | See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an |
| | @@ -491,5 +509,8 @@ |
| 491 | 509 | On Apple platforms, it assumes that `open` is the command to open an |
| 492 | 510 | URL in the user's configured default browser. |
| 493 | 511 | |
| 494 | 512 | On Windows platforms, it assumes that `start` is the command to open |
| 495 | 513 | an URL in the user's configured default browser. |
| 514 | + |
| 515 | +[configdb]: ./tech_overview.wiki#configdb |
| 516 | +[configloc]: ./tech_overview.wiki#configloc |
| 496 | 517 | |