Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've had this problem off and on for weeks now and can't figure it out.
As a normal user I can run emacs and xemacs without any difficulties. As su I can sometimes run them and sometimes not. At the moment, not. Here's the error message I get when I try:
# emacs
Xlib: connection to ":0.0" refused by server
Xlib: Invalid XDM-AUTHORIZATION-1 key (failed key comparison)
emacs: Cannot connect to X server :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.
I read the page on xauth and the man entry on xauth, and I think I understand roughly what your getting at. It looks like when I change to su, that su needs to have the authorization key in its xauth file before it is "allowed" to run any x-server applications. Is that correct? Seems like a slightly emasculated super user, but I guess that's beside the point. In any event, how do I do it? It wasn't entirely clear to me, and I'm afraid of breaking something. As su do I run xauth set <32-digit-key-from-xauth-list-as-user> or the other way around?
Seems like a lot of trouble when all I want to do is change my /etc/fstab file without using vi or logging off and logging on as root.
Furthermore, I have exactly the same distro at work (SuSE 8 pro) and emacs runs fine there in su, without ever having screwed with the xauth. What's the difference
Thank you. I don't know yet if your suggestion will fix the problem or not, for without having done anything (I am aware of) the problem has gone away. Now I can run both emacs and xemacs as su. This has happened before. My guess is that next time I reboot the problem will reoccur. At that point I will try your suggestions.
I'd love to know what causes the change in behavior.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.