I use Emacs in daemon mode under KDE, that is, I have emacs --daemon running. Everything works fine. If I tell KDE to save session on logout, and restore that saved session on next login, it forgets about the --deamon command line option, and brings up a standalone Emacs instance. Is there a way to restore the command line option, too?

link|improve this question

78% accept rate
feedback

1 Answer

up vote 0 down vote accepted

If I recall correctly, there is a way to tell KDE not to save certain applications. You should add emacs to KDE's "don't save" list, and then add "emacs --daemon" to your startup programs.

Otherwise, you could always add something like this to your startup programs:

#!/bin/sh
emacsclient -e '(kill-emacs)' # try a graceful kill first
pkill emacs
rm -f /tmp/emacs`id -u`/server
emacs --daemon
link|improve this answer
Thanks. Finally, I came out with a similar solution, but I thought there is a standard way without the need of a separate shell script. – Török Gábor Sep 3 '09 at 14:22
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.