* 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
* Re: emacs to run as root from su, in its own X window?
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
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2002-06-15 16:14 UTC (permalink / raw)
Cc: gnu-emacs-bug
Dan Jacobson <jidanni@deadspam.com> writes:
|> How do I get emacs to run as root when I do su, in its own X window?
You need to carry the X authorization information over to root. See
xauth(1).
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs to run as root from su, in its own X window?
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
1 sibling, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2002-06-16 2:58 UTC (permalink / raw)
Sorry for the irrelevant groups and even mangled address, but I just
wanted to say I found the solution to folks on the places where I
posted my original question. Solution =
You guys gotta be kidding about the books and classes. I found all I
needed was a simple export XAUTHORITY=$HOME/.Xauthority at the top of
the user's .xsession file and he could then su to root and run all the
X apps he wanted... probably covers 99% of the cases... [Note that if
one uses ~ instead of $HOME, one can't even login (no X app will
work) :-) ]
--
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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.