How many degrees of headlessness do we need?
Tor Lillqvist
tml at iki.fi
Sat Mar 28 23:21:49 PDT 2015
As far as I see, we have the following command-line options or other ways
to avoid display of GUI elements:
- The --quickstart switch. Starts a LO instance that *initially* has no
GUI. But when the user then actually wants to use LO, it is that instance
that wakes up and shows the GUI. When the user "quits", the process stays
running but goes back to showing no GUI.
- The --invisible switch. Not much used? Exact semantics unknown. What is
the intended interaction with existing LibreOffice instances, is there the
normal IPC pipe thing going on, so that only one LO instance runs per user
session?
- The --headless switch. Perhaps newer than --invisible? Not sure why a
separate one is needed and what the exact intended semantics are. Again,
how is it supposed to affect the interaction with other LibreOffice
instances?
On Linux (and other X11-using Unixes), --headless is tightly coupled to the
'vclplug' concept, as there used to be a 'headless' (actually called 'svp')
vclplug that was used (instead of a "generic" X11, GTK or KDE one) in
headless mode. Nowadays the 'svp' code is not technically a vclplug any
more, but that is just an implementation detail. On Windows and OS X,
--headless support is presumably broken to some degree.
Note that Application::EnableHeadlessMode takes a boolean parameter
'dialogsAreFatal', so this mode actually splits into two.
- The Application::EnableConsoleOnly() and IsConsoleOnly() API. No
command-line switch. Very new, from 2013. Used only in one program, gengal,
for OS X. Not sure if actually does what Michael (who doesn't use OS X)
thinks it does. Unclear why the 'headless' thing could not be used instead.
(Yesterday I made EnableConsoleOnly() also call EnableHeadlessMode(true).)
- LibreOfficeKit use of LO code. At least to me, it should be obvious that
when some arbitrary program, possibly running as a daemon, as a web
service, etc, uses LibreOfficeKit to handle documents, no LO GUI should
ever be displayed. Currently LibreOfficeKit turns on 'headless', and since
yesterday, also 'console-only'.
This is a mess and needs clarification. There are five modes of
headlessness. Do these modes form a hierarchy? Or is it possible, and
meaningful, to have a LibreOffice instance that is headless but not
invisible, for instance? Could we at least finally kill the quick start
concept, which surely is outdated by now?
Then there is also the issue that many (or all?) programs that use
LibreOfficeKit should be able to run totally isolated from other processes
using LO code (LO itself, or other instances of the same or other
LOKit-using processes). There should be no inter-process communication.
Perhaps even no reading or writing of user configuration. But this is a
separate topic.
--tml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150329/9e7bf75f/attachment.html>
More information about the LibreOffice
mailing list