From 134e8b38feb2f4cb78cdd9796a4dd43925762b6d Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 8 Nov 2011 16:07:19 -0600 Subject: [PATCH] * === added directory etc/profile.d, etc/byobu/Makefile.am, etc/profile.d/Makefile.am, etc/profile.d/Z97-byobu.sh, Makefile.am: - LP: #586546 - Enable any user to remotely opt into launching byobu by default, using an LC_BYOBU=1 environment variable, which is transmitted over SSH --- Makefile.am | 1 + debian/changelog | 6 ++++++ etc/byobu/Makefile.am | 4 ++-- etc/profile.d/Makefile.am | 2 ++ etc/profile.d/Z97-byobu.sh | 28 ++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 etc/profile.d/Makefile.am create mode 100755 etc/profile.d/Z97-byobu.sh diff --git a/Makefile.am b/Makefile.am index 7c0106ba..28eea4be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS = etc/byobu \ + etc/profile.d \ usr/share/applications \ usr/share/byobu/ec2 \ usr/share/byobu/keybindings \ diff --git a/debian/changelog b/debian/changelog index 634667b2..288f2274 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,12 @@ byobu (4.46) unreleased; urgency=low * debian/control: LP: #887344 - promote tmux to a 'recommends'; will 'depend' on it soon + * === added directory etc/profile.d, etc/byobu/Makefile.am, + etc/profile.d/Makefile.am, etc/profile.d/Z97-byobu.sh, Makefile.am: + - LP: #586546 + - Enable any user to remotely opt into launching byobu by default, + using an LC_BYOBU=1 environment variable, which is transmitted over + SSH -- Dustin Kirkland Mon, 31 Oct 2011 09:46:46 -0400 diff --git a/etc/byobu/Makefile.am b/etc/byobu/Makefile.am index 916234db..c71909e0 100644 --- a/etc/byobu/Makefile.am +++ b/etc/byobu/Makefile.am @@ -1,2 +1,2 @@ -etcdir = $(datadir)/@PACKAGE@/profiles -etc_DATA = socketdir +etcdir = $(datadir)/@PACKAGE@/ +etc_DATA = backend socketdir diff --git a/etc/profile.d/Makefile.am b/etc/profile.d/Makefile.am new file mode 100644 index 00000000..6d281a2a --- /dev/null +++ b/etc/profile.d/Makefile.am @@ -0,0 +1,2 @@ +etcdir = $(datadir)/@PACKAGE@/profile.d +etc_DATA = Z97-byobu.sh diff --git a/etc/profile.d/Z97-byobu.sh b/etc/profile.d/Z97-byobu.sh new file mode 100755 index 00000000..bdb9b52b --- /dev/null +++ b/etc/profile.d/Z97-byobu.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# 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 [ "$LC_BYOBU" = "1" ] && [ -r "/usr/bin/byobu-launch" ]; then + . /usr/bin/byobu-launch +fi +true + +# vi: syntax=sh ts=4 noexpandtab