Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

how to tell Firefox to shutdown cleanly from tty1?

  • 6 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 14 views
  • Last reply by TomRoche

Lately I run Firefox mostly on one of my Debian laptops. Occasionally "the desktop" (i.e., the stack of stuff running under X on tty7) hangs, in which case I usually goto tty1 and `sudo shutdown -whatever now`. Unfortunately this does not seem to cause Firefox to shut down as cleanly as I'd like: I'd like Firefox to (e.g.) save its session, but that doesn't seem to get done. (Am I missing something?) After I restart the box and its desktop and Firefox, the latter always comes up offering a crashed session--which is usually fine, but is occasionally very incomplete.

So I'm thinking that, in this usecase, I should utter something from tty1 (e.g., `pkill -some_magic_signal firefox`) before `shutdown` to tell Firefox to shutdown cleanly ... but I don't know what to say. How to do this?

Lately I run Firefox mostly on one of my Debian laptops. Occasionally "the desktop" (i.e., the stack of stuff running under X on tty7) hangs, in which case I usually goto tty1 and `sudo shutdown -whatever now`. Unfortunately this does not seem to cause Firefox to shut down as cleanly as I'd like: I'd like Firefox to (e.g.) save its session, but that doesn't seem to get done. (Am I missing something?) After I restart the box and its desktop and Firefox, the latter always comes up offering a crashed session--which is usually fine, but is occasionally very incomplete. So I'm thinking that, in this usecase, I should utter something from tty1 (e.g., `pkill -some_magic_signal firefox`) before `shutdown` to tell Firefox to shutdown cleanly ... but I don't know what to say. How to do this?

All Replies (6)

Is the add on Session Manager available for your platform?

guigs said

Is the add on Session Manager available for your platform?

1. If you reread my question, you may note that I am already using a session manager.

2. Your answer is unfortunately irrelevant, since no session manager will be able to restore anything more than a crashed session if the browser crashes. What I want is a way to tell the browser (from tty1) to shutdown itself cleanly, rather than to be crashed when the OS shuts down.

Note also that the following do *not* work: when I'm in tty1, I can do either

  • `killall -HUP firefox`
  • `pkill -9 firefox`

In both cases, after I

1. go back to tty7

2. restart Firefox

Firefox comes up with 'Your last session Crashed!'

Right, but the dialogue that is opened up, if that is blank with no windows from the previous session, does that say that is closed cleanly?

guigs said

but the dialogue that is opened up, if that is blank with no windows from the previous session

The initial dialog is not blank. As noted above , after I

1. go back to tty7 (from tty1, with keychord=C-A-F7)

2. restart Firefox

Firefox comes up with dialog title=

Session Manager - Restore after Crash

and dialog body=

Your last session Crashed!

followed by a dropdown containing a list of sessions, the newest of which is clearly marked <tt>Crashed Session</tt>.

Since this does not seem currently feasible, I have made an FR. Note also that one can tell Emacs to shutdown cleanly from commandline (e.g., tty1) so this should not be rocket surgery.

TomRoche மூலமாக திருத்தப்பட்டது