[SRU] [REGRESSION] launching byobu from unity uses the terminal icon rather than the application icon

Bug #1503418 reported by Dustin Kirkland 
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
BAMF
Triaged
Medium
Marco Trevisan (Treviño)
bamf (Ubuntu)
Triaged
Medium
Marco Trevisan (Treviño)
Wily
Confirmed
Medium
Unassigned
byobu (Ubuntu)
Fix Released
Medium
Dustin Kirkland 
Wily
Triaged
Medium
Dustin Kirkland 
gnome-terminal (Ubuntu)
Confirmed
Medium
Unassigned
Wily
Confirmed
Medium
Unassigned

Bug Description

I just upgraded to Wily yesterday, and it seems this regression has crept up again (it happened around the Utopic timeframe too).

Install Byobu.

sudo apt-get install byobu

Open from the Unity Launcher. Press Windows icon. Type 'byobu'. Click on the Ubuntu terminal icon. Byobu open in the default terminal (as specified in the byobu.desktop file), but the icon on the left in the unity bar is the Terminal icon, not the Byobu one.

====================================
[Impact]

 * The icon is not displayed properly in the unity bar on the left

[Test Case]

 * sudo apt-get install -y byobu
 * Press the Unity launcher key
 * Type 'byobu' and press enter
 * See the gnome terminal icon (black square with a prompt, like >_ on it)
 * Install the package from wily-proposed
 * Close byobu, and launch it again
 * See the byobu logo (a three panel Japanese screen)

[Regression Potential]

 * None

[Other Info]

 * One line fix in the byobu.desktop file
 * Already applied upstream and released in xenial
 * Diff looks like this:

=== modified file 'usr/share/applications/byobu.desktop'
--- a/usr/share/applications/byobu.desktop 2013-12-17 05:28:23 +0000
+++ b/usr/share/applications/byobu.desktop 2015-10-28 00:34:48 +0000
@@ -7,3 +7,4 @@
 Terminal=true
 Categories=GNOME;GTK;Utility;
 X-GNOME-Gettext-Domain=byobu
+StartupWMClass=gnome-terminal-server

====================================

Related branches

Changed in byobu (Ubuntu):
status: New → Invalid
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland  (kirkland)
Ted Gould (ted)
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
no longer affects: unity (Ubuntu)
Changed in byobu (Ubuntu):
status: Invalid → Triaged
status: Triaged → Invalid
Changed in bamf:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
milestone: none → 0.5.2
Changed in bamf (Ubuntu):
status: New → Confirmed
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, I guess this is mostly related to the changes in gnome-terminal that now uses GApplication instead of the old factory.

It also doesn't support anymore the "--class" parameter as it used to be in the past, but this shouldn't be related to this issue.

I gave a quick look (not with code yet), but it seems that at this point for BAMF is quite tricky to understand who has launched that window, and thus using the right icon (since the new terminal window is create by the same main process of the other terminals). Passing a --class or --window-role parameter (together with a StartupWMClass .desktop file paramter) might help in doing this matching, but at this point things seems quite tricky.

Revision history for this message
pdecat (pdecat) wrote :

Same issue on Wily.

Adding StartupWMClass to .desktop file works around this issue:

    $ cat /usr/share/applications/byobu.desktop
    [Desktop Entry]
    Name=Byobu Terminal
    Comment=Advanced Command Line and Text Window Manager
    Icon=byobu
    Exec=env TERM=xterm-256color byobu
    Type=Application
    Terminal=true
    Categories=GNOME;GTK;Utility;
    X-GNOME-Gettext-Domain=byobu
    StartupWMClass=gnome-terminal-server

Changed in byobu (Ubuntu):
status: Invalid → In Progress
Changed in byobu (Ubuntu Wily):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland  (kirkland)
milestone: none → wily-updates
summary: - [REGRESSION] launching byobu from unity uses the terminal icon rather
- than the application icon
+ [SRU] [REGRESSION] launching byobu from unity uses the terminal icon
+ rather than the application icon
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 5.98-0ubuntu1

---------------
byobu (5.98-0ubuntu1) xenial; urgency=medium

  [ Dustin Kirkland ]
  * usr/bin/vigpg:
    - specify stdin for input file
  * usr/bin/vigpg:
    - get vigpg working with the new release of gpg in wily
    - clean up encrypted copies of the file
  * usr/share/applications/byobu.desktop: LP: #1503418
    - use byobu icon rather than gnome-terminal

  [ Roman Inflianskas ]
  * usr/lib/byobu/include/config.py.in:
    - fix help for openSUSE

 -- Dustin Kirkland <email address hidden> Mon, 31 Aug 2015 13:32:38 -0500

Changed in byobu (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks for the suggestion, @pdecat.

I've applied that fix upstream against lp:byobu, tested and released it. I've also uploaded an SRU for wily with this as the fix.

@trevino, you're welcome to close the bamf task, or fix it there too at your discretion. Thanks!!!

description: updated
Changed in byobu (Ubuntu Wily):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Dustin, or anyone else affected,

Accepted byobu into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/byobu/5.97-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Mh I think this is not the correct fix. This would cause any gnome-terminal you open to be matched as Byobu.

I think we should probably change bamf so that it uses the WM_WINDOW_ROLE (which you can change by launching gtk apps with --window-role) as hint... So adding a XUbuntuWindowRole item on .desktop files

tags: added: verification-failed
removed: verification-needed
Mathew Hodson (mhodson)
Changed in bamf (Ubuntu Wily):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bamf (Ubuntu Wily):
status: New → Confirmed
Mathew Hodson (mhodson)
tags: added: regression-release wily
Revision history for this message
Hanmac (hanmac) wrote :

breaks gnome-terminal now.

now it does that when opening gnome-terminal it does show the icon of Byobu which should not.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-terminal (Ubuntu Wily):
status: New → Confirmed
Changed in gnome-terminal (Ubuntu):
status: New → Confirmed
Revision history for this message
Norberto Bensa (nbensa) wrote :

Please, do not release this fix. It breaks gnome-terminal now.

When I click the gnome-terminal icon, the byobu's icon shows up, which is counter intuitive, ugly, and looks unprofessional.

Changed in gnome-terminal (Ubuntu):
importance: Undecided → Medium
Changed in gnome-terminal (Ubuntu Wily):
importance: Undecided → Medium
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Sorry, Dustin, I have to revert this change right now as all terminal-based application having a correct match pre-xenial is now matched to byobu (like weechat and such).

We have a wrapper for this kind of use case that you can use now (it's working for a couple of cycle) due to the gnome-terminal-server change.

For instance, I have fr.didrocks.Terminals.weechat.desktop shipping:
Exec=gnome-terminal --app-id fr.didrocks.Terminals.weechat -e weechat-curses

I guess we can do something similar for byobu. I'm happy to give a hand for any changes there.

Changed in byobu (Ubuntu):
status: Fix Released → Triaged
Changed in byobu (Ubuntu Wily):
status: Fix Committed → Triaged
Changed in byobu (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 5.100-0ubuntu1

---------------
byobu (5.100-0ubuntu1) xenial; urgency=medium

  [ David Personette ]
  * usr/lib/byobu/include/config.py.in,
    usr/lib/byobu/include/ec2instancespricing.py,
    usr/lib/byobu/include/select-session.py:
    - https://github.com/dustinkirkland/byobu/pull/11
    - Python scripts 'futurize'd to support python3

  [ Dustin Kirkland ]
  * usr/share/applications/byobu.desktop:
    - Revert upstream .desktop changes to match against
      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
  * usr/lib/byobu/include/select-session.py:
    - fix regression introduced by r2448

 -- Dustin Kirkland <email address hidden> Sat, 14 Nov 2015 16:59:57 -0600

Changed in byobu (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Hanmac (hanmac) wrote :

changes in byobu does need to be backported to willy too because currently its still broken in willy

Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package removed from archive

The version of byobu in the proposed pocket of Wily that was purported to fix this bug report has been removed because the bugs that were to be fixed by the upload were not verified in a timely (105 days) fashion.

Changed in bamf:
milestone: 0.5.3 → 0.5.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.