Ubuntu

ubuntu-bug wish: allow to just point at the window of a buggy application

Reported by Oliver Gerlich on 2009-04-08
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Wishlist
Abhinav Upadhyay

Bug Description

Binary package hint: apport

It would be nice if the ubuntu-bug command would allow the user to point at a window and file a bug against the window's application.
Currently I run xprop, point at the window, and look at the _NET_WM_PID value of the window to find the PID; and then can file a bug against that PID. Maybe ubuntu-bug could offer this functionality on its own?

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: apport 1.0-0ubuntu2
PackageArchitecture: all
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
Uname: Linux 2.6.28-11-generic i686

Oliver Gerlich (ogerlich) wrote :
Martin Pitt (pitti) wrote :

Similar to bug 85170, but not quite the same.

Changed in apport (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Martin Pitt (pitti) wrote :

Matt Zimmerman came up with this idea as well, he made a quick sketch how it could look like:

------------------ 8< ------------------
zenity --title="Select window" --question --text="Please click on the window where you see the problem." &
zenity_pid=$!

window_pid=$(xprop _NET_WM_PID |cut -d= -f2)

kill $zenity_pid

if [ -z "$window_pid" ]; then
        echo "Sorry." >&2
        exit 1
fi

exec ubuntu-bug $window_pid

Oliver Gerlich (ogerlich) wrote :

> Similar to bug 85170, but not quite the same.

Actually, I think this xprop feature mainly could be useful for apps which don't have a "Report a bug" menu entry, like the Gnome Mouse Properties dialog.

> Matt Zimmerman came up with this idea as well, he made a quick sketch how it could look like:

Looks good to me!

Martin Pitt (pitti) on 2009-06-02
tags: added: bitesize
Matt Zimmerman (mdz) wrote :

It was suggested in a UDS session today that a good addition to this feature would be to grab a screenshot of the window. I don't think this is trivial with gnome-screenshot, but it should be possible to add the needed functionality

Robert Roth (evfool) wrote :

@Matt Zimmerman: Wouldn't this cause data privacy problems? The current window, thus the screenshot could contain sensitive information.

On Sat, Feb 05, 2011 at 11:57:27PM -0000, Robert Roth wrote:
> @Matt Zimmerman: Wouldn't this cause data privacy problems? The current
> window, thus the screenshot could contain sensitive information.

So long as the user knows what's happening and consents, I don't see a
problem.

--
 - mdz

I added support for -x (for xprop ?) option to the bin/apport-bug script, which will enable user to point at the problematic window and generate a crash report for that application.

I used Matt Zimmerman's idea of implementation in the code as discussed above

However, the idea of adding ability for taking screenshot is still left as gnome-screenshot does not provide any straight forward functionality to do this. It would require the user to select the window twice, (first time for xprops, and 2nd time for gnome-screenshot). I think doing this will cross the scope of a bitesize bug :-).

tags: added: patch
Changed in apport (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Abhinav Upadhyay (er-abhinav-upadhyay)

Here is the updated patch as Martin had suggested that changes be made in apport/ui.py rather than in the shell wraper.

Changed in apport (Ubuntu):
status: In Progress → Fix Released

As far as taking screenshot is concerned, how about this ?

import -window `xwininfo |grep 'Window id:' |cut -d" " -f4` screenshot.jpg

Brian Murray (brian-murray) wrote :

Wow, that's really cool! However, import is provided by imagemagick which isn't included by default with most Ubuntu installations.

Thanks :)

Another option is to use xwd and xwdtopnm utilities but it doesn't work the way it should.

However, there is a screenshot taking application Shutter, it also provides the capability of pointing at a window and taking its screenshot. Its written in Perl and I cannot read Perl code :)

It would be interesting to ask the developer of Shutter how it achieves this functionality.

I received a reply from the author of Shutter. He gave me a sample perl script which allows to take screenshot of a window. But it requires libgnome2-wnck-perl (if using the perl script) or libwnck (if writing code in C).

I wonder if these libraries are included with Ubuntu when shipping ?

I have filed a new bug report for the screenshot feature.
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/772336

I have also implemented a working prototype of the feature which is attached in the comments. It would be great to get some feedback before I start integrating it in apport.

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

Other bug subscribers