From b3f815469bf9520ce0f19c6fa1fad6c17045d3d2 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 8 Apr 2021 21:40:19 +0200 Subject: [PATCH] committing changes in /etc made by "apt install -y byobu screen tmux pastebinit ccze" Package changes: +byobu 5.112-1.1 all +ccze 0.2.1-4+b1 amd64 +libevent-2.1-6 2.1.8-stable-4 amd64 +libutempter0 1.1.6-3 amd64 +pastebinit 1.5-2 all +python-newt 0.52.20-8 amd64 +screen 4.6.2-3+deb10u1 amd64 +tmux 2.8-3 amd64 --- .etckeeper | 9 ++- byobu/backend | 4 ++ byobu/socketdir | 11 ++++ cczerc | 96 +++++++++++++++++++++++++++++ init.d/screen-cleanup | 49 +++++++++++++++ profile.d/Z97-byobu.sh | 41 +++++++++++++ rcS.d/S01screen-cleanup | 1 + screenrc | 108 +++++++++++++++++++++++++++++++++ shells | 2 + tmpfiles.d/screen-cleanup.conf | 1 + 10 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 byobu/backend create mode 100644 byobu/socketdir create mode 100644 cczerc create mode 100755 init.d/screen-cleanup create mode 100644 profile.d/Z97-byobu.sh create mode 120000 rcS.d/S01screen-cleanup create mode 100644 screenrc create mode 100644 tmpfiles.d/screen-cleanup.conf diff --git a/.etckeeper b/.etckeeper index 5cf3ab2..fa0a3e4 100755 --- a/.etckeeper +++ b/.etckeeper @@ -33,7 +33,6 @@ mkdir -p './security/limits.d' mkdir -p './security/namespace.d' mkdir -p './systemd/network' mkdir -p './systemd/user' -mkdir -p './tmpfiles.d' mkdir -p './udev/hwdb.d' maybe chmod 0755 '.' maybe chmod 0644 '.ackrc' @@ -137,11 +136,15 @@ maybe chmod 0640 'bind/rndc.key' maybe chmod 0644 'bind/zones.rfc1918' maybe chmod 0644 'bindresvport.blacklist' maybe chmod 0755 'binfmt.d' +maybe chmod 0755 'byobu' +maybe chmod 0644 'byobu/backend' +maybe chmod 0644 'byobu/socketdir' maybe chmod 0755 'ca-certificates' maybe chmod 0644 'ca-certificates.conf' maybe chmod 0755 'ca-certificates/update.d' maybe chmod 0755 'calendar' maybe chmod 0644 'calendar/default' +maybe chmod 0644 'cczerc' maybe chmod 0755 'chrony' maybe chmod 0644 'chrony/chrony.conf' maybe chmod 0640 'chrony/chrony.keys' @@ -395,6 +398,7 @@ maybe chmod 0755 'init.d/qemu-guest-agent' maybe chmod 0755 'init.d/rsync' maybe chmod 0755 'init.d/rsyslog' maybe chmod 0755 'init.d/salt-minion' +maybe chmod 0755 'init.d/screen-cleanup' maybe chmod 0755 'init.d/ssh' maybe chmod 0755 'init.d/sudo' maybe chmod 0755 'init.d/udev' @@ -607,6 +611,7 @@ maybe chmod 0755 'ppp/ip-up.d/chrony' maybe chmod 0755 'ppp/ip-up.d/postfix' maybe chmod 0644 'profile' maybe chmod 0755 'profile.d' +maybe chmod 0644 'profile.d/Z97-byobu.sh' maybe chmod 0644 'profile.d/Z99-cloud-locale-test.sh' maybe chmod 0644 'profile.d/bash_completion.sh' maybe chmod 0644 'profile.d/fbrehm.sh' @@ -657,6 +662,7 @@ maybe chmod 0644 'salt/pki/minion/minion.pub' maybe chmod 0644 'salt/pki/minion/minion_master.pub' maybe chmod 0644 'salt/proxy' maybe chmod 0755 'salt/proxy.d' +maybe chmod 0644 'screenrc' maybe chmod 0644 'securetty' maybe chmod 0755 'security' maybe chmod 0644 'security/access.conf' @@ -740,6 +746,7 @@ maybe chmod 0755 'terminfo' maybe chmod 0644 'terminfo/README' maybe chmod 0644 'timezone' maybe chmod 0755 'tmpfiles.d' +maybe chmod 0644 'tmpfiles.d/screen-cleanup.conf' maybe chmod 0644 'ucf.conf' maybe chmod 0755 'udev' maybe chmod 0755 'udev/hwdb.d' diff --git a/byobu/backend b/byobu/backend new file mode 100644 index 0000000..d71e61c --- /dev/null +++ b/byobu/backend @@ -0,0 +1,4 @@ +# BYOBU_BACKEND can currently be "screen" or "tmux" +# Override this on a per-user basis by editing "$BYOBU_CONFIG_DIR/backend" +# or by launching either "byobu-screen" or "byobu-tmux" instead of "byobu". +BYOBU_BACKEND="tmux" diff --git a/byobu/socketdir b/byobu/socketdir new file mode 100644 index 0000000..05ab041 --- /dev/null +++ b/byobu/socketdir @@ -0,0 +1,11 @@ +# Set the location of the socket directory that byobu will use. +# On Debian/Ubuntu systems, this is in /var/run/screen, but on +# other distros, it might be elsewhere, such as /tmp/screens +# depending on your compilation. +# +# This file will be sourced by both shell scripts and python code, +# so please ensure that: +# * the variable name is SOCKETDIR +# * there is no space around the "=" +# * and that the path value is quoted +SOCKETDIR="/var/run/screen" diff --git a/cczerc b/cczerc new file mode 100644 index 0000000..0d1b4be --- /dev/null +++ b/cczerc @@ -0,0 +1,96 @@ +# Configuration file for ccze +# +# Available 'pre' attributes: bold, underline, underscore, blink, reverse +# Available colors: black, red, green, yellow, blue, magenta, cyan, white +# Available bgcolors: on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white +# +# You can also use item names in color definition, like: +# +# default blue +# date 'default' +# +# Here you defined default color to blue, and date color to default value's color, so +# your date color is blue. (You can only use predefined item names!) + +# item color # comment (what is color, or why it's that ;) + +date bold cyan # Dates and times +host bold blue # Host names and IP numbers +process green # Sender process +pid bold white # PIDs (Process IDs) +pid-sqbr bold green # Brackets around PIDs +default cyan # Default (not colorised) +email bold green # E-mail addresses +subject magenta # Subject lines (procmail) +dir bold cyan # Directory names +file bold cyan # File names +size bold white # Sizes +user bold yellow # Usernames +httpcodes bold white # HTTP status codes (200, 404, etc) +getsize magenta # Transfer sizes +get green # HTTP GET +post bold green # HTTP POST +head green # HTTP HEAD +put bold green # HTTP PUT +connect green # HTTP CONNECT +trace green # HTTP TRACE +unknown cyan # Unknown message +gettime bold magenta # Transfer times +uri bold green # URIs (http://, ftp://, etc) +ident bold white # Remote user (proxy/http) +ctype white # Content type (http/proxy) +error bold red # Error messages +miss red # Proxy MISS +hit bold yellow # Proxy HIT +deny bold red # Proxy DENIED +refresh bold white # Proxy REFRESH +swapfail bold white # Proxy SWAPFAIL +debug white # Debug messages +warning red # Warnings +direct bold white # Proxy DIRECT +parent bold yellow # Proxy PARENT +swapnum blue on_white # Proxy swap number +create bold white # Proxy CREATE +swapin bold white # Proxy SWAPIN +swapout bold white # Proxy SWAPOUT +release bold white # Proxy RELEASE +mac bold white # MAC addresses +version bold white # Version numbers +address bold white # Memory addresses +numbers white # Numbers +signal bold yellow # Signal names +service bold magenta # Services +prot magenta # Protocols +bad bold yellow # "Bad words" +good bold green # "Good words" +system bold cyan # "System words" +incoming bold white # Incoming mail (exim) +outgoing white # Outgoing mail (exim) +uniqn bold white # Unique ID (exim) +repeat white # 'last message repeated N times' +field green # RFC822 Field +chain cyan # Chain names (ulogd) +percentage bold yellow # Percentages +ftpcodes cyan # FTP codes +keyword bold yellow # Various keywords (like PHP in php.log, etc) +pkgstatus green # package status (dpkg) +pkg bold red # package name (dpkg) + +# CSS codes for the HTML output +cssblack black +cssboldblack black +cssred darkred +cssboldred red +cssgreen #00C000 +cssboldgreen lime +cssyellow brown +cssboldyellow yellow +cssblue blue +cssboldblue slateblue +csscyan darkcyan +cssboldcyan cyan +cssmagenta darkmagenta +cssboldmagenta magenta +csswhite grey +cssboldwhite white +cssbody #404040 diff --git a/init.d/screen-cleanup b/init.d/screen-cleanup new file mode 100755 index 0000000..3eb4185 --- /dev/null +++ b/init.d/screen-cleanup @@ -0,0 +1,49 @@ +#!/bin/sh +# $Id: init,v 1.3 2004/03/16 01:43:45 zal Exp $ +# +# Script to remove stale screen named pipes on bootup. +# + +### BEGIN INIT INFO +# Provides: screen-cleanup +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: +# Short-Description: screen sessions cleaning +# Description: Cleans up the screen session directory and fixes its +# permissions if needed. +### END INIT INFO + +set -e + +test -f /usr/bin/screen || exit 0 + +SCREENDIR=/run/screen + +case "$1" in +start) + if test -L $SCREENDIR || ! test -d $SCREENDIR; then + rm -f $SCREENDIR + mkdir $SCREENDIR + chown root:utmp $SCREENDIR + [ -x /sbin/restorecon ] && /sbin/restorecon $SCREENDIR + fi + find $SCREENDIR -type p -delete +# If the local admin has used dpkg-statoverride to install the screen +# binary with different set[ug]id bits, change the permissions of +# $SCREENDIR accordingly + BINARYPERM=`stat -c%a /usr/bin/screen` + if [ "$BINARYPERM" -ge 4000 ]; then + chmod 0755 $SCREENDIR + elif [ "$BINARYPERM" -ge 2000 ]; then + chmod 0775 $SCREENDIR + else + chmod 1777 $SCREENDIR + fi + ;; +stop|restart|reload|force-reload) + ;; +esac + +exit 0 diff --git a/profile.d/Z97-byobu.sh b/profile.d/Z97-byobu.sh new file mode 100644 index 0000000..51b2887 --- /dev/null +++ b/profile.d/Z97-byobu.sh @@ -0,0 +1,41 @@ +# Z97-byobu.sh - allow any user to opt into auto-launching byobu +# Copyright (C) 2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Allow any user to opt into auto-launching byobu by setting LC_BYOBU=1 +# Apologies for borrowing the LC_BYOBU namespace, but: +# a) it's reasonable to assume that no one else is using LC_BYOBU +# b) LC_* is sent and receieved by most /etc/ssh/ssh*_config + +if [ -r "/usr/bin/byobu-launch" ]; then + if [ "$LC_BYOBU" = "0" ]; then + true + elif [ "$LC_BYOBU" = "1" ]; then + . /usr/bin/byobu-launch + elif [ -e "/etc/byobu/autolaunch" ]; then + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu" ]; then + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu-screen" ]; then + export BYOBU_BACKEND="screen" + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu-tmux" ]; then + export BYOBU_BACKEND="tmux" + . /usr/bin/byobu-launch + fi +fi + +# vi: syntax=sh ts=4 noexpandtab diff --git a/rcS.d/S01screen-cleanup b/rcS.d/S01screen-cleanup new file mode 120000 index 0000000..205268c --- /dev/null +++ b/rcS.d/S01screen-cleanup @@ -0,0 +1 @@ +../init.d/screen-cleanup \ No newline at end of file diff --git a/screenrc b/screenrc new file mode 100644 index 0000000..032db64 --- /dev/null +++ b/screenrc @@ -0,0 +1,108 @@ +# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# + +# ------------------------------------------------------------------------------ +# SCREEN SETTINGS +# ------------------------------------------------------------------------------ + +#startup_message off +#nethack on + +#defflow on # will force screen to process ^S/^Q +deflogin on +#autodetach off + +# turn visual bell on +vbell on +vbell_msg " Wuff ---- Wuff!! " + +# define a bigger scrollback, default is 100 lines +defscrollback 1024 + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off +bind } history + +# An example of a "screen scraper" which will launch urlview on the current +# screen window +# +#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview" + +# ------------------------------------------------------------------------------ +# TERMINAL SETTINGS +# ------------------------------------------------------------------------------ + +# The vt100 description does not mention "dl". *sigh* +termcapinfo vt100 dl=5\E[M + +# turn sending of screen messages to hardstatus off +hardstatus off +# Set the hardstatus prop on gui terms to set the titlebar/icon title +termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 +# use this for the hard status string +hardstatus string "%h%? users: %u%?" + +# An alternative hardstatus to display a bar at the bottom listing the +# windownames and highlighting the current windowname in blue. (This is only +# enabled if there is no hardstatus setting for your terminal) +# +#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" + +# set these terminals up to be 'optimal' instead of vt100 +termcapinfo xterm*|linux*|rxvt*|Eterm* OP + +# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E> +# (This fixes the "Aborted because of window size change" konsole symptoms found +# in bug #134198) +termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + +# To get screen to add lines to xterm's scrollback buffer, uncomment the +# following termcapinfo line which tells xterm to use the normal screen buffer +# (which has scrollback), not the alternate screen buffer. +# +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# Enable non-blocking mode to better cope with flaky ssh connections. +defnonblock 5 + +# ------------------------------------------------------------------------------ +# STARTUP SCREENS +# ------------------------------------------------------------------------------ + +# Example of automatically running some programs in windows on screen startup. +# +# The following will open top in the first window, an ssh session to monkey +# in the next window, and then open mutt and tail in windows 8 and 9 +# respectively. +# +# screen top +# screen -t monkey ssh monkey +# screen -t mail 8 mutt +# screen -t daemon 9 tail -f /var/log/daemon.log + diff --git a/shells b/shells index 45d9dd0..fa2538f 100644 --- a/shells +++ b/shells @@ -6,3 +6,5 @@ /usr/bin/rbash /bin/dash /usr/bin/dash +/usr/bin/tmux +/usr/bin/screen diff --git a/tmpfiles.d/screen-cleanup.conf b/tmpfiles.d/screen-cleanup.conf new file mode 100644 index 0000000..eb1b9f8 --- /dev/null +++ b/tmpfiles.d/screen-cleanup.conf @@ -0,0 +1 @@ +d /run/screen 1777 root utmp -- 2.39.5