aboutsummaryrefslogtreecommitdiff
path: root/etc/root
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-05 10:37:37 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-05 10:37:37 +0000
commitdd0e1324ba360c87d773209290fe4900ac39395e (patch)
treefb66e0ac601638b4c2e8859f74d032516e4c30dd /etc/root
parent83ad38643cd794360e4c6ba3fb11d35835a0540f (diff)
downloadsrc-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 'etc/root')
-rw-r--r--etc/root/dot.login3
-rw-r--r--etc/root/dot.profile2
2 files changed, 5 insertions, 0 deletions
diff --git a/etc/root/dot.login b/etc/root/dot.login
index a849b68dbb41..b680705d017f 100644
--- a/etc/root/dot.login
+++ b/etc/root/dot.login
@@ -5,5 +5,8 @@
# see also csh(1), environ(7).
#
+# Query terminal size; useful for serial lines.
+if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z
+
# Uncomment to display a random cookie each login:
# if ( -x /usr/bin/fortune ) /usr/bin/fortune -s
diff --git a/etc/root/dot.profile b/etc/root/dot.profile
index 1656b9b214bb..8844a205b480 100644
--- a/etc/root/dot.profile
+++ b/etc/root/dot.profile
@@ -8,3 +8,5 @@ TERM=${TERM:-xterm}
export TERM
PAGER=more
export PAGER
+
+if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi