emacs to run as root from su, in its own X window?
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.bug as well.
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
--
To UNSUBSCRIBE, email to debian-emacsen-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: