help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudo emacsclient


From: Richard Riley
Subject: Re: sudo emacsclient
Date: Mon, 26 Oct 2009 19:30:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Harry Putnam <reader@newsguy.com> writes:

> How can I make emacslcient as handy to use as:
>
>   sudo vim /etc/some.conf
>
> Do I have to start a daemon as root?
>
> I'd like to start the daemon from user account but be able to access
> it like:
>    sudo emacsclient -s name file
>
> But trying that produces this error:
>  sudo emacsclient -s name file
> emacsclient: can't find socket; have you started the server?
> To start the server in Emacs, type "M-x server-start".
> emacsclient: error accessing socket "/tmp/emacs0/gen"
>
> ps shows the server running:
>
>  ps wwaux|grep emacs.*\-daemon
>  reader  [...] emacs --daemon=name
>

I use this small script to start emacs :-

,----
| #!/bin/bash
| # edit
| export GDK_NATIVE_WINDOWS=1
| emacsclient --alternate-editor="" -c $@
`----

It starts the daemon if not already started. use tramp to access files
as root : see other reply.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]