Download it now!
Bug 42470 - Starting LO with "--nodefault" parameter should not open visible window
Summary: Starting LO with "--nodefault" parameter should not open visible window
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:3.7.0 target:3.6.1
Keywords: regression
: 43310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-01 05:05 UTC by Daniel Benkmann
Modified: 2012-12-21 23:55 UTC (History)
6 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 Daniel Benkmann 2011-11-01 05:05:24 UTC
Steps to reproduce:

1. Make sure no soffice process is already running
2. Start LibreOffice with the command "libreoffice --nodefault"
3. The splash screen appears. (This is the correct behaviour)
4. The LO initial window appears. (This shouldn't happen!)

This is a regression to the behaviour of LO/OOo in previous versions (before 3.4). -nodefault did not open a visible window.

Maybe this was an intentional change because the help text for --nodefault reads:
"don't start with an empty document"
which is kind of ambiguous but the Ubuntu manpage is much clearer:
"Starts the application without any window opened for the first time."
(Regarding the bad documentation of the parameter, see also http://openoffice.org/bugzilla/show_bug.cgi?id=46296#c8)

Anyway, I see no reason why the behaviour of --nodefault was changed and this should be fixed.
Comment 1 Lionel Elie Mamane 2011-11-28 09:07:18 UTC
(In reply to comment #0)

> This is a regression to the behaviour of LO/OOo in previous versions (before
> 3.4). -nodefault did not open a visible window.

The effect you seek is obtained with "--invisible"; it also suppresses the splash screen.

> Anyway, I see no reason why the behaviour of --nodefault was changed and this
> should be fixed.

I rather like that --nodefault gives me a choice what to do instead of dumping me in an empty writer document. I can choose between opening an existing file, creating a new base / writer / calc / ... file.
Comment 2 Daniel Benkmann 2011-11-28 13:42:38 UTC
(In reply to comment #1)
> (In reply to comment #0)
> 
> > This is a regression to the behaviour of LO/OOo in previous versions (before
> > 3.4). -nodefault did not open a visible window.
> 
> The effect you seek is obtained with "--invisible"; it also suppresses the
> splash screen.

And what if I want to see the splash screen but not the window? That's the effect I seek. And since ages that effect could be achieved with "--nodefault". Not anymore with LibreOffice 3.4.


> I rather like that --nodefault gives me a choice what to do instead of dumping
> me in an empty writer document. I can choose between opening an existing file,
> creating a new base / writer / calc / ... file.

The effect you seek is just starting "soffice" without a parameter.

Anyway, let's not get into the "it's not a bug, it's a feature" argument. This is clearly a regression and you would need very, very good arguments to justify willingly breaking all programs/scripts/etc out there which depend on the known behaviour of "--nodefault".

To illustrate the scope of the problem, it should also be mentioned that bootstrapping LibreOffice in Java using the com.sun.star.comp.helper.Bootstrap class, also launches the soffice process with the "-nodefault" parameter. Which means that every Java program out there using the well-documented (and also used in the examples of the LibreOffice SDK) way to bootstrap OOo/LibO suddenly behaves differently with LibO 3.4 and opens a window that wasn't there before. Am I the only one who sees this as problematic?

And to give you a specific example (since we were asked at the last LibreOffice Hackfest in Munich to mention in our bug reports if the bug affects the Municipality of Munich and its OOo/LibO migration): This bug is highly relevant to us in Munich because our OOo extension "WollMux" is one of the above mentioned programs and we also have other tools which bootstrap OpenOffice in this way. And it is absolutely unacceptable for us that any window is opened in this case.

You might say "Just modify your own code to use --invisible instead of --nodefault" but sadly that's not really an option, since we aren't explicitly starting soffice with the --nodefault parameter ourselves but just using OOo/LibreOffice's Bootstrap class and that's not our code. So if you really don't want to fix this bug, at least document the change and update the bootstrap helper classes in the SDK.
But my suggestion would be to just change "--nodefault" to behave as it always did. That's the best and easiest solution.
Comment 3 Lionel Elie Mamane 2011-11-28 14:23:52 UTC
(In reply to comment #2)
> (In reply to comment #1)

>> I rather like that --nodefault gives me a choice what to do instead of dumping
>> me in an empty writer document. I can choose between opening an existing file,
>> creating a new base / writer / calc / ... file.

> The effect you seek is just starting "soffice" without a parameter.

No, that creates a new (empty) writer document and puts me in LibreOffice writer. I don't particularly care if the effect I seek is --nodefault or another way, but I'd like to keep a way to achieve it, some way or the other.

> To illustrate the scope of the problem, it should also be mentioned that
> bootstrapping LibreOffice in Java using the com.sun.star.comp.helper.Bootstrap
> class, also launches the soffice process with the "-nodefault" parameter.

I see. Then indeed, it is part of external API, and its behaviour should not have changed like that.
Comment 4 Lionel Elie Mamane 2011-12-01 13:36:22 UTC
*** Bug 43310 has been marked as a duplicate of this bug. ***
Comment 5 Andras Timar 2012-01-13 03:15:31 UTC
I can reproduce the issue with LibreOffice 3.4.4 on Linux and on Windows. However, daily builds from libreoffice-3-5 branch and from master behave as expected on Linux: --nodefault does not open LibreOffice windows, just displays the splash screen. On Windows, daily builds from libreoffice-3-5 branch and from master behave wrong, they open a LibreOffice windows with the start center.
Comment 6 Jan Holesovsky 2012-02-10 07:23:26 UTC
Removing from the Most Annoying Bugs - this is not a bug affecting majority of users, is it?
Comment 7 Daniel Benkmann 2012-02-11 08:53:34 UTC
(In reply to comment #6)
> Removing from the Most Annoying Bugs - this is not a bug affecting majority of users, is it?

Well, I don't know if it is affecting the majority of users but as explained in the comments above it is affecting every single application which uses the officially documented way to bootstrap LibreOffice by means of the Bootstrap Java class. Also, everybody who just used "libreoffice --nodefault" in scripts etc. to launch LibreOffice.

So, I don't know what exactly the criteria for the "Most Annoying Bugs" list are (as I wasn't the one who put it on there) but in my opinion this bug definitely is directly or indirectly affecting enough users (and especially developers of applications interfacing with LibreOffice) that it should be fixed as soon as possible.
Comment 8 pr.nienhuis 2012-04-12 12:55:23 UTC
Sorry for asking: any chance this bug is going to be fixed soon?

As far as I'm concerned: I'm maintaining an Octave (www.octave.org) package (http://octave.sourceforge.net/io/index.html) that uses (quoted from Comment 7) the "officially documented way to bootstrap LibreOffice by means of the Bootstrap Java class". 

After LO 3.3.1 the behavior of this Bootstrap Java Class got broken (see https://bugs.freedesktop.org/show_bug.cgi?id=40991); while most of that has already been fixed, the one remaining issue is the splash screen that still shows up while AFAIK it shouldn't (and me and my users don't want it).

We can't fix this on our side, it's LO code that changed its behavior relative to the LO / OOo docs.

Thanks
Comment 9 Jochen Staerk 2012-07-25 08:34:10 UTC
I need this fixed as well, if run with libreoffice instead of OpenOffice.org my software (Gnuaccounting, http://www.gnuaccounting.org) keeps opening a useless window. 

As far as I understood Jürgen this is also one of the reasons why he is really pissed of Libreoffice (he is developer and author of Thera-Pi, http://www.thera-pi.org/, which also embeds OpenOffice.org much better than LibreOffice)
Comment 10 Andreas 2012-07-25 08:44:00 UTC
+1 from openyabs.org
Comment 11 Juergen Steinhilber 2012-08-07 18:45:45 UTC
As long as the Startparameter-Bug, and here especially the Parameter "--nodefault", will not be fixed, LibreOffice will stay in the status unuseable for all Java-Programmers who embedds OpenOffice in their Software (and for the Users of these Software).
And the Tip to take "--invisible" instead of "--nodefault" is not a Tip, it's a gall

Gruß
Jürgen Steinhilber
Comment 12 letzter3 2012-08-08 18:17:04 UTC
+1
It's impossible to work with LO > 3.4
Comment 13 letzter3 2012-08-08 18:27:33 UTC
Sorry. I thought "it's impossible to work with LO >= 3.4"

Michael
Comment 14 Juergen Steinhilber 2012-08-09 18:52:52 UTC
Because the same Bug(!) exists in Apache OpenOffice 3.4 i filed the same Bug at the AOO-Project.
And the same Bug means that "--nodefault" mustn't open the StartCenter.
Contrary to the response of the LO-Team the Apache guys have had a solution at once.
And here is the solution for LO:
Add  " && !rCmdLineArgs.IsNoDefault() " in the module 
/core/desktop/source/app/app.cxx at line 1675 and everything will be fine.

Desolate, desolate, but this is the typically result if one broadcast every day to be the better one, but in the reality most of the code is imported from others.
In this case it was the import of a Bug.

Cheers
Jürgen Steinhilber4
Comment 15 Not Assigned 2012-08-10 07:11:25 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cfed166261968068abbed485ceffd67ca5cbf61

fdo#42470: Do not show backing window on --nodefault
Comment 16 Stephan Bergmann 2012-08-10 07:24:45 UTC
This is funny.  Finally came around to commit the (rather trivial) patch this morning, only to find out I'm dispraised as somebody who "broadcast[s] every day
to be the better one" (which I can't remember I ever did).  I happened to look into this issue earlier this week, and in the course of doing so noticed other catastrophes that demanded more urgent fixing.  Also, pathetic comments (just some, not all, for sure) and claim of highest criticality -- is there data loss involved? -- do not generally motivate one to treat such an issue as most urgent.  I do understand people's frustration with unaddressed issues, though.  (But if it frustrated you so much, you could also have had a stab at fixing it yourself.  Would have been a nice easy hack to get involved with the LO code base.)
Comment 17 Jochen Staerk 2012-08-10 09:10:33 UTC
Hi Daniel,

> (But if it frustrated you so much, you could also have had a stab at fixing it
> yourself.  Would have been a nice easy hack to get involved with the LO code
> base.)

That was a secret treasure bug, please contact me RE the details of the payment. You just scored 100€. You can ask me to redirect it to any institution you name or if you are freelancer or own a company you can invoice me for the money yourself.

I would also be willing to get acquainted with the LO codebase but as far as I am aware the two other bugs really frustrating me are very, very deep and my C++ is not very good.

You don't happen to attend the LibreCon 17-19 Oct 2012 do you?
Comment 18 Not Assigned 2012-08-10 11:31:03 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=298b8c500a143211d122046075254c621571e7c8&g=libreoffice-3-6

fdo#42470: Do not show backing window on --nodefault


It will be available in LibreOffice 3.6.1.
Comment 19 Juergen Steinhilber 2012-08-10 16:28:51 UTC
(In reply to comment #18)
> Stephan Bergmann committed a patch related to this issue.
> It has been pushed to "libreoffice-3-6":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=298b8c500a143211d122046075254c621571e7c8&g=libreoffice-3-6
> 
> fdo#42470: Do not show backing window on --nodefault
> 
> 
> It will be available in LibreOffice 3.6.1.

Hi Stephan,
thanks a lot for doing so, and be sure alot of developers and users would like to thank you too (if they could).

(and please don't be angry about my "little tough" posts, but I'm dealing with that problem since LO 3.4, trying to make workaraound etc., always with no success.)
Thanks once more.

Jürgen
Comment 20 Jochen Staerk 2012-08-15 13:47:05 UTC
(In reply to comment #17)
> Hi Daniel,
...of course I ment "Hi Stephan".

As discussed by e-mail, the 100Eur are now donated to the charity organization you mentioned.