Using putty on windows to ssh into my arch linux desktop.

Only interested in remote editing via emacs tramp so don't need gui.

Can successfully connect through putty/eshell but when I do, it starts a new x server and all my stuff that was open on desktop disappears until I kill the connection.

When it connects it displays the startup text:

plink -ssh user@xxx.xx.x.x
Last login: Sun Jan 15 14:47:30 2017 from xxx.xx.x.x

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.5.4-1-ARCH x86_64 
Current Operating System: Linux archserver 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=xxxxx
Build Date: 19 July 2016  05:54:24PM

Current version of pixman: 0.34.0
  Before reporting problems, check http://wiki.x.org
  to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
  (++) from command line, (!!) notice, (II) informational,
  (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sun Jan 15 14:48:36 2017
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
01/15/17 14:48:37 - ERROR: Could not translate string to key symbol: "-"
01/15/17 14:48:37 - ERROR: Could not translate string to key symbol: "="
[libi3] ../../i3-4.13/libi3/font.c Using Pango font Source Code Pro, size 8
[libi3] ../../i3-4.13/libi3/font.c X11 root window dictates 106.947368 DPI
i3status: trying to auto-detect output_format setting
i3status: auto-detected "i3bar"

And then it just echos back any text I enter. If I'm in putty and C-c then the x server is killed and everything returns as it was, except I'm properly sshed in and can run any commands and see their effect appropriately. But doing the same in emacs just kills the connection entirely.

I have #X11Forwarding no in /etc/ssh/sshd_config.

I'm very new to this so if my terminology is wrong or not enough information I'm glad to update.


I think you have added startx (or a similar command) to one of your shell configuration files.

Try discovering which one with:

grep startx .*

Then remove the command that starts X upon login, and the ssh issue should disappear.

It is usually better to start X by using a display manager, like gdm or one of the more lightweight alternatives.

| improve this answer | |
  • 1
    Thanks - in my .bash_profile I had the lines:if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then startx fi . Can't recall yet why I included that. – Eric Kaschalk Jan 15 '17 at 20:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.