diff --git a/Makefile.am b/Makefile.am index 189ea1a7..4d5bcc4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,12 +1,13 @@ SUBDIRS = etc/byobu \ etc/profile.d \ - usr/share/applications \ + usr/share/byobu/desktop \ usr/share/byobu/keybindings \ usr/share/byobu/pixmaps \ usr/share/byobu/profiles \ usr/share/byobu/status \ usr/share/byobu/tests \ usr/share/byobu/windows \ + usr/share/dbus-1/services \ usr/share/doc/byobu \ usr/lib/byobu \ usr/lib/byobu/include \ diff --git a/configure.ac b/configure.ac index 1b45e184..738a44ac 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,6 @@ AC_OUTPUT(Makefile \ etc/byobu/Makefile \ etc/profile.d/Makefile \ etc/profile.d/Z97-byobu.sh \ - usr/share/applications/Makefile \ usr/bin/byobu \ usr/bin/byobu-config \ usr/bin/byobu-ctrl-a \ @@ -51,12 +50,14 @@ AC_OUTPUT(Makefile \ usr/lib/byobu/include/dirs \ usr/lib/byobu/include/toggle-utf8 \ usr/share/byobu/tests/byobu-time-notifications \ + usr/share/byobu/desktop/Makefile \ usr/share/byobu/keybindings/Makefile \ usr/share/byobu/pixmaps/Makefile \ usr/share/byobu/profiles/Makefile \ usr/share/byobu/status/Makefile \ usr/share/byobu/tests/Makefile \ usr/share/byobu/windows/Makefile \ + usr/share/dbus-1/services/Makefile \ usr/share/doc/byobu/Makefile \ usr/lib/byobu/Makefile \ usr/lib/byobu/include/Makefile \ diff --git a/debian/changelog b/debian/changelog index 4c982488..d9a72dee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,29 @@ byobu (5.100) unreleased; urgency=medium [ Dustin Kirkland ] * usr/share/applications/byobu.desktop: - Revert upstream .desktop changes to match against - gnome-terminal-server + gnome-terminal-server, LP: #1512498 + * === 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 -- Dustin Kirkland Sat, 14 Nov 2015 16:59:57 -0600 diff --git a/debian/control b/debian/control index 3e0c928a..7cd464db 100644 --- a/debian/control +++ b/debian/control @@ -25,6 +25,7 @@ Recommends: Suggests: apport, ccze, + gnome-terminal, gnupg, lsb-release, po-debconf, diff --git a/debian/postinst b/debian/postinst index 78c77923..20f30db2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -12,6 +12,13 @@ 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) diff --git a/debian/postrm b/debian/postrm index 762d4d5d..877c9407 100644 --- a/debian/postrm +++ b/debian/postrm @@ -5,6 +5,9 @@ PKG="byobu" # Clean-up obsolete config file rm -f /etc/byobu/statusrc || true +# Clean-up linked desktop file +rm -rf /usr/share/applications/$PKG.desktop + #DEBHELPER# # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/share/applications/Makefile.am b/usr/share/applications/Makefile.am deleted file mode 100644 index c89c60b3..00000000 --- a/usr/share/applications/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -applicationdir = $(datadir)/applications/ -application_SCRIPTS = byobu.desktop diff --git a/usr/share/byobu/desktop/Makefile.am b/usr/share/byobu/desktop/Makefile.am new file mode 100644 index 00000000..cd652b4b --- /dev/null +++ b/usr/share/byobu/desktop/Makefile.am @@ -0,0 +1,2 @@ +desktopdir = $(datadir)/@PACKAGE@/desktop +desktop_SCRIPTS = byobu.desktop byobu.desktop.old diff --git a/usr/share/byobu/desktop/byobu.desktop b/usr/share/byobu/desktop/byobu.desktop new file mode 100644 index 00000000..83607e00 --- /dev/null +++ b/usr/share/byobu/desktop/byobu.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Byobu Terminal +Comment=Advanced Command Line and Text Window Manager +Icon=byobu +Exec=gnome-terminal --app-id us.kirkland.terminals.byobu -e byobu +Type=Application +Categories=GNOME;GTK;Utility; +X-GNOME-Gettext-Domain=byobu diff --git a/usr/share/applications/byobu.desktop b/usr/share/byobu/desktop/byobu.desktop.old similarity index 100% rename from usr/share/applications/byobu.desktop rename to usr/share/byobu/desktop/byobu.desktop.old index 162e6790..6df34e48 100644 --- a/usr/share/applications/byobu.desktop +++ b/usr/share/byobu/desktop/byobu.desktop.old @@ -3,7 +3,7 @@ Name=Byobu Terminal Comment=Advanced Command Line and Text Window Manager Icon=byobu Exec=env TERM=xterm-256color byobu -Type=Application Terminal=true +Type=Application Categories=GNOME;GTK;Utility; X-GNOME-Gettext-Domain=byobu diff --git a/usr/share/dbus-1/services/Makefile.am b/usr/share/dbus-1/services/Makefile.am new file mode 100644 index 00000000..9aae694a --- /dev/null +++ b/usr/share/dbus-1/services/Makefile.am @@ -0,0 +1,2 @@ +servicedir = $(datadir)/dbus-1/services +service_DATA = us.kirkland.terminals.byobu.service diff --git a/usr/share/dbus-1/services/us.kirkland.terminals.byobu.service b/usr/share/dbus-1/services/us.kirkland.terminals.byobu.service new file mode 100644 index 00000000..d47d3132 --- /dev/null +++ b/usr/share/dbus-1/services/us.kirkland.terminals.byobu.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=byobu +Exec=/usr/lib/gnome-terminal/gnome-terminal-server --app-id us.kirkland.terminals.byobu