Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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