Bug 271788

Summary: kde-open ignores/clears $DISPLAY
Product: [Plasma] kde-cli-tools Reporter: Marc Mezzarobba <marc+bugs>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: CONFIRMED ---    
Severity: normal CC: jss, marc+bugs, mpyne, rdieter, simonandric5
Priority: NOR    
Version First Reported In: 5.11.5   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Marc Mezzarobba 2011-04-26 18:04:42 UTC
Version:           2.0 (using KDE 4.6.1) 
OS:                Linux



Reproducible: Always

Steps to Reproduce:
~/tmp$ export DISPLAY=:0.1                                                       
~/tmp$ echo foo > bar
~/tmp$ kde-open bar

Actual Results:  
Editor window opens on display :0.0

Expected Results:  
Editor window opens on display :0.1

OS: Linux (x86_64) release 2.6.39-rc4-amd64
Compiler: gcc
Comment 1 Michael Pyne 2011-04-27 02:24:07 UTC
Confirmed possible, but the fix is more difficult than just fixing a shell script, since kde-open is implemented as a normal KDE program which uses KRun to open the appropriate application, and IIRC KRun uses a D-Bus call to an already-running klauncher.

If the klauncher that is already running has a different DESKTOP setting (which is highly likely) then the window it creates would go to that X server or screen.

Fixing it would be a not-too-difficult exercise IMO but would require some way of passing the appropriate DESKTOP to start from to klauncher (or just bypassing klauncher if the DESKTOP settings are different, etc.)
Comment 2 A_Hooman_Bean 2018-01-01 08:38:56 UTC
Although reported againtst KDE ages ago, this bug is still easy to hit in normal usage scenarios. I'm on Fedora 27, KDE 17.08.1.

I've got kde running in a vncserver, on displpay :15, I go to my main desktop running Xfce on :0, open dolphin, open a file (picture, video, whatever), it's nowehere to be seen. It's been sent to DISPLAY :15

Brilliant.
Comment 3 Michael Pyne 2018-01-04 22:26:44 UTC
Moving to its current code location.