Bug 163562 - Interface control arguments (--minimized etc) do not work in Linux
Summary: Interface control arguments (--minimized etc) do not work in Linux
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Commandline
  Show dependency treegraph
 
Reported: 2024-10-22 07:08 UTC by Timur
Modified: 2024-11-14 09:18 UTC (History)
5 users (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 Timur 2024-10-22 07:08:17 UTC
Interface control arguments do not work as I would expect to start soffice from command line: 

--minimized does not start minimized, windows is always shown
--nodefault and --invisible work when soffice is started without document, not with one

Not sure if that is a bug or related to my Cinnamon Linux. 
Use case: when scripting bisect run with opening some file, LO window is popping and taking focus, wanted to minimize it.
Comment 1 Mike Kaganski 2024-10-22 07:17:46 UTC
(In reply to Timur from comment #0)
> --minimized does not start minimized, windows is always shown

Repro using Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded

> --nodefault and --invisible work when soffice is started without document,
> not with one

A problem of expectation? --invisible and --nodefault do not hide documents, only 
hide the start center (--nodefault) and also change the program lifetime (--invisible).
Comment 2 Mike Kaganski 2024-10-22 07:37:09 UTC
(In reply to Mike Kaganski from comment #1)
> (In reply to Timur from comment #0)
> > --minimized does not start minimized, windows is always shown
> 
> Repro using Version: 24.8.2.1 (X86_64) / LibreOffice Community
> Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
> CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 26100); UI render:
> Skia/Vulkan; VCL: win
> Locale: ru-RU (ru_RU); UI: en-US
> Calc: CL threaded

This, too, looks like wrong expectations, plus a documentation problem: the help shows "Starts minimized. The splash screen is not displayed", but the "Starts minimized" is misleading - the whole effect is *meant* to be "The splash screen is not displayed". And it is unclear what is the difference compared to --nologo. Maybe some historical difference, e.g. going to the times when there were things like first time activation wizard - which could be also affected?
Comment 3 Timur 2024-10-22 07:55:58 UTC
I would not say that expectation for --minimized is wrong, there is --nologo for splash so --minimized should do what it says, minimize the window both with new and existing document.

If those cases are separete, let this be for --minimized.
But I also do not see yet why other arguments would not work with opening a document.
Comment 4 Mike Kaganski 2024-10-22 08:01:57 UTC
(In reply to Timur from comment #3)

I am unsure if it's valid for UX consideration - the command line arguments are heavily used in existing apps (shell scripts, macros, external applications), so their behavior change should be considered an API break.

You can of course create an enhancement request to implement a *new* command line switch doing what you want; but thinking about it, I would actually expect that to be OS function (e.g., shell links on Windows have their own "minimized" option, which definitely works; same with Windows' cmd.exe's "start /MIN" command).
Comment 5 Mike Kaganski 2024-10-22 08:07:45 UTC
(In reply to Timur from comment #3)
--invisible is meant to start an instance controlled via the API. It is *contradicting* the "open file" argument, which is for interactive work. Thus, either one or the other.

--nodefault means "hide start center". When you open a file, the start center is not shown anyway.
Comment 6 Mike Kaganski 2024-10-22 08:23:08 UTC
(In reply to Mike Kaganski from comment #4)
> You can of course create an enhancement request to implement a *new* command
> line switch doing what you want; but thinking about it, I would actually
> expect that to be OS function (e.g., shell links on Windows have their own
> "minimized" option, which definitely works; same with Windows' cmd.exe's
> "start /MIN" command).

But OTOH, many programs do provide such command line arguments; it *seems* that different Linux DEs don't provide such function themselves out-of-the-box [1]; so having such a *new* command like argument would be valid.

[1] https://askubuntu.com/questions/663187/how-can-i-run-a-program-on-startup-minimized
Comment 7 Heiko Tietze 2024-10-22 09:09:45 UTC
|User/programmatic interface control:                                           
|   --nologo            Disables the splash screen at program start.            
|   --minimized         Starts minimized. The splash screen is not displayed.   
|   --nodefault         Starts without displaying anything except the splash    
|                       screen (do not display initial window).                 
|   --invisible         Starts in invisible mode. Neither the start-up logo nor 
|                       the initial program window will be visible. Application 
|                       can be controlled, and documents and dialogs can be     
|                       controlled and opened via the API. Using the parameter, 
|                       the process can only be ended using the taskmanager     
|                       (Windows) or the kill command (UNIX-like systems). It   
|                       cannot be used in conjunction with --quickstart.        
|   --headless          Starts in "headless mode" which allows using the      
|                       application without GUI. This special mode can be used  
|                       when the application is controlled by external clients  
|                       via the API.      

Whether these options make sense or naming could be better, it is likely part of many batch configurations and tinkering affect a lot of users with just little benefit. If we change something at all, it should be limited to documentation.
Comment 8 Timur 2024-10-22 09:13:06 UTC
I still do not see why --minimized does not start minimized and how that could be documentation issue when it does not work, and what users it would affect.
Comment 9 Mike Kaganski 2024-10-22 09:16:23 UTC
(In reply to Timur from comment #8)

-- minimized is not "start with the main window in minimized state", it's "start with minimal decorations like splash".
Comment 10 Dick Campbell 2024-10-23 02:32:50 UTC Comment hidden (spam)
Comment 11 Heiko Tietze 2024-11-12 15:16:49 UTC
(In reply to Mike Kaganski from comment #9)
> (In reply to Timur from comment #8)
> 
> -- minimized is not "start with the main window in minimized state", it's
> "start with minimal decorations like splash".

Let's just rephrase the info text. I'd be afraid of changing the workflow for these command line parameter and suggest to solve the use case, whatever it is beyond the unclear function - text relation, by other means. All OS/DE should offer ways to minimize applications.

Code pointer: desktop/source/app/cmdlinehelp.cxx
Comment 12 Timur 2024-11-13 11:47:23 UTC
We have 2 issues:
- existing argument is not what is sounded, so this is Doc change
- but I still need "start minimized". 
OS minimized is not practical, it comes later so it may flash. When looking for that, advice is: preferably use app option to minimize. 
While this ticket may be as marked, I do not see why there would not be another ticket to really start minimized. 
When doing bisects with GUI (no headless), LO flashes and takes focus, best way to avoid that seems to start minimized.
Comment 13 Mike Kaganski 2024-11-13 16:50:12 UTC
(In reply to Timur from comment #12)

I agree (as in comment 6), so please create that new request.