After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 463361 - gnome-terminal can change the X display it uses
gnome-terminal can change the X display it uses
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
2.18.x
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-04 07:21 UTC by David campbell
Modified: 2008-09-25 19:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description David campbell 2007-08-04 07:21:04 UTC
Please describe the problem:
I have more than one X server running under my account, and more than one gnome-session running under the account, but on different displays.

But in certain instances, gnome changes the DISPLAY to which I am displaying windows.

This proves my point:

[dcampbel@Vigor12 ~]$ export DISPLAY=unix:1000.0
[dcampbel@Vigor12 ~]$ gnome-terminal -e 'sh -c "echo $DISPLAY >/tmp/out"'
[dcampbel@Vigor12 ~]$ cat /tmp/out
:0.0
[dcampbel@Vigor12 ~]$ 

Why should it do that???? 

Steps to reproduce:
1. Start a gnome session
2. Start another gnome session under the same account on a different display
3. In the second gnome session run commands as above


Actual results:
The DISPLAY is changed

Expected results:
I would expect the DISPLAY to stay the same!

Does this happen every time?
no, but most of the time

Other information:
Comment 1 David campbell 2007-08-04 07:23:37 UTC
I'm running on Fedora 7 and configuration is pretty much default in terms of gnome and X settings.
Comment 2 David campbell 2007-08-04 20:42:22 UTC
one further comment, the account .bash_profile, .bashrc and the system /etc/bashrc are completely default from installation, ie they don't set DISPLAY
Comment 3 David campbell 2007-08-05 04:57:07 UTC
Here are some instructions for reproducing this with Xvnc:

1.  Do your normal gnome logon to your desktop
2.  Ensure that the VNC server software is installed - on fedora this is the vnc-server-4.1.2-18.fc7 module from yum
3.  Run vncpasswd under your user account to set up a vnc password
4.  Run this command below to launch the vnc server, but do it from a shell outside of the context of the gnome environment, ie either flick back to text mode with CTRL-SHIFT-F1, or login remotely from another computer via ssh.

Xvnc :1 -desktop Vigor12:1 -auth $HOME/.Xauthority -geometry 1024x768 -depth 24 -rfbwait 30000 -rfbauth $HOME/.vnc/passwd -rfbport 5900 -pn -nolisten tcp &

6.  Then connect your vnc client to port 5900 on the server using the password you set.  You should have a blank X screen visible there.

7.  Back at the commandline where you started Xvnc, run this command to start gnome-session:

DISPLAY=:1 gnome-session &

8.  Then cancel any warnings that come up.

9.  Then start a gnome-terminal.  It comes up ok.

10.  Then start another gnome-terminal.  This one doesn't come up on vnc but goes to the main :0 display even though it was started by the vnc environment.

11.  From the first gnome terminal that started you can run these commands:

[dcampbel@Vigor12 ~]$ set | grep DBUS
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-6hHgZKrM2F,guid=a1ca88ad72653f6fa979500046b54d56
[dcampbel@Vigor12 ~]$ grep -l `set|grep DBUS` ~/.dbus/session-bus/*

[dcampbel@Vigor12 ~]$ echo $DISPLAY
:1.0
[dcampbel@Vigor12 ~]$ gnome-terminal -e 'sh -c "echo $DISPLAY >/tmp/out"'
[dcampbel@Vigor12 ~]$ cat /tmp/out
:0.0


Comment 4 Morten Welinder 2008-04-16 16:50:36 UTC
I would take a guess that this is a special case of bug 98715.
Environment variables are ignored when another gnome-terminal is already
open.
Comment 5 Christian Persch 2008-09-25 19:00:58 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.