Openbox Apps menu causes error in obamenu

Bug #1771696 reported by Ryan Grange
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openbox (Ubuntu)
Fix Released
Medium
Simon Quigley
Bionic
Fix Released
Medium
Simon Quigley
Cosmic
Fix Released
Medium
Simon Quigley

Bug Description

[Impact]

Without this, users who use Openbox and try to open the applications menu when that applications menu is empty will be faced with an interesting looking error message.

[Test Case]

Start a pure Openbox session. On Lubuntu 18.04 LTS, you can do this by selecting "Openbox" from the sessions in the top right of the login screen (lightdm). Instructions may vary depending on the display manager.

The Applications menu should be empty, and if it isn't, those packages need to be uninstalled.

It should simply list an empty menu, or no menu at all, without making a fuss.

[Regression Potential]

This is a one line change, and it's very low-risk, but of course, if there's a toolchain change or if an item in the Applications menu is peculiar, it could regress that way. Otherwise, there's very little ways this could regress.

[Original Description]

Fresh install of Lubuntu daily 2018-05-16 in VirtualBox.

Steps:
Started Openbox session.
Right clicked desktop and hovering over Applications submenu causes error: Invalid output from pipe-menu "/usr/bin/obamenu"

Screenshot attached.

Revision history for this message
Ryan Grange (ryantg) wrote :
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Confirmed as well on Bionic. It does not occur with Artful. Xenial doesn't even have the Applications menu item.

Note running `obamenu` from the terminal produces the following result:

Traceback (most recent call last):
  File "/usr/bin/obamenu", line 181, in <module>
    process_dtfile(dtf, category Dict)
  File "/usr/bin/obamenu", line 146, in process_dtfile
    if eqi[1][-1] == ';':
IndexError: string index out of range

Speaking for the Lubuntu team, the only reason we have that OpenBox session is because it comes with OpenBox. We don't really support it.

affects: lubuntu-artwork → openbox (Ubuntu)
Changed in openbox (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ryan Grange (ryantg) wrote :

Obamenu is choking on an empty string.

Change line 146 to read:
 if eqi[1] and eqi[1][-1] == ';':

Then the applications menu comes right up.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "obamenu.emptycat.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Simon Quigley (tsimonq2)
Changed in openbox (Ubuntu Bionic):
importance: Undecided → Medium
status: New → In Progress
Changed in openbox (Ubuntu Cosmic):
status: Triaged → In Progress
Changed in openbox (Ubuntu Bionic):
assignee: nobody → Simon Quigley (tsimonq2)
Changed in openbox (Ubuntu Cosmic):
assignee: nobody → Simon Quigley (tsimonq2)
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Thank you so much for the patch!

I have uploaded this to Cosmic and Bionic. Cosmic should migrate and be available to install as normal, but Bionic needs to go through a Stable Release Updates procedure. Help in testing this would be very appreciated.

Thanks again!

description: updated
Simon Quigley (tsimonq2)
Changed in openbox (Ubuntu Cosmic):
status: In Progress → Fix Committed
Simon Quigley (tsimonq2)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Ryan, or anyone else affected,

Accepted openbox into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openbox/3.6.1-7ubuntu0.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 on 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

Changed in openbox (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Ryan Grange (ryantg) wrote :

Lubuntu 16.04 doesn't include python 2 (standard install, not minimal, no updates during install, no 3rd party) and doesn't alias python to Python 3 (so I get /usr/bin/env: 'python': No such file or directory). After doing a "sudo apt-get install python" the menu works perfectly in Openbox running on Lubuntu 16.04.

If all the flavors now ship Python 3, I can submit a patch to update the code to Python 3. If not, I recommend Python 2 (minimal?) be made a dependency of Openbox.

Revision history for this message
Ryan Grange (ryantg) wrote :

I meant Lubuntu 18.04 doesn't include Python 2.

Revision history for this message
Ryan Grange (ryantg) wrote :

If everything has Python 3 now, this patch fixes all the features that break from 2 to 3 (while still being valid Python 2 other than the 3 in the env line).

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

This bug was fixed in the package openbox - 3.6.1-7ubuntu1

---------------
openbox (3.6.1-7ubuntu1) cosmic; urgency=medium

  * Fix applications menu when there are no entries (LP: #1771696).

 -- Simon Quigley <email address hidden> Thu, 17 May 2018 19:50:05 -0500

Changed in openbox (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Ryan Grange (ryantg) wrote :

Ubuntu 18.04 also doesn't include Python 2 in a minimal install (haven't checked full install), so obamenu fails to find Python on it as well. (I felt it safe to assume a typical Openbox user would want a minimal install.)

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

That's irrelevant to this bug. Marked verified based on #7

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openbox - 3.6.1-7ubuntu0.1

---------------
openbox (3.6.1-7ubuntu0.1) bionic; urgency=medium

  * Fix applications menu when there are no entries (LP: #1771696).

 -- Simon Quigley <email address hidden> Thu, 17 May 2018 19:52:20 -0500

Changed in openbox (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for openbox has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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