Page MenuHomeFreeBSD

Make {t,}csh sessions more xterm friendly
AbandonedPublic

Authored by zarychtam_plan-b.pwste.edu.pl on Sep 23 2021, 12:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 29 2022, 7:49 PM
Unknown Object (File)
Dec 14 2022, 6:03 AM
Subscribers

Details

Reviewers
hselasky
rgrimes
Summary

During the times of home office while working remotely on many FreeBSD hosts at once, it's not so easy to distinguish between the sessions. The proposed patch sets the title of xterm tab to ${HOST}:$cwd helping to figure out which session occupies which xterm window or terminal tab.

Test Plan

Adding three lines to ~/.csrh on the remote machine will help when tcsh or csh is invoked in xterm- family terminal. The only drawback is that it slows down a bit appearing of the command prompt. Since {t,}csh it's not scripting but an interactive login shell it seems to be acceptable.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I mostly use "xfce4-terminal". Will this patch also work for that?

Of course, it works with xfce4-terminal and others including terminal MATE, terminal Gnome, even vanilla xterm.

rgrimes requested changes to this revision.Sep 24 2021, 4:12 PM
rgrimes added a subscriber: rgrimes.

I strongly disagree with adding "site and user specific" tweaks to the dot.cshrc files. Further I note that a huge down side of systems that do this xterm tittle setting create very miss leading situations when the terminal disconnects for any reason (ie your xterm is now local, not remote). Some systems do infact try to clean that up in the logout scripts, but that doesnt work if your disconnected for any other reason. There is already a very clear default prompt setting that shows you the hostname of the system you are logged into.

This revision now requires changes to proceed.Sep 24 2021, 4:12 PM

Thank you for taking the time to take a look at this. It is appreciated. Probably better solution will be to add this as another fortune to /usr/share/games/fortune/freebsd-tips.