$ libreoffice --calc --headless will generate ~/.config/libreoffice/4/user/registrymodifications.xcu However, the command will only generate a few lines to registrymodifications.xcu <?xml version="1.0" encoding="UTF-8"?> <oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="FirstRun" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Setup/L10N"><prop oor:name="ooLocale" oor:op="fuse"><value>en-US</value></prop></item> <item oor:path="/org.openoffice.Setup/Office"><prop oor:name="LastCompatibilityCheckID" oor:op="fuse"><value>420m0(Build:2)</value></prop></item> <item oor:path="/org.openoffice.Setup/Office"><prop oor:name="ooSetupInstCompleted" oor:op="fuse"><value>true</value></prop></item> </oor:items> without the --headless option registrymodifications.xcu is much longer like this: $ libreoffice --calc <?xml version="1.0" encoding="UTF-8"?> <oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="FirstRun" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.Recovery/RecoveryInfo"><prop oor:name="SessionData" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.Recovery/RecoveryList"><node oor:name="recovery_item_1" oor:op="replace"><prop oor:name="DocumentState" oor:op="fuse"><value>0</value></prop><prop oor:name="Filter" oor:op="fuse"><value>calc8</value></prop><prop oor:name="Module" oor:op="fuse"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop><prop oor:name="OriginalURL" oor:op="fuse"><value></value></prop><prop oor:name="TempURL" oor:op="fuse"><value></value></prop><prop oor:name="TemplateURL" oor:op="fuse"><value></value></prop><prop oor:name="Title" oor:op="fuse"><value>Untitled 1</value></prop><prop oor:name="ViewNames" oor:op="fuse"><value></value></prop></node></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="ContextActive" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="ContextSensitive" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="DockPos" oor:op="fuse"><value>0,2</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Docked" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="DockingArea" oor:op="fuse"><value>0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="HideFromToolbarMenu" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Locked" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="NoClose" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Pos" oor:op="fuse"><value>2147483647,2147483647</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Size" oor:op="fuse"><value>0,0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="SoftClose" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Style" oor:op="fuse"><value>0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']/UIName"><value xml:lang="en-US">Formatting</value></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/formatobjectbar']"><prop oor:name="Visible" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="ContextActive" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="ContextSensitive" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="DockPos" oor:op="fuse"><value>0,0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Docked" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="DockingArea" oor:op="fuse"><value>0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="HideFromToolbarMenu" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Locked" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="NoClose" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Pos" oor:op="fuse"><value>2147483647,2147483647</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Size" oor:op="fuse"><value>0,0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="SoftClose" oor:op="fuse"><value>false</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Style" oor:op="fuse"><value>0</value></prop></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']/UIName"><value xml:lang="en-US">Standard</value></item> <item oor:path="/org.openoffice.Office.UI.CalcWindowState/UIElements/States/org.openoffice.Office.UI.WindowState:WindowStateType['private:resource/toolbar/standardbar']"><prop oor:name="Visible" oor:op="fuse"><value>true</value></prop></item> <item oor:path="/org.openoffice.Office.Views/Windows"><node oor:name="scalc/10365" oor:op="replace"><node oor:name="UserData"><prop oor:name="Data" oor:op="fuse" oor:type="xs:string"><value>V2,V,128</value></prop></node><prop oor:name="Visible" oor:op="fuse"><value xsi:nil="true"/></prop><prop oor:name="WindowState" oor:op="fuse"><value></value></prop></node></item> <item oor:path="/org.openoffice.Office.Views/Windows"><node oor:name="scalc/26100" oor:op="replace"><node oor:name="UserData"><prop oor:name="Data" oor:op="fuse" oor:type="xs:string"><value>V2,V,20</value></prop></node><prop oor:name="Visible" oor:op="fuse"><value xsi:nil="true"/></prop><prop oor:name="WindowState" oor:op="fuse"><value></value></prop></node></item> <item oor:path="/org.openoffice.Setup/L10N"><prop oor:name="ooLocale" oor:op="fuse"><value>en-US</value></prop></item> <item oor:path="/org.openoffice.Setup/Office"><prop oor:name="LastCompatibilityCheckID" oor:op="fuse"><value>420m0(Build:2)</value></prop></item> <item oor:path="/org.openoffice.Setup/Office"><prop oor:name="ooSetupInstCompleted" oor:op="fuse"><value>true</value></prop></item> </oor:items>
Why would you want UI and view related configuration in a headless instance?
Sorry, I meant: $ libreoffice --calc --terminate_after_init
That still doesn't make sense because with that invocation no view was created which windows states could be remembered.
No, the window states should have been initiated before the command terminates LO.
(In reply to David Hedlund from comment #4) > No, the window states should have been initiated before the command > terminates LO. That makes absolutely no sense. Terminate after init just generates a minimal user profile. I suppose many people would actually complain if that option suddenly started showing a window.
I give up: this idea is much better: https://bugs.documentfoundation.org/show_bug.cgi?id=108787
Yeah, the registrymodifications.xcu wouldn't have all options listed anyways with libreoffice --calc.