SSH X11 forwarding seems to have stopped working
by Uxhamby from LinuxQuestions.org on (#570JJ)
Hi,
Here is something puzzling me:
I have a pretty simple setup w a Linux Mint 19 laptop upstairs and a Raspberry pi in the basement. I used to use SSH X11 forwarding to remotely run graphic apps (file manager / text editor, nothing fancy) in both directions but lately things have changed.
For example, from the console of the raspberry pi today, I can only run 'nemo' the file manager if I do a 'sudo nemo' after establishing an ssh connection as follows:
ssh -X bjh@laptop2.lan
I don't need to be root and would rather just use 'nemo' as my user, which used to work.
I have also had a situation where calling for an X app downstairs would result in the app being launched but reflected locally at the other end instead of over the ssh connection.
I haven't changed anything but for the usual regular os recommended updates and upgrades at both ends.
I have run in verbose mode but don't understand the chatter that comes back, except to recognise that "debug2: channel 2: is dead" etc is likely not optimal. I have reproduced this stream below.
Thoughts or suggestions?
Thanks,
Brian H.
bjh@laptop2:~$ nemo
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 37214
debug2: fd 7 setting O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 37216
debug2: fd 8 setting O_NONBLOCK
debug1: channel 2: new [x11]
debug1: confirm x11
debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: chan_shutdown_write (i0 o1 sock 8 wfd 8 efd -1 [closed])
debug2: channel 2: output drain -> closed
debug1: channel 2: FORCE input drain
debug2: channel 2: ibuf empty
debug2: channel 2: send eof
debug2: channel 2: input drain -> closed
debug2: channel 2: send close
debug2: channel 2: rcvd close
debug2: channel 2: is dead
debug2: channel 2: garbage collecting
debug1: channel 2: free: x11, nchannels 3
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: chan_shutdown_write (i0 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
bjh@laptop2:~$ debug2: channel 1: rcvd close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: x11, nchannels 2


Here is something puzzling me:
I have a pretty simple setup w a Linux Mint 19 laptop upstairs and a Raspberry pi in the basement. I used to use SSH X11 forwarding to remotely run graphic apps (file manager / text editor, nothing fancy) in both directions but lately things have changed.
For example, from the console of the raspberry pi today, I can only run 'nemo' the file manager if I do a 'sudo nemo' after establishing an ssh connection as follows:
ssh -X bjh@laptop2.lan
I don't need to be root and would rather just use 'nemo' as my user, which used to work.
I have also had a situation where calling for an X app downstairs would result in the app being launched but reflected locally at the other end instead of over the ssh connection.
I haven't changed anything but for the usual regular os recommended updates and upgrades at both ends.
I have run in verbose mode but don't understand the chatter that comes back, except to recognise that "debug2: channel 2: is dead" etc is likely not optimal. I have reproduced this stream below.
Thoughts or suggestions?
Thanks,
Brian H.
bjh@laptop2:~$ nemo
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 37214
debug2: fd 7 setting O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 37216
debug2: fd 8 setting O_NONBLOCK
debug1: channel 2: new [x11]
debug1: confirm x11
debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: chan_shutdown_write (i0 o1 sock 8 wfd 8 efd -1 [closed])
debug2: channel 2: output drain -> closed
debug1: channel 2: FORCE input drain
debug2: channel 2: ibuf empty
debug2: channel 2: send eof
debug2: channel 2: input drain -> closed
debug2: channel 2: send close
debug2: channel 2: rcvd close
debug2: channel 2: is dead
debug2: channel 2: garbage collecting
debug1: channel 2: free: x11, nchannels 3
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: chan_shutdown_write (i0 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
bjh@laptop2:~$ debug2: channel 1: rcvd close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: x11, nchannels 2