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)
Mon, Mar 25, 7:11 PM
Unknown Object (File)
Mon, Mar 25, 6:45 PM
Unknown Object (File)
Feb 23 2024, 11:28 PM
Unknown Object (File)
Feb 16 2024, 6:47 AM
Unknown Object (File)
Dec 24 2023, 12:13 AM
Unknown Object (File)
Dec 21 2023, 9:00 AM
Unknown Object (File)
Dec 20 2023, 12:32 AM
Unknown Object (File)
Dec 12 2023, 5:32 AM

Details

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.