Bug 32263 - Config file location
Summary: Config file location
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Libreoffice (show other bugs)
Version: 3.3.0 RC1
Hardware: All Linux (All)
: low minor
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: EasyHack
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 04:32 UTC by Thomas Zervogiannis
Modified: 2011-06-23 07:01 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
a proposed fix (1.15 KB, application/x-gzip)
2011-05-29 08:14 UTC, Takeshi Abe
Details

Description Thomas Zervogiannis 2010-12-09 04:32:39 UTC
The configuration files should be placed in $HOME/.config/libreoffice instead of $HOME/.config/.libreoffice (lose the dot in libreoffice)
Comment 1 Thorsten Behrens 2010-12-10 04:02:49 UTC
Thomas, I presume you've XDG_CONFIG_HOME set? http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html does not really mandate any specific naming scheme, I admit though that in this case, leaving out the dot looks slightly nicer. Would you be interested in having a go at a fix, shouldn't be too complicated?
Comment 2 Thomas Zervogiannis 2010-12-10 04:22:17 UTC
XDG_CONFIG_HOME set here. True, apart from putting configs in XDG_CONFIG_HOME freedesktop.org does not set any more constraints but everybody uses non-dot folders after putting them in eg. .config. And ok, I will give it a shot and come back for help if needed.
Comment 3 Jean-François Fortin Tam 2011-01-25 10:29:12 UTC
The XDG user directory spec does not only mandate XDG_CONFIG_HOME, but also XDG_DATA_HOME and XDG_CACHE_HOME, which could be quite interesting.

See also 
http://ploum.frimouvy.org/?207-modify-your-application-to-use-xdg-folders

for some explanation of why this is important.
Comment 4 Takeshi Abe 2011-05-29 08:14:00 UTC
Created attachment 47277 [details]
a proposed fix

The attached archive contains a possible fix for this.
Please take a look at it.
Comment 5 Noel Power 2011-05-30 03:46:00 UTC
(In reply to comment #4)
> Created an attachment (id=47277) [details]
> a proposed fix
> 
> The attached archive contains a possible fix for this.
> Please take a look at it.

could you please post the patch to the dev list ( for wider audience ), but.. before doing that some minor comments about the patch

a) I would use a define for "/.config" 
b) you should show where the magic '9' came from ( e.g. calculate it from the define ) in the code
c) it seems pointless doing the first access(pStr, 0) != 0) when you really want to run access on the value of pStr + "/.config" 

about the change common_brand.scp hmm well I am not sure at all about that ( in the case where XDG_blah blah blah ) is not used is it so nice to have the config go into a $HOME/libreoffice instead of $HOME/libreoffice?
 
NOTE: also this will affect windows where this XDGxxxx related directory specification does not apply
Comment 6 Takeshi Abe 2011-05-30 06:55:42 UTC
Noel, thanks a lot for your comment!

(In reply to comment #5)
> could you please post the patch to the dev list ( for wider audience ), but..
> before doing that some minor comments about the patch
> 
> a) I would use a define for "/.config" 
> b) you should show where the magic '9' came from ( e.g. calculate it from the
> define ) in the code
OK.

> c) it seems pointless doing the first access(pStr, 0) != 0) when you really
> want to run access on the value of pStr + "/.config" 
Sorry but I am not sure what you suggest, the first access(...) is for
the path specified with XDG_CONFIG_DATA, while the second one is for
HOME+"/.config", not for pStr+"/.config".

> 
> about the change common_brand.scp hmm well I am not sure at all about that ( in
> the case where XDG_blah blah blah ) is not used is it so nice to have the
> config go into a $HOME/libreoffice instead of $HOME/libreoffice?
> 
> NOTE: also this will affect windows where this XDGxxxx related directory
> specification does not apply
Exactly. I would like to ask that on the developer list.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.