svn commit: r320670 - in head: etc/root share/skel

Edward Tomasz Napierala trasz at FreeBSD.org
Wed Jul 5 10:37:38 UTC 2017


Author: trasz
Date: Wed Jul  5 10:37:37 2017
New Revision: 320670
URL: https://svnweb.freebsd.org/changeset/base/320670

Log:
  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

Modified:
  head/etc/root/dot.login
  head/etc/root/dot.profile
  head/share/skel/dot.login
  head/share/skel/dot.profile

Modified: head/etc/root/dot.login
==============================================================================
--- head/etc/root/dot.login	Wed Jul  5 10:29:05 2017	(r320669)
+++ head/etc/root/dot.login	Wed Jul  5 10:37:37 2017	(r320670)
@@ -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

Modified: head/etc/root/dot.profile
==============================================================================
--- head/etc/root/dot.profile	Wed Jul  5 10:29:05 2017	(r320669)
+++ head/etc/root/dot.profile	Wed Jul  5 10:37:37 2017	(r320670)
@@ -8,3 +8,5 @@ TERM=${TERM:-xterm}
 export TERM
 PAGER=more
 export PAGER
+
+if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi

Modified: head/share/skel/dot.login
==============================================================================
--- head/share/skel/dot.login	Wed Jul  5 10:29:05 2017	(r320669)
+++ head/share/skel/dot.login	Wed Jul  5 10:37:37 2017	(r320670)
@@ -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

Modified: head/share/skel/dot.profile
==============================================================================
--- head/share/skel/dot.profile	Wed Jul  5 10:29:05 2017	(r320669)
+++ head/share/skel/dot.profile	Wed Jul  5 10:37:37 2017	(r320670)
@@ -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


More information about the svn-src-all mailing list