Issue 121949 - SYSUSERCONFIG should default to $HOME/.config and not to $HOME
Summary: SYSUSERCONFIG should default to $HOME/.config and not to $HOME
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
: 87678 (view as issue list)
Depends on:
Reported: 2013-03-24 16:05 UTC by Andrea Pescetti
Modified: 2014-01-19 17:02 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Andrea Pescetti 2013-03-24 16:05:57 UTC
As reported by Ariel in
we have an incorrect (as per Freedesktop specifications) default setting for SYSUSERCONFIG when XDG_CONFIG_HOME is not set. Full explanation follows, for convenience.

We would expect $SYSUSERCONFIG to mean $HOME/.config .

795 	static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
796 	{
797 	sal_Char *pStr = getenv("XDG_CONFIG_HOME");
799 	if ((pStr == NULL) || (strlen(pStr) == 0) ||
800 	(access(pStr, 0) != 0))
801 	return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
803 	strncpy(pszDirectory, pStr, nMax);
804 	return sal_True;
805 	}

the code is getting the value from XDG_CONFIG_HOME; if it is unset or empty, then it resolves to $HOME.

But the freedesktop specification says:
"$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."

It should resolve to $HOME/.config
Comment 1 Ariel Constenla-Haile 2013-03-25 19:05:48 UTC
If someone wants to play with this, you have to:

- open a terminal
- see if $XDG_CONFIG_HOME is set:


if nothing is echoed, then it is unset.

- if unset, export it so that it points to $HOME/.config:

]$ export XDG_CONFIG_HOME=$HOME/.config

- then launch AOO from this terminal:

]$ /opt/openoffice.org3/program/soffice

Go to the menu Tools - Options... - - Paths. It should show the user paths pointing to $HOME/.config

So far everything seems to work.
The problem I see is the naming:


a) a hidden folder inside a hidden folder does not make sense
b) too many folders: 
1) .openoffice, 
2) the major version 3, 
3) user

I wonder if the 3/user is needed at all. If you start AOO with the -env:UserInstallation switch pointing to a folder, it only writes into that folder; so why this "user" folder inside "" ?

In short, if we choose this approach, we should simplify it (if possible); something like

Comment 2 Ariel Constenla-Haile 2013-03-28 12:44:58 UTC
(In reply to comment #1)
> I wonder if the 3/user is needed at all. 

Start OpenOffice, then

]$ ls -a ~/
.  ..  .lock  user

The user profile is locked with a file called .lock
So far this is the only use I've found for having this directory structure.
Comment 3 Edwin Sharp 2014-01-19 17:02:17 UTC
*** Issue 87678 has been marked as a duplicate of this issue. ***