You are not logged in.
Pages: 1
I have the same problem reported at https://bbs.archlinux.org/viewtopic.php?id=233583.
So I thought that, if I did
TERM=rxvt-256color ssh ...things would work out. And they did.
However, in thread https://bbs.archlinux.org/viewtopic.php?id=230569 it is said very clearly that changing variable TERM is bad. So, what are my options?
changing the terminal emulator I'm using locally
installing the same terminal emulator at the other end
I don't like either of them. Are there others?
Last edited by Gede (2020-04-17 21:58:36)
Offline
You should not set TERM directly. But you can ensure your terminal emulator is properly configured to set it. It is the job of the emulator to set that variable.
What terminal emulator are you using? Urxvt? What's in it's configs (xresources/xdefaults)?
FYI.
Last edited by Trilby (2020-04-16 15:58:13)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If you're using urxvt as your local terminal emulator then you can install the rxvt-unicode-terminfo package on the remote server, no need for the full package.
Offline
I'm using rxvt-unicode-256color, the same as the original poster in the first link.
In the $HOME/.Xresources I can see things related to fonts, colour, history saving, ISO14755 (unicode inputing), keybindings and similar things in the URxvt section. Nothing about the backspace key or URxvt.termName, for example. Pretty boring, actually.
My problem is: what should I do if I don't have admin rights? Would I have to set $TERMINFO to somewhere in $HOME? That would be annoying to maintain at scale.
Looking at the output of infocmp shows only difference in the number of colours supported. I'm hoping that the 256 colours support do not break much, and I could live with the rxvt-unicode termcap by lying about the $TERM. But if it does... how do I run the 88 colours regular rxvt-unicode? I can't seem to find a package for it.
Those were fast replies, BTW. Thank you.
Offline
I had asked which terminal emulator you were running, not what the TERM string was. But I guess it's pretty safe to assume you are using rxvt-unicode from the repos.
I was also asking to see your configs, not just for you to look at them. But again, making some assumptions based on what you did give, the best solution would be to stop setting TERM explicitly, and rather put a URxvt.termName in your xresources or xdefaults so that the terminal itself will set a good TERM.
If you don't want to do that, then actually read the two sentence excerpt I linked you to. There is no need to have root access on the server in order to copy over a single file to the home directory of your user on the server.
Last edited by Trilby (2020-04-16 19:25:56)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm sorry for my misunderstandings, Trilby.
As I'm trying to use this as a learning opportunity, I would like to extend into a few more related questions before marking the thread as solved:
How is changing the URxvt.termName different from setting $TERM? It is my understanding that I would still be using the same terminal emulator under the same guise. My concern is that one affects all instances of rxvt-unicode while the other is limited to what goes on under a single ssh session.
IIRC, debian had different "versions" of rxvt-unicode (and I was under the impression that the 256 colours was a "patched" version of rxvt-unicode; it seems it is now mainlined). It seems Arch provides only one version, since I could not find another version of rxvt-unicode on the standard repository. Could you confirm if, to go with the better-supported termcap version (compiled without the --enable-256-color) I would need to build the package from source?
Last edited by Gede (2020-04-16 22:55:37)
Offline
How is changing the URxvt.termName different from setting $TERM?
It's analogous to the difference between building and installing software with makepkg/pacman vs using `configure; make; make install`. The software might end up under /usr/bin in both cases, but the the latter you've sidestepped the software that supposed to put it there.
When you put a URxvt.termName setting in the xrdb, you are requesting that urxvt use that setting. Urxvt knows about the setting and can use it consistently. Urxvt will then create/export the environment variable TERM which will share this information with any program running in that environment. This is why in one of the previous threads you linked to I noted that TERM really should be a read-only value for the user, but environment variables do not have the capacity to be read only, so we live with it. But a terminal emulator should be the only thing that sets TERM. Everyone/everything else should just check what the setting is.
Could you confirm if, to go with the better-supported termcap version (compiled without the --enable-256-color) I would need to build the package from source?
Double no. I'm not suggesting avoiding using 256 colors, nor am I suggesting rebuilding the package. Just tell Urxvt to use a different termName. You've already found that rxvt-256color works for the server, so why not just use that?
That said, most of the problems of setting TERM come from people exporting it from a shell rc or profile. If you really only use it with ssh as shown in your first post, then the only thing it could affect is what you are doing over ssh ... if there are no problems there then you'd be fine.
Last edited by Trilby (2020-04-16 23:07:26)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1