GNOME Bugzilla – Bug 497044
gnome terminal uses wrong DISPLAY on dual-head (non cinerama) systems
Last modified: 2008-06-29 12:59:52 UTC
Please describe the problem: Seen using gnome 2.18.3 and gnome-terminal 2.18.1. Using two screens with DISPLAY of :0.0 and :0.1, a gnome terminal started on one of these sometimes has a DISPLAY of the other. The problem does not affect the terminal itself, but all programs started in the terminal (if they use X). Steps to reproduce: 1. On :0.0 start a gnome-terminal, in the terminal type 'echo $DISPLAY', you should get :0.0 2. On :0.1 start a gnome-terminal, in the terminal type 'echo $DISPLAY', you should get :0.1 3. Repeat 1 and 2, after a few repetitions the DISPLAY echoed is the same on both displays. Closing down the gnome-terminals may make the problem disapear, until you again starts a number of terminals (alternating between the displays). Actual results: see above Expected results: The DISPLAY environment in the gnome-terminal should be the same as the place where it's started. Does this happen every time? After sufficient repetitions, yes Other information: This problem may be related to another problem reported as bug 463361 - where the gnome terminal sometimes changes the DISPLAY. I am only running one X server (one Xorg process).
A ps auxwwe (showing the environment) and grep'ing for the gnome terminal in question shows that the environment of the process has the DISPLAY it shows in the 'echo $DISPLAY'. This implies that either has gnome-terminal changed it's own environment or the gnome-desktop has started the terminal with a wrong environment...
I think this is probably bug 98715: the newly started terminals are created in the first-existing instance, inheriting the DISPLAY variable from it.
*** This bug has been marked as a duplicate of 98715 ***