On nixos we have a custom installation. If ~/.config does not exist there is a message "The application cannot be started. An internal error has occured".
These message appear on the console:
[Java framework] Error in function createSettingsDocument (elements.cxx).
Warning: failed to read path from javaldx
and using google it is possible to find the solution (create ~/.config or make sure its writable) - still it would be nicer if everything just worked out of the box.
Adding code ensuring that this directory exists and is writable should be an easy task.
I reproduce this but above all but it seems normal.
I don't understand how come you don't have ~/.config with write permissions?
This directory contains the config file from a lot of applications.
I created a new user account - and there was no ~/.config at all.
Then I was lost with an unhelpful message for a short period of time.
I think its wrong to depend on a foreign application creating it - that's it.
Maybe its a distribution issue - too. Should .config exist in /etc/skel ?
Then the issue would be void, too
(In reply to comment #2)
> I created a new user account - and there was no ~/.config at all.
> Then I was lost with an unhelpful message for a short period of time.
Ok I understand better now.
> I think its wrong to depend on a foreign application creating it - that's it.
> Maybe its a distribution issue - too. Should .config exist in /etc/skel ?
> Then the issue would be void, too
I don't know for the rest. Anyway, it could interesting to have an useful message.
Michael: I reproduced the behaviour but how should LO acts?
- create ~/.config with adhoc permissions itself?
- popup a message indicating there's no ~/.config or permissions don't allow to write in it?
Which options are there?
a) create /etc/skel/.config - so that .config is create whenever a new user is created (doesn't seem to be common)
b) make libreoffice create that directory (700 because .config might contain sensible data - and it is what ubuntu seems to do (?))
This would solve this problem once and forever for this project only
c) Is it the task of libreoffice to create the directory? Or should the bug report forwarded to whatever library libreoffice is using to access .config?
I don't know. Software should just work - and b) will accomplish this for LibreOffice forever.
I'd not change the permission if the directory already exists.
chrome, htop both create it and set 700.
inkscape creates it and sets 711
I could test more applications - but that will not change the fact that just creating it and setting it to 700 makes everything work.
Marc: thank you for your feedback.
Just to put it clear (because it wasn't said explicitly), my previous comment was for Michael Meeks that I put in copy of this tracker.
NEW as confirmed in comment 1.
To find the earliest use of ~/.config I guess we should put a breakpoint in __cxa_throw and run without the directory existing :-)
I -imagine- this is from desktop/source/app or desktop/source/deployment - but of course it could easily be in configmgr.cxx.
It'd be good to have a stack-trace for that.
It seems like: sal/osl/unx/security.c is prolly a good place to look at first:
#define DOT_CONFIG "/.config"
static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
sal_Char *pStr = getenv("XDG_CONFIG_HOME");
if (pStr == NULL || strlen(pStr) == 0 || access(pStr, 0) != 0)
Patches most welcome (turned it into an easy-hack) - thanks !
Created attachment 79365 [details]
Here's a gdb session with bt
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
FYI, at least current master towards LO 4.2 on Linux:
* If there is no ~/.config, LO silently creates ~/libreoffice/4 instead of ~/.config/libreoffice/4 and uses that. This is probably a bug.
* If ~/.config is a directory that is not accessible (no rwx flags) LO refuses to start with a "The application cannot be started. An internal error occurred." error box and does not create anything.
* If ~/.config is a directory that is not writeable (just r-x flags) LO refuses to start with a "The application cannot be started. User installation could not be completed." error box and does not create anything.
* If ~/.config is a file instead of a directory LO refuses to start with a "The application cannot be started. The configuration file '/.../program/bootstraprc' is corrupt." error box (whose wording does make sense, given that bootstraprc's UserIntsallation=$SYSUSERCONFIG/libreoffice/4 points at a "broken" path) and does not create anything.
Removing comma from whiteboard (please use a space to delimit values in this field)
Submitted a revised patch for review to gerrit.
I'm adding this comment to let other know what i've done.
MichaÃ«l LefÃ¨vre committed a patch related to this issue.
It has been pushed to "master":
fdo#56284 : soffice fails to start unless ~/.config exists and is writable
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup )
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)