![](https://seccdn.libravatar.org/avatar/51ec7cc9d995ca9f604ff1301e1e0dc0.jpg?s=120&d=mm&r=g)
Hi guys! Please excuse me if this question has already been asked and solved -- I don't have much time to read through the archives. At any rate, whenever I use a terminal or shell (it doesn't matter which), and switch users to root, I get the following error whenever I try opening any type of file using emacs: linux:/usr/local/pmfirewall # emacs pmfirewall.rules.masq 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. The same thing happens even when I try to use some programs, like xkill: linux:/usr/share # xkill & [1] 10141 linux:/usr/share # Xlib: connection to ":0.0" refused by server Xlib: Invalid XDM-AUTHORIZATION-1 key (failed key comparison) xkill: unable to open display ":0" linux:/usr/share # The funny thing is that *sometimes* emacs and other programs will work, but most of the time they will not. Everything works perfectly fine when I am a regular user, the problem only occurs while root. Does anyone have any clues, suggestions, tips, solutions? Please let me know. Thank you to anyone who responds. --Chris
![](https://seccdn.libravatar.org/avatar/69feec68fdd742557d319be797b1e52b.jpg?s=120&d=mm&r=g)
Even su can't use the X display that is owned by another user. To quickly alleviate this, use sux instead of su Same thing..but includes the rights to use the current owners X display. HTH On Tuesday 14 May 2002 1:27 pm, Jessie Christop Nitura Diaz wrote:
Hi guys! Please excuse me if this question has already been asked and solved -- I don't have much time to read through the archives. At any rate, whenever I use a terminal or shell (it doesn't matter which), and switch users to root, I get the following error whenever I try opening any type of file using emacs:
linux:/usr/local/pmfirewall # emacs pmfirewall.rules.masq 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.
The same thing happens even when I try to use some programs, like xkill:
linux:/usr/share # xkill & [1] 10141 linux:/usr/share # Xlib: connection to ":0.0" refused by server Xlib: Invalid XDM-AUTHORIZATION-1 key (failed key comparison) xkill: unable to open display ":0" linux:/usr/share #
The funny thing is that *sometimes* emacs and other programs will work, but most of the time they will not. Everything works perfectly fine when I am a regular user, the problem only occurs while root. Does anyone have any clues, suggestions, tips, solutions? Please let me know.
Thank you to anyone who responds. --Chris
-- Mark Doucette kranked@oberon.ark.com WinFree and Lovin' it. SuSE Rox Linux! Registered Linux User # 240512 ----////----
participants (2)
-
Jessie Christop Nitura Diaz
-
Mark Doucette