1

I am running dolphin (KDE's file manager) over SSH as follows:

[abhishek@brixpro ~]$ ssh -Y optiplex
[abhishek@optiplex ~]$ dolphin .

The dolphin window opens on the local machine (brixpro). However, in the dolphin window, when I click a PNG file or a text file, they get opened in windows on optiplex (remote) not brixpro. How do I get the windows to open on the local machine (brixpro)?

Both the machines (optiplex and brixpro) are running Manjaro linux.

  • 1
    It should "just work". Do you have anything like export DISPLAY=:0 in your ~/.bashrc on optiplex? If I was debugging this I would get the PNG fle opened via dolphin, log into optiplex, then run "ps -ef" to find the PID of the PNG viewer (say for example it is 5601). I would then use tr '\0' '\n' < /proc/5601/environ | grep DISPLAY to see what it value it has. It should NOT be :0 – icarus Jan 26 at 5:55
  • 1
    So something is setting the DISPLAY environment variable, which is the cause of your issue. The problem is to figure out what the something is. My usual tool for figuring this out is strace, but it can be intimidating so lets try something simpler. We want to see if $DISPLAY is either unset, :0 or somthing followed by a colon followed by something greater than 0, and probably greater than 10. After you use 'ssh -Y', then echo $DISPLAY is localhost:12.0. If in that shell you type bash to run a subshell, does echo $DISPLAY show the same thing or has it changed to :0? – icarus Jan 26 at 6:45
  • 1
    Hmm, so that ruled out something changing an interactive but not login shell. Next test case bash -c env | grep DISPLAY, to check a non-interactive shell. – icarus Jan 29 at 3:14
  • 1
    So not anything set for a non-interactive shell. OK, let us see how dolphin calls gwenview. So get dolphin to launch gwenview, find the PID of dolphin (say 6723), then run pstree -p 6723 and see if there are any intermediate programs between dolphin and gwenview, – icarus Jan 29 at 5:55
  • 1
    OK, I have no idea what plasmashell is. The basic idea is to use the tr '\0' '\n' < /proc/XXXX/environ | grep DISPLAY to see where the value changes from something like localhost:12 to :0. So you can start with gwenview, look at the parent (plasmashell), look at the grandparent and so on. – icarus Jan 30 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.