5

I sometimes find small bugs in dialogs or windows. For instance, I found a very minor bug in the sound preference dialog. I thought I'd report it, but it wasn't obvious what package provides the dialog.

Is there a simple tool to do that? I would imagine something like xwininfo; you'd run the command, the mouse pointer would change and when you click a window, the command returns the package name. With such a command, it would be easy to expand it to gather version information, distro and open the bug tracker on the right page.

We used to have Help > Report a problem, but since Gnome Control Center doesn't use menus, that option is not available. This, of course, would be true for all windows that doesn't use menus. So; is there an alternative?

jrg
  • 60,611

2 Answers2

10

Open a terminal (ctrl-alt-t) and type

ubuntu-bug -w

a message will pop up instructing you to click on a window to file a bug report about the application owning that window.

Incidentally, this uses apport, which collects a lot of useful debugging information automatically and is the preferred way to report Ubuntu bugs.

Jjed
  • 13,874
roadmr
  • 34,222
  • 9
  • 81
  • 93
  • I would recommend recommending using alt+F2 though. No reason to open a terminal for that, and some people find that scary. :) – Jo-Erlend Schinstad Jan 18 '12 at 04:59
  • Peoplw get scared at a terminal's "blank slate" when they don't know what to do :) There's no need to be scared if you know what stuff to type. I prefer the terminal as, if there's an error, you can see it right there. – roadmr Jan 18 '12 at 15:03
8

roadmr's answer above is by far the best way to go, but I wanted to see if I could come up with a bash one-liner that reports back the correct source package. It's even messier than I imagined since you apparently can't pipe to dpkg or which.

dpkg -S $(which $(xprop | grep "WM_CLASS(STRING)" | grep -o "\".*\"" | cut -d "," -f 1 | tr -d '""')) | cut -d ":" -f 1

Let's unpack this a little. The grep and cut stuff are simply searching for and manipulating strings. The interesting things are:

  • xprop - Lets you find out information about the window you click on.

  • which - Returns the full path of the command used. Example:

    $ which  gnome-control-center
    /usr/bin/gnome-control-center
    
  • dpkg -S - Given a file, provides the name of the source package it comes from. Very useful when the binary name and source package name differ. Example:

    $ dpkg -S /usr/bin/orca
    gnome-orca: /usr/bin/orca