------------------------------------------------------------------------------ 2009-10-06. A little testing of how different programs cope with the same user's homedirectory being used to run instances on different X11 displays. Stimulated by an experience with OpenOffice. ------------------------------------------------------------------------------ http://www.openoffice.org/issues/show_bug.cgi?id=105615 Situation: 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. Expectation: 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' Finale: 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? ------------------------------------------------------------------------------ So, some testing, with a shared NFS home-directory. Acroread: wow -- works fine! Firefox: one instance per homedir!! When trying to start on another display with the same homedir, e.g. gnu:0 then gnu:3 or diagsim:1 , it brings up a warning with no way of getting around it: 'Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.' OK Annoying and silly, but at least leaves no doubt that it's not going to do anything. Oowriter: = gnu:0 - open = diagsim:0 - try to open here too 'Either another instance of OpenOffice.org is accessing your personal settings or your personal settings are locked. .... make sure user 'nt' closes OpenOfice.org on host 'gnu'. Do you really want to continue? Y N [This is regardless of whether trying to open a file or just open an empty oowriter.] If saying Y to continue, it treats whatever's open on the other display as a file in need of recovery. = gnu:3 - try to open here too Whether opening a file or opening an empty oowriter, the window pops up on the other display, gnu:0, without any warning. Konqueror: fine: no complaint about multiple displays. Kmail: one per homedir: warning about doing more, though doesn't seem to matter when just using imap anyway. Kword: fine: no complaint about multiple displays. ------------------------------------------------------------------------------ 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 OpenOffice.org is accessing your personal settings or your personal settings are locked. .... make sure user 'myname' closes OpenOfice.org 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? ------------------------------------------------------------------------------