From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Suvayu Ali Newsgroups: gmane.emacs.help Subject: Re: Running emacs deamon outside login Date: Thu, 21 Jan 2010 10:21:41 -0800 Message-ID: <4B589B35.6070403@gmail.com> References: <871vhjcvy9.wl%richard.lewis@gold.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1264098205 6127 80.91.229.12 (21 Jan 2010 18:23:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 18:23:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Richard Lewis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 21 19:23:17 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NY1gb-00048O-8M for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 19:23:17 +0100 Original-Received: from localhost ([127.0.0.1]:55614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY1gb-0006iz-V6 for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 13:23:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NY1ed-0006In-Gu for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 13:21:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NY1eY-0006Bv-P7 for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 13:21:14 -0500 Original-Received: from [199.232.76.173] (port=56323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY1eY-0006Bm-7j for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 13:21:10 -0500 Original-Received: from mail-pz0-f188.google.com ([209.85.222.188]:37337) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NY1eX-0005Wo-Pc for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 13:21:10 -0500 Original-Received: by pzk26 with SMTP id 26so181626pzk.26 for ; Thu, 21 Jan 2010 10:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=qBJEuY2QQGMoei3gwRAA8mGnArBCkilJFE+dD1n3n0k=; b=cg0WEe++QOcIiem4907HXob+o4NWYF9En7o6NMKkEg19yeO67cA+CIj0PhtX+Jkmw6 wn/xAl3Dsbgz/9XVB7aWKhO63qX+IGtAJdLE4XrRCO9U/3Ua3RvwijHLCJnOHKzxkdky QShAAJaz5v0FJILqLjjP43cbbQjWIeMD7FLSQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=dJE7XbB80eC8x7bOwvT2H+xJUy8GY0W5iRTEXIGazldIlkeqBEw4Hw3Pmr8+v6x5pC BjGJLvMxgHowIfa/D+ynFle/FSw5aW1mPKfVQRPPuCR2OPFiQSUJVNB30uly2rO8a+mv hjqSua3b1JiMoUjEbdaIQIPvj+4VPO29Zn5Ho= Original-Received: by 10.143.26.42 with SMTP id d42mr1222659wfj.219.1264098067612; Thu, 21 Jan 2010 10:21:07 -0800 (PST) Original-Received: from ?142.58.122.14? (p8460-6.phys.sfu.ca [142.58.122.14]) by mx.google.com with ESMTPS id 23sm1282264pzk.12.2010.01.21.10.21.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 Jan 2010 10:21:05 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1pre Thunderbird/3.0 In-Reply-To: <871vhjcvy9.wl%richard.lewis@gold.ac.uk> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71350 Archived-At: On Thursday 21 January 2010 07:35 AM, Richard Lewis wrote: > On Linux, I've been wondering whether there's a good way to run emacs > deamon outside of my login process, so that I can log out and in again > and connect to the same emacs deamon process. > > One sort of solution is running it using start-stop-deamon on Debian, > essentially as described on emacswiki: > > http://www.emacswiki.org/emacs/EmacsAsDaemon#toc3 > > However, to get this to work I've had to hack it as I describe at the > bottom of that section (running emacs using su). > > This may be more of a Linux question than an Emacs question, but does > anyone know of any better ways to do this? It's essentially just some > way to ensure that the emacs process stays alive when I log out. You don't need to do all that, logging out preserves the `emacs --daemon'. Just use `emacsclient -ca=""' to connect to the daemon. However I have seen another issue, it takes a long time to log out from the session I started the daemon. However for subsequent sessions, the login and logout is usual. I have seen this with XFCE and Gnome on two different distros. (Xubuntu 9.04 and Fedora 11) I am yet to investigate this in more detail. -- Suvayu Open source is the future. It sets us free.