From 554819558dc696168c3c1e56b679e8ea66461f2e Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 2 Feb 2009 14:07:23 +0100 Subject: [PATCH] * screen: wrapper script should add a -c arg, and specify your chosen profile, and ensure that .screenrc at least exists, prevent recursion from happening to upgrading users by pruning source of ~/.screenrc-profile from ~/.screenrc, LP: #323756 --- screen | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/screen b/screen index cb90ddba..1d55e27a 100755 --- a/screen +++ b/screen @@ -27,5 +27,11 @@ # Ensure that their default windows are seeded [ -r "$HOME/.screenrc-windows" ] || cp "/usr/share/screen-profiles/windows/common" "$HOME/.screenrc-windows" +# Ensure that the user's .screenrc at least exists +[ -r "$HOME/.screenrc" ] || touch "$HOME/.screenrc" + +# Prevent recursion; .screenrc should no longer source .screenrc-profile +sed -i '/^source .*\.screenrc-profile$/d' $HOME/.screenrc + # Now let's execute screen! -exec /usr/bin/screen.real "$@" +exec /usr/bin/screen.real -c "$HOME/.screenrc-profile" "$@"