Re: g_get_home_dir (), ${HOME}, and getpwuid ()->pw_dir
- From: Stef Walter <stefw gnome org>
- To: Ivan Shmakov <oneingray gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: g_get_home_dir (), ${HOME}, and getpwuid ()->pw_dir
- Date: Thu, 27 Sep 2012 18:38:22 +0200
On 09/27/2012 04:48 PM, Ivan Shmakov wrote:
> $ HOME=/net/home/jrh emacs
>
> Moreover, GNU Bash started under such a Emacs instance will also
> use /net/home/jrh/.bashrc (instead of /home/jrh/.bashrc), and so
> will GNU Wget, or Lynx, and a sheer variety of other tools.
>
> … But not the bulk of GNOME, which will insist on using
> /home/jrh/.whatever, perhaps leaving the user no way to choose
> otherwise (sans of persuading the local passwd(5) — or the
> site's LDAP — administrator to change his or her account.)
Nah, you can use XDG Base directories to get the bulk of GNOME to use
another directory for files, config, settings and so on. [1]
Set $XDG_CONFIG_HOME, $XDG_DATA_HOME and $XDG_CACHE_HOME.
These are exposed to GLib based software as g_get_user_data_dir(),
g_get_user_cache_dir() and g_get_user_config_dir(). GNOME is actively
moving towards using those. [2]
FWIW, the default values for those are supposed to be derived from $HOME
according to the XDG Basedir spec. So if the spec is to be taken
literally it seems like we should be using $HOME instead of
g_get_home_dir().
But anyway, there is a way to use environment variables to change where
the 'bulk of GNOME' looks for its stuff. And where not, there is active
progress in fixing this issue.
Cheers,
Stef
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
[2] https://live.gnome.org/GnomeGoals/XDGConfigFolders
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]