Bug 156365 - ignores --display option and DISPLAY environment variable, always open on :0.0
Summary: ignores --display option and DISPLAY environment variable, always open on :0.0
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-22 11:02 UTC by Atle
Modified: 2008-09-22 04:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Atle 2008-01-22 11:02:59 UTC
Version:           2.0 (using KDE 4.0.0)
Installed from:    Gentoo Packages
Compiler:          gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2) 
OS:                Linux

konqueror --display :0.1 will open konqueror on my second display
konsole --display :0.1 will open konsole on my first display

export DISPLAY=:0.1
konqueror will now open on second display
konsole will open on first display

When now konsole has opened:
$ env | grep DISPLAY
DISPLAY=:0.0
Comment 1 Robert Knight 2008-01-22 12:17:40 UTC
I take it you are launching Konsole from within Konsole itself?  In that case, this has the same cause as bug #155340

When running Konsole from an xterm with --display :0.1 (which doesn't exist on my system), kdelibs failed ungracefully:

> /media/usbdisk/robert/kde4/src/kdelibs/kdeui/windowmanagement/kwindowsystem_x11.cpp:276
> sprintf( net_wm_cm_name, "_NET_WM_CM_S%d", DefaultScreen( dpy ));

Called from:

> /media/usbdisk/robert/kde4/src/kdebase/apps/konsole/src/main.cpp:81
> 81              if ( KWindowSystem::compositingActive()
Comment 2 Atle 2008-01-22 13:02:21 UTC
On my system, no matter were I launch konsole from, it opens on :0.0
I now tried from an xterm running on :0.1 and I tried from the plasma application launcher which I've managed to get to show up on :0.1. The result is the same.
Comment 3 Robert Knight 2008-01-22 13:07:59 UTC
> On my system, no matter were I launch konsole from, it opens on :0.0 

Do you already have Konsole running on :0.0 before trying to open it on :0.1?  At present, once Konsole has been started on a particular display, any new instances will be part of the same process and will start on the same display.
Comment 4 Atle 2008-01-22 13:27:27 UTC
I did, I closed all of them and started a konsole from :0.1 and from :0.0 with DISPLAY set to :0.1. And you were right, in both cases konsole opens on :0.1 as expected.
Comment 5 Robert Knight 2008-04-12 10:20:09 UTC
Should be fixed by SVN commit r795982.  When Konsole is started from the terminal it always uses a new process so it should respect the value of $DISPLAY in the parent processes environment.
Comment 6 Robert Knight 2008-09-22 04:31:58 UTC
Marking as fixed as per comment #5