From f5b38ecb520e74909c001db86efe0d6fa0fbc1f2 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 29 Apr 2009 01:16:44 -0500 Subject: [PATCH] * profiles/common, screen: create a temp file to use on screen launch, consisting of the profile plus the windows, but don't source default windows otherwise as this breaks F5-refresh, LP: #368786 Signed-off-by: Dustin Kirkland --- debian/changelog | 5 ++++- profiles/common | 1 - screen | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9669c6a0..bfae44de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,11 @@ screen-profiles (1.52) unreleased; urgency=low LP: #368925 * profiles/profile.skel: swap the position of ip-address and menu * screen-profiles.1: document all notifications, LP: #369040 + * profiles/common, screen: create a temp file to use on screen launch, + consisting of the profile plus the windows, but don't source default + windows otherwise as this breaks F5-refresh, LP: #368786 - -- Dustin Kirkland Wed, 29 Apr 2009 00:36:48 -0500 + -- Dustin Kirkland Wed, 29 Apr 2009 01:14:27 -0500 screen-profiles (1.51-0ubuntu1) karmic; urgency=low diff --git a/profiles/common b/profiles/common index 53ab1a48..fdc4b16f 100644 --- a/profiles/common +++ b/profiles/common @@ -62,4 +62,3 @@ altscreen on defscrollback 10000 source $HOME/.screen-profiles/keybindings -source $HOME/.screen-profiles/windows diff --git a/screen b/screen index 57b0ef52..3dbc6be2 100755 --- a/screen +++ b/screen @@ -79,7 +79,12 @@ fi # Now let's execute screen! if [ "$#" = "0" ]; then - exec /usr/bin/screen.real -c "$HOME/.screen-profiles/profile" /usr/bin/motd+shell + # Create a temporary config file *with* the default windows + # but if we refresh, we'll just source the profile, without + temp=$(mktemp screen-profiles-XXXXXXXX) + trap "rm -f $temp 2>/dev/null || true" EXIT HUP INT QUIT TERM + cat "$HOME/.screen-profiles/profile" "$HOME/.screen-profiles/windows" > "$temp" + exec /usr/bin/screen.real -c "$temp" /usr/bin/motd+shell else exec /usr/bin/screen.real -c "$HOME/.screen-profiles/profile" "$@" fi