unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* emacs to run as root from su, in its own X window?
@ 2002-06-14 21:49 Dan Jacobson
  2002-06-15 16:14 ` Andreas Schwab
  2002-06-16  2:58 ` Dan Jacobson
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Jacobson @ 2002-06-14 21:49 UTC (permalink / raw)


This may be a debian specific problem, hence the CC.

It may be "user lack of understanding".  If so, "then beef up the
FAQs".  Or maybe I didn't look.  Anyways, I solved the problem.  I put
        xhost local:root #dangerous? else root can't open an emacs window
in ~/.xsession.  Anyways, the problem was:

How do I get emacs to run as root when I do su, in its own X window?
$ su
# emacs
Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.
# xhost
Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
xhost:  unable to open display ":0.0"
# suspend
$ xhost local:root
non-network local connections being added to access control list

OK, that fixed it.  But gee, don't you see some silly actions above,
like root doing a local command that doesn't need a DISPLAY to get its
job done being denied, etc.  Better be nice to root or he will remove you.

By the way, apt-cache show xbase-clients says
   xhost, a very dangerous program that you should never use;
Well, the man page didn't warn me.  So I used it.  Will my system be
ruined now?

By the way, on the xhost man page it says
FILES
       /etc/X*.hosts

But like hey,
ls: /etc/X*.hosts: No such file or directory

So it's a mystery where it wrote whatever it wrote.

P.S. oh, it probably didn't write anywhere, so I do the writing, in .xsession.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

end of thread, other threads:[~2002-06-16  2:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-14 21:49 emacs to run as root from su, in its own X window? Dan Jacobson
2002-06-15 16:14 ` Andreas Schwab
2002-06-16  2:58 ` Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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