Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

how to tell Firefox to shutdown cleanly from tty1?

  • 6 trả lời
  • 1 gặp vấn đề này
  • 13 lượt xem
  • Trả lời mới nhất được viết bởi TomRoche

more options

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?

Tất cả các câu trả lời (6)

more options

Is the add on Session Manager available for your platform?

more options

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.

more options

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!'

more options

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?

more options

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>.

more options

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.

Được chỉnh sửa bởi TomRoche vào