Bug 403784

Summary: ssh X forwarding: clicking a file opens window on remote
Product: [Applications] dolphin Reporter: Abhishek Anand <abhishek.anand.iitg>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: abhishek.anand.iitg, elvis.angelaccio, justin.zobel
Priority: NOR    
Version First Reported In: 18.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Abhishek Anand 2019-01-30 22:27:41 UTC
SUMMARY
When dolphin is opened over SSH X forwarding, clicking on a file (e.g. abc.png) opens the corresponding graphical application on the DISPLAY of the remote machine (DISPLAY=:0) and not on of the SSH client.

STEPS TO REPRODUCE
1. ssh -Y remote
2. dolphin .
3. click on a .png file

OBSERVED RESULT
the gwenview window opens on the remote machine.

EXPECTED RESULT
the gwenview window should open on the client


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: Manjaro
(available in About System)
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
Most likely, it affects all versions of plasma. 
Instead of directly opening the clicked file, it seems dolphin sends a message to plasmashell to open the file; dolphin is not the parent of the new graphical process (e.g. gwenview, the parent is plasmashell.
plasmashell uses DISPLAY=:0. so the new window opens on the remote machine.
https://unix.stackexchange.com/questions/496814/ssh-x-forwarding-gui-window-opens-on-remote?noredirect=1
Comment 1 Justin Zobel 2020-10-27 01:19:41 UTC
Does it change if you set the DISPLAY=: to 1 or whatever number your SSH tunneled app is?
Comment 2 Abhishek Anand 2020-10-29 01:01:14 UTC
just checked and it works correctly now. I'm sshing from a windows 10 pro laptop to my manjaro kde desktop.