Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 10 down vote accepted

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.

share|improve this answer
Great! Thank you. :) – Jo-Erlend Schinstad Jan 18 '12 at 4:51
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 4: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

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
  • 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
share|improve this answer
That's a great answer! Thanks :) – Jo-Erlend Schinstad Jan 18 '12 at 5:49
+1 for the shell arcana. Awesome! – roadmr Jan 18 '12 at 15:04
That could do well on the new CodeGolf beta. Very twisted and arcane, but works like a charm. Nice! – hexafraction May 21 '12 at 23:01
thanks a bunch was looking for a command that does exactly what xprop does – John C Aug 23 '13 at 22:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.