Home » Questions » Computers [ Ask a new question ]

How to tell KDE to store command line options on session save?

How to tell KDE to store command line options on session save?

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?

Asked by: Guest | Views: 165
Total answers/comments: 1
Guest [Entry]

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