Discussion:
gksu and server
Michael Heerdegen
2018-12-05 17:07:34 UTC
Permalink
Hi,

I used to start a graphical Emacs for other user (Debian here btw) from
a running X session with gksu, an su frontend. Since some days,
starting the Emacs server from such an Emacs instance fails with

signal(file-error ("Creating directory" "Permission denied" "/run/user/1000/emacs"))
files--ensure-directory("/run/user/1000/emacs")
make-directory("/run/user/1000/emacs" t)
server-ensure-safe-dir("/run/user/1000/emacs")
server-start(nil inhibit-prompt)

User 1000 is the one owning the X session - i.e. the wrong one.

I dunno what makes the difference. Does anyone know why this could be
happening?


Thanks,

Michael
t***@tuxteam.de
2018-12-05 17:31:12 UTC
Permalink
Post by Michael Heerdegen
Hi,
I used to start a graphical Emacs for other user (Debian here btw) from
a running X session with gksu, an su frontend. Since some days,
starting the Emacs server from such an Emacs instance fails with
signal(file-error ("Creating directory" "Permission denied" "/run/user/1000/emacs"))
files--ensure-directory("/run/user/1000/emacs")
make-directory("/run/user/1000/emacs" t)
server-ensure-safe-dir("/run/user/1000/emacs")
server-start(nil inhibit-prompt)
User 1000 is the one owning the X session - i.e. the wrong one.
I dunno what makes the difference. Does anyone know why this could be
happening?
Uh-oh. It looks like Emacs trying to start a server (probably running as
a different user, because of gksu, but probably inheriting something
magical from your environment, because it's trying to hit /run/user/1000).

To me it looks like desktop environment conventions getting tangled up
in their own red tape.

I don't use a DE, so I can't be of much help. But to answer a question
you haven't posed (soory ;-): have you tried Tramp's /sudo:<***@host>:/path/to/file?

Since I learnt that I've no need to start Emacs under another UID anymore...

Cheers
-- t
Michael Heerdegen
2018-12-05 18:56:54 UTC
Permalink
Post by t***@tuxteam.de
To me it looks like desktop environment conventions getting tangled up
in their own red tape.
I use a window manager (openbox) without a desktop environment.

As Glenn noted, it happens because of this:
http://lists.gnu.org/r/emacs-diffs/2018-12/msg00010.html

For now I fixed it by setting server-socket-dir in .emacs but it's not
good that one needs to do this.

Michael.
t***@tuxteam.de
2018-12-05 20:20:56 UTC
Permalink
Post by Michael Heerdegen
Post by t***@tuxteam.de
To me it looks like desktop environment conventions getting tangled up
in their own red tape.
I use a window manager (openbox) without a desktop environment.
http://lists.gnu.org/r/emacs-diffs/2018-12/msg00010.html
A-hah. My Emacs was too old (Nov 27). Sorry for the noise.

That means it might hit me soon, too. So thanks for the heads-up.

Cheers
-- tomás

Glenn Morris
2018-12-05 17:47:22 UTC
Permalink
Post by Michael Heerdegen
signal(file-error ("Creating directory" "Permission denied"
"/run/user/1000/emacs"))
I imagine due to
http://lists.gnu.org/r/emacs-diffs/2018-12/msg00010.html
Post by Michael Heerdegen
User 1000 is the one owning the X session - i.e. the wrong one.
Michael Heerdegen
2018-12-05 18:32:13 UTC
Permalink
Post by Glenn Morris
I imagine due to
http://lists.gnu.org/r/emacs-diffs/2018-12/msg00010.html
Hmm, seems so, thanks.

Michael.
Continue reading on narkive:
Loading...