Issue 105615

Summary: OOo disrespects DISPLAY: opens new window in wrong display
Product: General Reporter: nathaniel_ <ngome>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P2 CC: issues
Version: OOO300m9   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description nathaniel_ 2009-10-05 13:47:33 UTC
An OOo window such as oowriter is open on an X11 display e.g. "hostname:0.0".
The same user, but on another display e.g. "hostname:5.0" (perhaps a vnc 
session or ssh login) then opens another document in OOo.

When an OOo window is called with the environment set to a particular display, 
such as "hostname:5.0", then it should open the requested window on that 
display.  It doesn't matter which user asked it, or what else that user might 
be doing on other displays or hosts: the DISPLAY environment means that that's 
where to open things, and it's very confusing for a user to get no apparent 
response after trying to open a file.

What actually happens:
In the above situation, documents opened from display "hostname:5.0" pop up 
on "hostname:0.0" apparently just because there already was a (separate) OOo 
window open there.  It's not even as though they open in the /same/ window -- 
they just open separately, but on that wrong display.

Previous bug reports:
I see that this has already been mentioned some years ago:
  #57905  'Writer window opens in wrong display'
and an apparently similar problem with the minor number in the display 
(e.g. "hostname:0.1") has also been brought up:
  #71657  'New windows open on the "wrong" display'
  #81872  'X11 - some documents open in wrong display'

Perhaps some wrong decisions long ago have made it very hard to change, for 
what is probably not a very frequently noticed problem.  I'd understand this.  
But really, this matter of display use is very fundamental: /thousands/ of 
applications cope with it fine, realising that one should always regard the 
host:display.screen (or at least host:display) as the thing that defines a 
particular session, not just hostname:user.  One might expect funny behaviour 
from the occasional proprietary program ported from e.g. ms-windows; but not 
from something as mainstream as openoffice.  Is this 'framework' matter still 
considered to be irredeemable?
Comment 1 2009-10-06 11:14:00 UTC
afaik the following constraints exist:
* a OOo user installation (~/.openoffice) can only be used by one running
instance of OOo at any one time
* a running instance of OOo can connect to at most one DISPLAY

given these constraints, launching OOo is implemented as looking if there is
already a running instance of OOo that is using the user installation, and
re-using that instance in that case.
of course that instance will then use whatever DISPLAY it was started with.

so it seems to me currently if you reliably want to use OOo instances on
distinct DISPLAYs concurrently, you need distinct user installations for each

btw, iirc various mozilla programs (firefox, thunderbird) work similarly.
Comment 2 nathaniel_ 2009-10-08 13:45:51 UTC
Yes, true: it does seem that one would need separate homedirs for using separate
displays, with openoffice as it currently is.  
There are, apparently, 'good' ways of writing X11 programs so that there aren't
such restrictions, but I well appreciate that fixing this properly would take
lots of work for situation that the vast majority of users won't ever meet
(multiple displays).  But there is a (relatively) simple change that would make
the current behaviour much less confusing.

It's true that mozilla programs (at least, firefox) also can't cope with more
than one instance per homedir; they seem to require all windows of that instance
to be on one display.  If firefox is run from one display (e.g. 0) when already
running on another (e.g. 5), then instead of opening the requested window on
display 5, invisible to the user on display 0, it will pop up a warning on
display 0 to say that it's "already running .. not responding .. etc.".   It's
not a very helpful message, as it makes it sound as though one needs to kill all
firefoxes or reboot, not just that it's already open elsewhere.  Mozilla things
are indeed silly and annoying in several ways that seem to have come from
ms-style systems ...

KDE's konqueror browser, Adobe's acroread and many others all happily cope with
multiple displays on one homedir, by using the display name to distinguish
between instances. 

OOo has different behaviour depending on whether one tries it on two displays on
the same host, or two on different hosts (with shared homedir).   In the case of
different hosts, e.g. displays hosta:0 and hostb:0 , an attempt at opening a
second instance of OOo results in a helpful warning message:
        "Either another instance of is accessing
        your personal settings or your personal settings are locked.
        ....  make sure user 'myname' closes on host 'hosta'.
        Do you really want to continue?"
It is only when the two displays are on the same host that the confusing
behaviour occurs, where the requested window silently opens on another display
that the user can't see.  

So, as a way to avoid confusing behaviour, but without making OOo able to cope
with multiple displays, would it be possible to identify the situation where a
running instance and a new request are on different displays on the same host,
and to give a warning message that if the user continues then the new window
will be on another display?

Comment 3 elgaard 2009-10-20 21:22:01 UTC
Just ignoring $DISPLAY and launching a window on the display of existing windows is the
wrong thing to do. And very confusing.

I had to ssh to my wifes laptop while she was traveling to fix something with OOo. It took
me some time to realize the problem and kill all her OO programs. Of course I left one OO
window open, so when needed to use OOo she could not open anything, because it went to
my computer (in another timezone, so I did not notice).

Running as another user would defeat the purpose of checking her setup.

Comment 4 soitlab 2009-10-28 19:02:11 UTC
I was about the submit the described behaviour as a new bug but then found that
this already exists here, so I just append my experience and comments here:

 Openoffice opens windows always  on the same X display as the first OpenOffice
application window

 After an Openoffice (3.1.1) application window has been opened in some
X-display for example, DISPLAY=:0.0 or DISPLAY=:0.1 in dual screen setup (no
Xinerama) each additional Openoffice window always opens up in the same X
display as the first one. 

STEPS-TO-REPRODUCE: some Openoffice document on any X-display in multi screen setup environment
2.the OO-application opens up corretly on the specified X-screen
3. open another Openoffice window with using the DISPLAY variable or CLI
-display option specifying some other X-display

Openoffice application opens the window on the same (and incorrect) X-screen as
the first one.

The Openoffice application window should open up on the other specified X-screen
(different than the already opened one).
As its seems that it is not possible (and not even desirable) to start another
Openoffice-process for this, the running application should be able to open
different document windows (wheter they are Writer, Calc or Impress windows) to
different X-displays.

This bug was detected on: 
- DELL D820-laptop running Ubuntu 9.04
- DM: Gnome 2.20.10 (Metacity WM) on Nvidia G72M graphics card(GeForce Go 7400)
- 3.1.1, OOO310m19 (Build:9420), 
- OO-package: 1:3.1.1-1ubuntu1jaunty
- Xorg-server: 1.6.0 (2009-2-25), 
- X-package: xorg-server 2:1.6.0-0ubuntu14

As a further note,  other X-applications like Gnome-terminal, Emacs and even
Firefox (using different profiles atleast) are able to open different windows to
different X-displays.

Even if Mozilla-suite does not cope with this as well as it could be handeled
(like Emacs for example), this does not mean that OpenOffice could not perform
better in this regard.

Also, I really would like to know what (technigal) design decision or
implementation detail really restricts running OpenOffice instrance to connet to
only one X-display (as stated by mst above)

Cheers for all, and wishing for some constructive decisions to be made to
overcome this limitation of not being able to use multiple X-screens with

Comment 5 sesshomurai 2010-06-11 22:46:12 UTC
I verify this is an issue.

I am trying to launch multiple OOo writer apps on different displays. Its not 
possible because the -display :x parameter is ignored.

I tried specifying a new user dir when launching OOo and in that situation, it 
did not even come up at all. Version 3.2ish.

Since I am not able to run on different displays, what is the true meaning of -
display ? Just curious.
Comment 6 sesshomurai 2010-06-11 22:47:17 UTC
*** Issue 105615 has been confirmed by votes. ***