Tuesday, 27 August 2013

stop emacs server being killed on logout

stop emacs server being killed on logout

I'd like to run an emacs server in the background and have it persist
after logout. I do not want to start it a system service since it's not a
system service. A more practical reason is that I'm not the only one using
this computer.
I've tried running emacs --daemon from a graphical terminal, and running
emacs-client -c --alternate-editor "" from a graphical terminal and from
the unity launcher, but in all cases the emacs server process is killed on
logout.
This seems to be a bug to me. For instance, my screen session is not
killed on logout. I thought I might ask about this here before filing a
bug report. There is this bug
https://bugs.launchpad.net/ubuntu/+source/emacs-defaults/+bug/1079820
which seems to suggest it is desirable to kill the emacs server on logout.
I disagree: it's a daemon and should be launchable from within unity and
not killed on logout. The bug report also suggests that the problem does
not exist in emacs24 so is not an issue. I'm running Ubuntu 12.04 with
emacs23 and can't upgrade right now and so it is an issue for me.
The workaround I have found is to ctrl-alt-F1 and run the daemon from the
terminal there. Then Unity has no knowledge of the process and doesn't
kill it on logout. I'd prefer not to have to do this however.
Does anyone know how to prevent the emacs --daemon process being killed
when I logout?

No comments:

Post a Comment