Ubuntu people want users to use apport to report bugs. There's a command-line tool called 'ubuntu-bug' that you can use if you know the name of the package or at least the name of executable. There's a "Report a problem" menu item in many, but not all GUI apps.

Here's what you can do if the GUI app in question doesn't have that menu item, and you don't remember what it's called, and you're the same sort of a crazy command-line person that I am:

$ xprop|grep PID

Click on the app's window. Watch that shell command return a line that looks like

_NET_WM_PID(CARDINAL) = 807
Now run
$ ps 807  # substitute the real number

You'll see the command name, e.g.

  PID TTY      STAT   TIME COMMAND
  807 ?        S      0:02 /usr/lib/indicator-applet/indicator-applet --oaf-acti

Now you can run

$ ubuntu-bug /usr/lib/indicator-applet/indicator-applet

If you're not running Jaunty, you'll need to do one more step to find the name of the Ubuntu package:

$ dpkg -S /usr/lib/indicator-applet/indicator-applet
indicator-applet: /usr/lib/indicator-applet/indicator-applet

You can use that with apport-cli or on the Launchpad online bug reporting form.

For some (many?) programs you can short-circuit this trail by looking at the WM_CLASS property instead of the _NET_WM_PID property:

$ xprop|grep CLASS
WM_CLASS(STRING) = "indicator-applet", "Indicator-applet"

While there is no requirement for the window class name to match the name of the Ubuntu package or the name of the executable, it may give you a reasonable guess.