| | @@ -113,19 +113,21 @@ |
| 113 | 113 | |
| 114 | 114 | Environment Variables |
| 115 | 115 | --------------------- |
| 116 | 116 | |
| 117 | 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`. |
| 118 | +file is either `FOSSIL_HOME`, `XDG_CONFIG_HOME`, or `HOME`, in that order. |
| 119 | +This ordering lets you put this file somewhere other than at the top |
| 120 | +of your user’s home directory by defining `FOSSIL_HOME` to mask |
| 121 | +the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined |
| 122 | +by some desktop environments to be the preferred "modern" directory |
| 123 | +in which to store configuration files. |
| 122 | 124 | |
| 123 | 125 | 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 |
| 126 | +`_fossil` instead of `.fossil` to avoid problems with old programs that |
| 127 | +assume file names cannot begin with a dot, as was true in old versions |
| 128 | +of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a |
| 127 | 129 | problem with such files, but still we take the safe path in case you’re |
| 128 | 130 | on a system with software that can’t cope.) We start our search with |
| 129 | 131 | `FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead |
| 130 | 132 | try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we |
| 131 | 133 | concatenate `HOMEDRIVE` + `HOMEPATH`. |
| | @@ -152,11 +154,12 @@ |
| 152 | 154 | |
| 153 | 155 | |
| 154 | 156 | `FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment |
| 155 | 157 | variable found in the environment from the list `FOSSIL_HOME`, |
| 156 | 158 | `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 157 | | -`HOMEPATH` (Windows, used together), and `HOME` is used as the |
| 159 | +`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix) and |
| 160 | +`HOME` is used as the |
| 158 | 161 | location of the `~/.fossil` file. |
| 159 | 162 | |
| 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 |
| | @@ -198,12 +201,12 @@ |
| 198 | 201 | accordingly. |
| 199 | 202 | |
| 200 | 203 | `HOME`: Location of the `~/.fossil` file. The first environment |
| 201 | 204 | variable found in the environment from the list `FOSSIL_HOME`, |
| 202 | 205 | `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 203 | | -`HOMEPATH` (Windows, used together), and `HOME` is used as the |
| 204 | | -location of the `~/.fossil` file. |
| 206 | +`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix) |
| 207 | +and `HOME` is used as the location of the `~/.fossil` file. |
| 205 | 208 | |
| 206 | 209 | `HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file. |
| 207 | 210 | The first environment variable found in the environment from the list |
| 208 | 211 | `FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows), |
| 209 | 212 | `HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is |
| | @@ -402,27 +405,28 @@ |
| 402 | 405 | first found environment variable from the list `FOSSIL_USER`, `USER`, |
| 403 | 406 | `LOGNAME`, and `USERNAME`, is the user name. As a final fallback, if |
| 404 | 407 | none of those are set, then the default user name is "root". |
| 405 | 408 | |
| 406 | 409 | |
| 407 | | -### Home Directory |
| 410 | +### Configuration Directory (often the Home Directory) |
| 408 | 411 | |
| 409 | 412 | 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`. |
| 413 | +configuration file directory. This includes the global settings and the list of |
| 414 | +repositories and checkouts used by `fossil all`. On many, |
| 415 | +but not all, systems the configuration file directory is the home directory |
| 412 | 416 | |
| 413 | | -The user's home directory is specified by the first environment |
| 417 | +The user's configuration file directory is specified by the first environment |
| 414 | 418 | variable found in the environment from the list `FOSSIL_HOME`, |
| 415 | 419 | `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and |
| 416 | | -`HOMEPATH` (Windows, used together), and `HOME`. |
| 420 | +`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix), and `HOME`. |
| 417 | 421 | |
| 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 |
| 422 | +SQLite has its own notion of the user's configuration file directory, |
| 423 | +which is only exposed if the interactive SQL shell is run with the "fossil |
| 420 | 424 | sqlite3" command. Being a separate library, SQLite uses many of the |
| 421 | 425 | 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 | | - |
| 426 | +different order, and does not use the `FOSSIL_HOME` nor |
| 427 | +`XDG_CONFIG_HOME` variables. |
| 424 | 428 | |
| 425 | 429 | |
| 426 | 430 | ### SQLite VFS to use |
| 427 | 431 | |
| 428 | 432 | See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an |
| 429 | 433 | |