Well thanks,

I often need to fix a readonly or system file and out of habit use gvim. Or I want to run Synaptic which I think needs me to be su.
In Fedora, Redhat or Mandrake I never had this problem.


This only happens in Debian/Xandros

I am guessing that this is on purpose?
You did catch that I was trying to run as root.
I sometimes find that some tabs or addons to mozilla only will install if I (gasp) run mozilla as root.


Indeed your solution works.
I did think that I needed to run xev as root to see if the events were systemwide, maybe not.


In either case thanks for all the quick responses.

this pretty much solves this for me

Nadav Har'El wrote:

On Sun, Jan 25, 2004, Muli Ben-Yehuda wrote about "Re: no display":


On Sun, Jan 25, 2004 at 01:07:01PM +0200, Aaron wrote:



theone:/home/aamehl# xev
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


what does 'xhost' say? does 'xhost +localhost' or 'xhost +' help? be



You may want to try "xhost +" and see if that helps (it should, if I understood your problem correctly), but PLEASE, don't adopt this as a permanent solution. It's a dangerous habit to get into.

I am guessing that your problem is that your X Windows session is logged
in as an ordinary user (your own account, aamehl), and you tried to run
"xev" as root (judging from your prompt, "#").

You may be surprised that root can't do something that an ordinary user can, but X-Windows authentication actually works differently from the
ordinary Unix permission model, because it is aimed to work across hosts,
not just on one host. The usual X authorization setup (verbosely called
MIT-MAGIC-COOKIE-1) is that the X server chooses a random string and puts
it in a file in your home directory (~/.Xauthority). Now, every time you
run an X Windows program it reads that string and sends it to the X server,
as a proof it is running under your account (this file is unreadable to
others). If you want to run X programs from other accounts (on this, or a
different machine), including the root account, you'll need to transfer the
authentication string, usually with the xauth(1) command. For root, there's
an easier workaround: try running


HOME=/home/aamehl xev

which runs xev with your home (rather than /root) as the home directory.
When xev starts, it reads your ~/.Xauthority, rather than root's, and finds
the appropriate authentication string. This works because root can actually
read your private files - it won't work for other users on your machine for
which this file is unreadable.

Hope this helps.







================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to