Skip to content

Commit

Permalink
Add troubleshooting advice for terminfos not installed remotely (#55)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Seliksi authored Oct 15, 2023
1 parent a5bff8b commit 8c8f457
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions content/reference/shell-and-files/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,34 @@ please use **doom**, which has fingerprints:
ED25519 SHA256:kh1Sr6Nrlp/vK9ijKZ43/IQ2tqdPzY/fnZdnGBIKgIM
RSA MD5:f1:ee:8c:a7:7a:cb:f7:c7:dc:c5:7e:56:9a:83:f5:bc
RSA SHA256:c1dlaFnPyJ44CnjZIeV6zLHQCPlIH9Og0K3dL16XGfo


## Troubleshooting

### Unsupported term-type environment variable
If the terminal behaves incorrectly on certain keypresses - such as by
outputting weird glyphs, or by not removing characters when inputting a
backspace - then it is possible ssh has misconfigured the `TERM`
environment variable.

This can be checked by running `toe -a | grep $TERM`. (`toe -a` lists
all supported values for the `TERM` variable, and `| grep $TERM`
performs a search within `toe`'s output to try to find your session's
value of `$TERM`). If running the command shows no output, then your
value of `TERM` is unsupported.

You can temporarily select a more general terminal type
(`xterm-256color` should work) for your session by setting the `TERM`
environment variable when running `ssh`:
```bash
TERM=xterm-256color ssh ...
```
To correct this persistently, run the following command (on your
device):
```bash
infocmp -a $TERM | ssh <Your CRSid>@shell.srcf.net tic -x -
```
This will install your device's terminal-type to your account's home
directory (inside `~/.terminfo/`). You will not need to make any manual
changes to contents of this directory. Your terminal should now work
correctly for all subsequent sessions.
7 changes: 7 additions & 0 deletions content/tutorials/shell-and-files/logging-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ complex and multi-layered file system on our shell server, which happens
to be your home directory. `pwd` tells you where you are in this
organized mess!

{{< alert type="info" >}}
If the terminal behaves incorrectly on certain keypresses - such as by
outputting weird glyphs, or by not removing characters when inputting a
backspace - [then it is possible ssh has misconfigured the `TERM`
environment variable.]({{< relref "/reference/shell-and-files/ssh#unsupported-term-type-environment-variable" >}})
{{< /alert >}}

The last command we'll try is `cd public_html`. This **changes your
directory** to `public_html`. You're now on a different street!

Expand Down

0 comments on commit 8c8f457

Please sign in to comment.