mirror of
https://github.com/dustinkirkland/byobu.git
synced 2024-11-13 19:50:07 -08:00
dcebea76d2
* === added directory usr/share/byobu/desktop, === added directory usr/share/dbus-1, === added directory usr/share/dbus-1/services, configure.ac, debian/control, debian/postinst, debian/postrm, Makefile.am, usr/share/applications/byobu.desktop => usr/share/byobu/desktop/byobu.desktop, usr/share/applications/Makefile.am => usr/share/byobu/desktop/Makefile.am, usr/share/byobu/desktop/byobu.desktop.old, usr/share/dbus- 1/services/Makefile.am, usr/share/dbus- 1/services/us.kirkland.terminals.byobu.service: LP: #1512498, #1503418 - huge work around the mess that is gnome-terminal-server - install two different desktop files to /usr/share/byobu/desktops/* - in postinst, symlink the correct one into /usr/share/applications - clean up that conditionally installed symlink in postinst - suggest gnome-terminal package, as our new desktop file hardcodes gnome-terminal (this kind of sucks) - in byobu.desktop, exec gnome-terminal with a --app-id hint, and drop the Terminal=true, as gnome-terminal will take care of that - install a dbus service, as new gnome-terminal expects to launch via dbus - fqdn namespace that service to us.kirkland.terminals.byobu + this is stupid, btw
59 lines
1.5 KiB
Bash
59 lines
1.5 KiB
Bash
#!/bin/sh -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
db_version 2.0
|
|
|
|
PKG="byobu"
|
|
|
|
db_get byobu/launch-by-default || true
|
|
if [ "$RET" = true ]; then
|
|
touch /etc/$PKG/autolaunch
|
|
else
|
|
rm -f /etc/$PKG/autolaunch
|
|
fi
|
|
|
|
# Install correct .desktop file
|
|
if [ -x /usr/lib/gnome-terminal/gnome-terminal-server ]; then
|
|
ln -sf /usr/share/$PKG/desktop/$PKG.desktop /usr/share/applications/$PKG.desktop
|
|
else
|
|
ln -sf /usr/share/$PKG/desktop/$PKG.desktop.old /usr/share/applications/$PKG.desktop
|
|
fi
|
|
|
|
# Clean up any old-school screen-profiles diversions of /usr/bin/screen
|
|
if [ -f /usr/bin/screen ] && [ -f /usr/bin/screen.real ]; then
|
|
divertpkg=$(dpkg-divert --listpackage /usr/bin/screen || true)
|
|
if [ "$divertpkg" = "screen-profiles" ]; then
|
|
rm -f /usr/bin/screen
|
|
dpkg-divert --package screen-profiles --rename --remove /usr/bin/screen
|
|
fi
|
|
fi
|
|
|
|
# Remove the short-lived MOTD message
|
|
rm -f /etc/update-motd.d/55-window-manager
|
|
|
|
# Attempt to notify users that they should reload their profile
|
|
touch_flag() {
|
|
touch "$1" || true
|
|
chown --reference $(dirname "$1") "$1" || true
|
|
chmod 700 "$1" || true
|
|
}
|
|
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir"
|
|
if [ -d "$SOCKETDIR" ]; then
|
|
for d in "$SOCKETDIR"/S-*; do
|
|
if [ -d "$d/$PKG" ]; then
|
|
# New location of the reload flag
|
|
touch_flag "$d/$PKG/reload-required"
|
|
elif [ -d "$d" ]; then
|
|
# Old location of the reload flag
|
|
touch_flag "$d/$PKG.reload-required"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
# Clean-up obsolete config file
|
|
rm -f /etc/byobu/statusrc || true
|
|
|
|
#DEBHELPER#
|
|
|
|
# vi: syntax=sh ts=4 noexpandtab
|