unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* gksu and server
@ 2018-12-05 17:07 Michael Heerdegen
  2018-12-05 17:31 ` tomas
  2018-12-05 17:47 ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Heerdegen @ 2018-12-05 17:07 UTC (permalink / raw)
  To: Emacs mailing list

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gksu and server
  2018-12-05 17:07 gksu and server Michael Heerdegen
@ 2018-12-05 17:31 ` tomas
  2018-12-05 18:56   ` Michael Heerdegen
  2018-12-05 17:47 ` Glenn Morris
  1 sibling, 1 reply; 6+ messages in thread
From: tomas @ 2018-12-05 17:31 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

On Wed, Dec 05, 2018 at 06:07:34PM +0100, Michael Heerdegen wrote:
> 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:<user@host>:/path/to/file?

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

Cheers
-- t 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gksu and server
  2018-12-05 17:07 gksu and server Michael Heerdegen
  2018-12-05 17:31 ` tomas
@ 2018-12-05 17:47 ` Glenn Morris
  2018-12-05 18:32   ` Michael Heerdegen
  1 sibling, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2018-12-05 17:47 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Emacs mailing list

Michael Heerdegen wrote:

>   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

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gksu and server
  2018-12-05 17:47 ` Glenn Morris
@ 2018-12-05 18:32   ` Michael Heerdegen
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2018-12-05 18:32 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs mailing list

Glenn Morris <rgm@gnu.org> writes:

> I imagine due to
> http://lists.gnu.org/r/emacs-diffs/2018-12/msg00010.html

Hmm, seems so, thanks.

Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gksu and server
  2018-12-05 17:31 ` tomas
@ 2018-12-05 18:56   ` Michael Heerdegen
  2018-12-05 20:20     ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2018-12-05 18:56 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

<tomas@tuxteam.de> writes:

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gksu and server
  2018-12-05 18:56   ` Michael Heerdegen
@ 2018-12-05 20:20     ` tomas
  0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2018-12-05 20:20 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

On Wed, Dec 05, 2018 at 07:56:54PM +0100, Michael Heerdegen wrote:
> <tomas@tuxteam.de> writes:
> 
> > 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

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-05 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 17:07 gksu and server Michael Heerdegen
2018-12-05 17:31 ` tomas
2018-12-05 18:56   ` Michael Heerdegen
2018-12-05 20:20     ` tomas
2018-12-05 17:47 ` Glenn Morris
2018-12-05 18:32   ` Michael Heerdegen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).