0

My main computer runs under Ubuntu 16.04. I just installed Raspbian Stretch-Lite on a RPi 3B and try to access it through the network. I installed emacs, xterm and mate-terminal.

From my Ubuntu, ssh -X pi@192.168.8.121 xterm works fine: I'm requested to give the password and I see the xterm window displayed on the screen. The same holds for emacs. Yet ssh -X pi@192.168.8.121 mate-terminal fails: after providing the passwords there is a short delay of one second and I get the prompt back without anything on the screen.

I had a look at /var/log/auth which shows on line 04 why I don't get anything on the screen: while using mate-terminal I get disconnected for some reason while I don't get disconnected using xterm or emacs.

01 Aug 15 14:05:04 rpi-01 sshd[4572]: Accepted password for pi from 192.168.8.103 port 54746 ssh2
02 Aug 15 14:05:04 rpi-01 sshd[4572]: pam_unix(sshd:session): session opened for user pi by (uid=0)
03 Aug 15 14:05:04 rpi-01 systemd-logind[341]: New session c21 of user pi.
04 Aug 15 14:05:05 rpi-01 sshd[4584]: Received disconnect from 192.168.8.103 port 54746:11: disconnected by user
05 Aug 15 14:05:05 rpi-01 sshd[4584]: Disconnected from 192.168.8.103 port 54746
06 Aug 15 14:05:05 rpi-01 sshd[4572]: pam_unix(sshd:session): session closed for user pi
07 Aug 15 14:05:05 rpi-01 systemd-logind[341]: Removed session c21.

Any idea ?

Update to answer the question from @Ingo

After login on the pi with ssh -vv -X pi@192.168.8.121 and issuing mate-terminal, I get

pi@rpi-01> mate-terminal
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from ::1 55300
debug2: fd 8 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 ::1 55302
debug2: fd 9 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: close_write
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: close_write
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
/home/pi
pi@rpi-01> debug2: channel 1: rcvd close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: x11, nchannels 2

If I do the same with xterm, the output is different:

pi@rpi-01> xterm
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from ::1 55304
debug2: fd 8 setting O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug2: channel 1: rcvd adjust 38628
debug2: channel 1: rcvd adjust 49152
... Many lines like this one
debug2: channel 1: rcvd adjust 33684
debug2: channel 1: window 2047856 sent adjust 49296
--> Here the xterm opens

For mate-terminal the lines below appear twice

debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from ::1 55300
debug2: fd 8 setting O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11

Then, it looks like the RPi side doesn't send any data and thus there's nothing to read

debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: close_write
debug2: channel 2: output drain -> closed

and all the links are closed.

Just as a reminder, what is installed on the RPi is the Raspbian Stretch-Lite, meaning the bare minimum, without X11 and all that stuff. I installed the additional softwares by hand : sudo apt install xterm mate-terminal. Maybe there is some missing stuff on the RPi side to have mate-terminal working properly...

  • My simple test to try to duplicate the problem went fine, with the mate-terminal window appearing on my local display. However, I do get the disconnected by user message in my remote /var/log/auth.log when I try a command that does not exist on the remote side... perhaps mate-terminal is not installed? ... try ssh pi@192.168.8.121 which mate-terminal – RubberStamp Aug 15 '18 at 12:24
  • If it hadn't been installed, you'd get: ssh -X pi@192.168.8.121 toto -> bash: toto: command not found. But anyway, I checked: it is installed. – mszmurlo Aug 15 '18 at 14:02
  • Are there any aliases set up... ssh xxx@xxx alias ... any other command combinations that may cause the command on the remote machine to exit? The reason the ssh session closes is because the command has finished... thus the disconnected by user in auth.log – RubberStamp Aug 15 '18 at 14:08
  • What gives you the verbose output with ssh -vv -X pi@192.168.8.121 mate-terminal (double v)? – Ingo Aug 16 '18 at 19:28

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.