Bug 169923 - Avoid startup popups when starting LibreOffice from a script
Summary: Avoid startup popups when starting LibreOffice from a script
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2025-12-10 14:15 UTC by Hossein
Modified: 2025-12-30 09:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2025-12-10 14:15:15 UTC
Description:
When starting LibreOffice from a script, startup dialogs can be disruptive. The request here is to avoid such dialog boxes when starting LibreOffice from API.

Steps to Reproduce:
1. Remove the user profile completely as described in:
https://wiki.documentfoundation.org/UserProfile

2. Open LibreOffice from API, for example using bootstrap() function, as used in:
https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps#The_FirstUnoContact_example

Actual Results:
The first time dialog box pops up

Expected Results:
First time dialog box and other startup dialog boxes should not pop up when LibreOffice is started using bootstrap() function


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 31ed14cdc3880d3cd04fe70724ec62c286eca715
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

There are at least two startup dialog boxes:

The first time dialog is defined in:

cui/uiconfig/ui/whatsnewtabpage.ui
cui/source/dialogs/whatsnewtabpage.cxx

And the tip of the day dialog is defined in:

cui/uiconfig/ui/tipofthedaydialog.ui
cui/source/dialogs/tipofthedaydlg.cxx
Comment 1 Heiko Tietze 2025-12-29 09:16:40 UTC
None of the pop-ups are shown if you start with the --headless parameter (or in case of UI tests). I don't see a good reason to hide the popups in too many other cases.

Code pointer:
sfx2/source/view/viewfrm.cxx IsHeadlessOrUITest()
Comment 2 Hossein 2025-12-29 12:42:12 UTC
(In reply to Heiko Tietze from comment #1)
> None of the pop-ups are shown if you start with the --headless parameter (or
> in case of UI tests). I don't see a good reason to hide the popups in too
> many other cases.
> 
> Code pointer:
> sfx2/source/view/viewfrm.cxx IsHeadlessOrUITest()
But the whole point of bootstrap mechanism in LibreOffice API is to start LibreOffice in non-headless mode mode and use it in an automated way, with predictable behavior from LibreOffice.

In these cases, popups prevent using LibreOffice in a meaningful automated way, as you can not know what to expect. You may run the examples in first chapter of DevGuide, and see:

https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps
https://opengrok.libreoffice.org/xref/core/odk/examples/DevelopersGuide/FirstSteps/

For example, HelloTextTableShape.py:
https://opengrok.libreoffice.org/xref/core/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/python/HelloTextTableShape.py

You may run it with internal Python:

$ instdir/program/python odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape/python/HelloTextTableShape.py
Comment 3 Heiko Tietze 2025-12-30 09:48:56 UTC
People who run LibreOffice automated should be able to change a few entries in the registry. But no hard feelings if another start-up flag respectively test is added.