Vincent Lefevre <vinc...@vinc17.net> writes:

> "su -l" is not a solution as it reset the current working directory.
> And one should still be able to run X applications after su.

Hmm, is that true?  I don't actually know, but the suggestion I'd often
heard is to generally avoid running X applications much as root, but if
I were going to, I'd use "su -", which (now that I look) does appear to
handle at least XAUTHORITY -- though I'd still be wary.

That said, I have noticed that for the past "few" years, if I run emacs
in a terminal where I've become root via "su -" and I forget to specify
-nw, it does pop up the X frame.  Surprised me the first time.

> But in any case, emacs shouldn't create files/directories if the
> user hasn't explicitly asked it to do that.

I'd expect emacs to create various files via gtk, dbus, and other
subsystems it uses, and it's certainly going to create bits like
~/.emacs and ~/.emacs.d if it needs to (for M-x customize, etc.).

Whether or not it's doing it correctly is another question, but I'm not
at all surprised that plain "su" with an X-based emacs frame (i.e. not
"emacs -nw") has trouble.

If you want to pursue this, I suspect you should pursue it upstream, or
I'll plan to forward it later if you prefer.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply via email to