From: Hugo Villeneuve Date: Tue, 23 Sep 2025 19:01:31 +0000 (-0400) Subject: Add screen to all images X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=4d61cabaff89af7cb4b9c50c3f90e900d32df255;p=yocto%2Fmeta-hvmpd.git Add screen to all images Signed-off-by: Hugo Villeneuve --- diff --git a/conf/distro/hvmpd.conf b/conf/distro/hvmpd.conf index 5f7d61c..9cee3eb 100644 --- a/conf/distro/hvmpd.conf +++ b/conf/distro/hvmpd.conf @@ -38,6 +38,7 @@ SOUND_CARD ?= "default" SWU_PRESERVE_FILES ?= "\ /root/.bash_history \ /root/.hv-rsync.conf \ + /root/.screenrc \ /etc/hostname \ /etc/localtime \ /etc/ssh/ssh_host_ecdsa_key \ diff --git a/recipes-core/images/include/image-hvmpd-common.inc b/recipes-core/images/include/image-hvmpd-common.inc index acbe3c1..ba1da71 100644 --- a/recipes-core/images/include/image-hvmpd-common.inc +++ b/recipes-core/images/include/image-hvmpd-common.inc @@ -18,6 +18,7 @@ IMAGE_INSTALL:append = " \ ethtool \ nfs-utils \ rsync \ + screen \ " # Boot files: diff --git a/recipes-extended/screen/screen/user-screenrc b/recipes-extended/screen/screen/user-screenrc new file mode 100644 index 0000000..62848a0 --- /dev/null +++ b/recipes-extended/screen/screen/user-screenrc @@ -0,0 +1,31 @@ +# Replace default CTRL+a with CTRL+j +escape ^Jj + +# By default, the first screen window is 0. +# Change it to be 1: +bind c screen 1 +bind ^c screen 1 +bind 0 select 10 +screen 1 + +# Bind F11 and F12 (NOT F1 and F2) to previous and next screen window +bindkey -k F1 prev +bindkey -k F2 next + +# Turn off the welcome message +startup_message off + +# Disable visual bell +vbell off + +# Set scrollback buffer to 10000 +defscrollback 10000 + +# Customize the status line +hardstatus alwayslastline +hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]' + +# Use X scrolling mechanism +# The scroll buffer of GNU Screen can be accessed with Ctrl+a [. However, this +# is very inconvenient. To use the scroll bar of e.g. xterm or Konsole: +termcapinfo xterm* ti@:te@ diff --git a/recipes-extended/screen/screen_%.bbappend b/recipes-extended/screen/screen_%.bbappend new file mode 100644 index 0000000..faa7d98 --- /dev/null +++ b/recipes-extended/screen/screen_%.bbappend @@ -0,0 +1,14 @@ +FILESEXTRAPATHS:prepend:hvmpd := "${THISDIR}/${PN}:" + +SRC_URI:append:hvmpd = " \ + file://user-screenrc \ +" + +do_install:append:hvmpd() { + install -d ${D}${ROOT_HOME} + install -m 644 ${WORKDIR}/user-screenrc ${D}${ROOT_HOME}/.screenrc +} + +FILES:${PN}:append:hvmpd = "\ + ${ROOT_HOME}/.screenrc \ +"