-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validateOfficeTemplateProfileDirectory seems to check wrong thing #76
Comments
When LibreOffice starts for the first time, it will create a profile directory for the local user. Here on my Windows it's: C:\Users\MyUser\AppData\Roaming\LibreOffice\4 and this directory must have a "user" directory in it, where is located all the stuff that has been saved for this specific profile. When you set the |
OK, semantics. You think the directory that holds the "user" subdirectory is the profile directory, I think the "user" subdirectory is the profile directory (based on reading the text from https://wiki.documentfoundation.org/UserProfile). Confusing, probably should document this in LocalOfficeManager.Builder.templateProfileDir(). |
This is an actual problem. I'd like to get around the double startup of soffice.bin by pointing jodconverter to an existing profile directory. The user account running jodconverter might never have run soffice, so there would be no $HOME/.config/libreoffice/4/user. Ideally, I'd just use the pre-installed template version of the profile directory at /usr/lib/libreoffice/share/. But there's no extraneous "user" subdirectory there, so I can't. Fixing this misapprehension about what the profile directory is would fix that. |
The Javadoc could be improved for sure. There is more on the wiki page about the templateProfileDir. I understand your point about the The way I usually use the templateProfileDir is explained here. I create a copy of a profile directory elsewhere (outside the user account). |
Hit this again. I'm running tests with jodconverter on a Gitlab CI setup which uses a Docker image with LibreOffice installed (the mbsi/s2i-java-libreoffice Docker from DockerHub). But my tests fail with this:
Because LibreOffice has never been run on that virtual machine. We need some way of running this on a machine where LibreOffice has never been manually run. Or perhaps there's some way to run LibreOffice in a script which wouldn't do anything but would initialize that directory? |
But it would be OK for a fallback, wouldn't it? Use the user config if it exists; otherwise, copy the share directory. That would allow JODConverter to actually not fail in situations in which it currently fails. |
I assume that your script |
This is an interesting idea, it would not be that hard to implement. Let me check this and come back to you. |
Closing. See #81 |
Tried this; works OK, too. Still get the double startup, but only once. |
I'm trying to set a custom template directory, and failing. The code in validateOfficeTemplateProfileDirectory seems to require a subdirectory called "user". But clearly, as per https://wiki.documentfoundation.org/UserProfile#Default_locations, the directory ending with "user" is the user profile directory, it's not contained within the user profile directory. This function should be checking for the presence of "autocorr", "autotext", etc. as detailed under https://wiki.documentfoundation.org/UserProfile#User_profile_content.
The text was updated successfully, but these errors were encountered: