diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-05 10:37:37 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-05 10:37:37 +0000 |
commit | dd0e1324ba360c87d773209290fe4900ac39395e (patch) | |
tree | fb66e0ac601638b4c2e8859f74d032516e4c30dd /share/skel | |
parent | 83ad38643cd794360e4c6ba3fb11d35835a0540f (diff) | |
download | src-dd0e1324ba360c87d773209290fe4900ac39395e.tar.gz src-dd0e1324ba360c87d773209290fe4900ac39395e.zip |
Run "resizewin -z" from the default shell profile files. This makes
the terminal work properly out of the box when logging over a serial
line, which is quite important for the user experience on boards like
Raspberry Pi. It doesn't affect cases where the terminal size is
already non-zero, such as SSH or vt(4) sessions.
Note that this doesn't handle a scenario pointed out by rgrimes@:
when the terminal is resized after login, the terminal size won't
get updated even after logging out and back in.
Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10642
Notes
Notes:
svn path=/head/; revision=320670
Diffstat (limited to 'share/skel')
-rw-r--r-- | share/skel/dot.login | 1 | ||||
-rw-r--r-- | share/skel/dot.profile | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/share/skel/dot.login b/share/skel/dot.login index 170d25c7dc10..653a473969ee 100644 --- a/share/skel/dot.login +++ b/share/skel/dot.login @@ -5,4 +5,5 @@ # see also csh(1), environ(7). # +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips diff --git a/share/skel/dot.profile b/share/skel/dot.profile index ad66198ce5e8..b333ba02a885 100644 --- a/share/skel/dot.profile +++ b/share/skel/dot.profile @@ -21,4 +21,7 @@ PAGER=more; export PAGER # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV +# Query terminal size; useful for serial lines. +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi |