Skip to content

Commit 8c8f457

Browse files
authored
Add troubleshooting advice for terminfos not installed remotely (#55)
ssh passes the client's value of $TERM to the server by default, and the srcf terminals don't support all terminal types. (e.g. xterm-kitty from the kitty term emulator - and kitty gets picked as the default term emulator by some distros/compositors)
1 parent a5bff8b commit 8c8f457

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

content/reference/shell-and-files/ssh.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,34 @@ please use **doom**, which has fingerprints:
7979
ED25519 SHA256:kh1Sr6Nrlp/vK9ijKZ43/IQ2tqdPzY/fnZdnGBIKgIM
8080
RSA MD5:f1:ee:8c:a7:7a:cb:f7:c7:dc:c5:7e:56:9a:83:f5:bc
8181
RSA SHA256:c1dlaFnPyJ44CnjZIeV6zLHQCPlIH9Og0K3dL16XGfo
82+
83+
84+
## Troubleshooting
85+
86+
### Unsupported term-type environment variable
87+
If the terminal behaves incorrectly on certain keypresses - such as by
88+
outputting weird glyphs, or by not removing characters when inputting a
89+
backspace - then it is possible ssh has misconfigured the `TERM`
90+
environment variable.
91+
92+
This can be checked by running `toe -a | grep $TERM`. (`toe -a` lists
93+
all supported values for the `TERM` variable, and `| grep $TERM`
94+
performs a search within `toe`'s output to try to find your session's
95+
value of `$TERM`). If running the command shows no output, then your
96+
value of `TERM` is unsupported.
97+
98+
You can temporarily select a more general terminal type
99+
(`xterm-256color` should work) for your session by setting the `TERM`
100+
environment variable when running `ssh`:
101+
```bash
102+
TERM=xterm-256color ssh ...
103+
```
104+
To correct this persistently, run the following command (on your
105+
device):
106+
```bash
107+
infocmp -a $TERM | ssh <Your CRSid>@shell.srcf.net tic -x -
108+
```
109+
This will install your device's terminal-type to your account's home
110+
directory (inside `~/.terminfo/`). You will not need to make any manual
111+
changes to contents of this directory. Your terminal should now work
112+
correctly for all subsequent sessions.

content/tutorials/shell-and-files/logging-in.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ complex and multi-layered file system on our shell server, which happens
7878
to be your home directory. `pwd` tells you where you are in this
7979
organized mess!
8080

81+
{{< alert type="info" >}}
82+
If the terminal behaves incorrectly on certain keypresses - such as by
83+
outputting weird glyphs, or by not removing characters when inputting a
84+
backspace - [then it is possible ssh has misconfigured the `TERM`
85+
environment variable.]({{< relref "/reference/shell-and-files/ssh#unsupported-term-type-environment-variable" >}})
86+
{{< /alert >}}
87+
8188
The last command we'll try is `cd public_html`. This **changes your
8289
directory** to `public_html`. You're now on a different street!
8390

0 commit comments

Comments
 (0)