4

apport allows to investigate crashes locally and to either start a gdb session, get a backtrace or install debugging symbols in that local investigation. When choosing the latter a gnome-terminal is displayed to monitor the progress of updating the apt sources and installing the -dbg packages. How can I keep that terminal window from disappearing if the apt-get process finished or crashed?

The solution shouldn't require any interaction with the terminal at all after the installation has been started.

This is crucial for debugging failures of apport itself. Currently the terminal disappears without any noticeable error and then an apport dialog for the package which didn't finish to create the backtrace or for the crash of apport itself (starting an infinite loop of apport detecting its own crash) is opened.

Note: This in not about a specific issue that makes the gnome-terminal opened by apport disappear, i.e. I don't care if apt-get makes a segmentation fault or a dpkg subroutine returns != 0, ...

13
  • Tried opening a second tab in it?
    – muru
    Mar 24, 2015 at 22:01
  • 1
    The tab is closed then and the second becomes the only one. Your comment lead me to exclude solutions which require any interaction. Mar 24, 2015 at 23:28
  • Do I understand right: you call apport in gnome-terminal and then it crashes ? or do you call it some other way ? Apr 8, 2015 at 22:11
  • Regardless of where I invoke apport (gnome-terminal, xterm or KDE konsole) apport itselfs opens a gnome-terminal which crashes/disappears. Apr 8, 2015 at 22:35
  • Here's a thought: Change the ownership of the running process to root. apport should be unable to kill it, but might crash when it notices it failed to do so.
    – Alex
    Apr 8, 2015 at 23:43

2 Answers 2

2
+200

Doesn't seem to exist and there's no need to figure out nasty workarounds. I opened feature request/bug 1442159 to get developer feedback.

3
1

Since apport supports interactive feedback as discussed at https://wiki.ubuntu.com/Apport/DeveloperHowTo#Custom_Invocation it would seem all that's required is to start the process with a variant on the

Yes/No Question psuedo code

def add_info(report, ui):

close_terminal = False

if ui and ui.yesno('Close Terminal?') == True:
    close_terminal = True

if close_terminal == True:
    # user wants terminal to close

Note: I'm not a developer so don't hold my feet to the fire, but logically this seems like something the devs could do without much difficulty.

1
  • Linked in the feature request on launchpad. Apr 17, 2015 at 7:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .