help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to tell graphical Emacs to shutdown cleanly from tty1?


From: Jorge A. Alfaro-Murillo
Subject: Re: how to tell graphical Emacs to shutdown cleanly from tty1?
Date: Tue, 17 Nov 2015 10:32:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Tom Roche writes:

Lately I run GNU Emacs mostly as GUI on X/tty7 (which I'll call "the desktop" as opposed to emacs-desktop) on one of my Debian laptops. Occasionally the desktop hangs, in which case I usually can goto tty1 and `sudo shutdown -whatever now`. Unfortunately this does not seem to cause Emacs to shut down as cleanly as I'd like: I'd like Emacs to (e.g.) save any unsaved buffers and save its emacs-desktop, but that doesn't seem to get done. (Am I missing something?) So I'm thinking that, in this usecase, I should utter something from tty1 (before `shutdown`) to tell Emacs to shutdown cleanly ... but I don't know what to say. How to do this?

Start a server every time that you start your computer, from a terminal you can do:

#+BEGIN_SRC shell
emacsclient -c -a '' #+END_SRC

every time that you want to open emacs. That will start a server if there is none or connect if there is one already. You will be able to connect to that server even from TTY1, and M-x save-buffers-kill-emacs if you want a clean exit.

But I guess the relevant question is, why is your X hanging?

--
Jorge.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]