Re: another Xauthority problem?

1998-08-06 Thread Jens B. Jorgensen
Chris Evans wrote:

 Many, many thanks for your help...

 On 5 Aug 98, at 12:54, Jens B. Jorgensen wrote:

  First thing is: are you su-ing and then running emacs? When you su you
  lose your XAUTHORITY environment variable. The variables points to a file
  which is used to authenticate you to the X server. What's more, the
  permissions on xauthority files are set 600 so that only the user logged
  in can access them (naturally). If you're su-ing to root this doesn't pose
  a problem since root can read any file. If you're su-ing to another user
  you'll have to extract the proper auth record and put it into the target
  user's xauthority file (or disable X security--not recommended).
 
  So step by step: do you have an XAUTHORITY environment var?
 
  echo $XAUTHORITY
 
  If you don't, you need one. If you logged in with xdm then you should have
  an xauthority file as ~/.Xauthority. Check to see if this file exists. Now
  set
 
  export XAUTHORITY=path to xauthority file
 
  Try again to run program. If it doesn't work then perhaps you don't have
  permission to the file or there's no entry for your display. Run 'xauth'
  and at the prompt type 'list'. Do you see an entry for the DISPLAY you're
  trying to use? If you're trying to reach the server running on same
  machine you'll be interested in the 'machine name/unix:0' entry most
  likely. If this entry isn't there then you'll have to get it by exporting
  the entry from the correct xauthority file and importing it into your
  xauthority file.
 
 Interesting thing is that someone else (Eric Marsden) put me onto
 xauth and I did the xauth merge to get the .Xauthority there for root
 and that's fixed the problem.  However, I don't seem to have an
 environment variable XAUTHORITY nor DISPLAY.  I have the sense
 that something, presumably a shell script (??) has got lost when
 Dselect set up my X system.  How should these variables be
 exported routinely and do I need them?

Hmmm. That shouldn't happen. Do you have them before you su? These variables are
set by xdm and your window manager. When you start up an xterm, it will inherit
the environment variables from the process which started it. If it's set to be a
login shell then /etc/profile and ~/.bash_profile will be read and processed.
These could also manipulate your environment. The shell will also process
~/.bashrc. I think I'm a little confused though on exactly when you experience
the problem. Does emacs fail only after you've su'd?

 Really appreciate your input on this.

Sure.

--
Jens B. Jorgensen
[EMAIL PROTECTED]



--  
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null


another Xauthority problem?

1998-08-05 Thread Chris Evans
I have got Debian Hamm and X up and working and am really 
pleased.  With help from the list I have got the recompile for SMP 
working and got X launching.  However, I still have an X problem 
and can't work out the answer from the archives or the doc files I've 
found.

The problem is under fvwm but occurs under olwm too.  I can 
launch emacs as a regular user (or su) from the window manager 
drop down menu but when I try to invoke it from the xterm 
command line I get:

Xlib: connection to :0.0 refused by server
Xlib: invalid MIT-MAGIC-COOKIE-1 key
emacs: cannot connect to X server :0.

I've tried resetting the environment variable DISPLAY from 0.0 to 0 
and to psyctc1.sghms.ac.uk (address of the machine, vague 
recollections from using an Xserver on an Windoze box to access X 
clients on Sun (or maybe it was SG?) in the past).

Something very similar happens with xedit.

Archive entries seem to say something about an .Xauthority file 
which my ordinary user account doesn't have. Same thing happens 
after su in xterm though.  

I am sure I'm getting my permissions wrong but can't find the 
magic key or magic cookie.  Anyone put me straight?!

Chris 


--  
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null


Re: another Xauthority problem?

1998-08-05 Thread Jens B. Jorgensen
First thing is: are you su-ing and then running emacs? When you su you lose your
XAUTHORITY environment variable. The variables points to a file which is used to
authenticate you to the X server. What's more, the permissions on xauthority 
files are
set 600 so that only the user logged in can access them (naturally). If you're 
su-ing
to root this doesn't pose a problem since root can read any file. If you're 
su-ing to
another user you'll have to extract the proper auth record and put it into the 
target
user's xauthority file (or disable X security--not recommended).

So step by step: do you have an XAUTHORITY environment var?

echo $XAUTHORITY

If you don't, you need one. If you logged in with xdm then you should have an
xauthority file as ~/.Xauthority. Check to see if this file exists. Now set

export XAUTHORITY=path to xauthority file

Try again to run program. If it doesn't work then perhaps you don't have 
permission to
the file or there's no entry for your display. Run 'xauth' and at the prompt 
type
'list'. Do you see an entry for the DISPLAY you're trying to use? If you're 
trying to
reach the server running on same machine you'll be interested in the 'machine
name/unix:0' entry most likely. If this entry isn't there then you'll have to 
get it
by exporting the entry from the correct xauthority file and importing it into 
your
xauthority file.

Chris Evans wrote:

 I have got Debian Hamm and X up and working and am really
 pleased.  With help from the list I have got the recompile for SMP
 working and got X launching.  However, I still have an X problem
 and can't work out the answer from the archives or the doc files I've
 found.

 The problem is under fvwm but occurs under olwm too.  I can
 launch emacs as a regular user (or su) from the window manager
 drop down menu but when I try to invoke it from the xterm
 command line I get:

 Xlib: connection to :0.0 refused by server
 Xlib: invalid MIT-MAGIC-COOKIE-1 key
 emacs: cannot connect to X server :0.

 I've tried resetting the environment variable DISPLAY from 0.0 to 0
 and to psyctc1.sghms.ac.uk (address of the machine, vague
 recollections from using an Xserver on an Windoze box to access X
 clients on Sun (or maybe it was SG?) in the past).

 Something very similar happens with xedit.

 Archive entries seem to say something about an .Xauthority file
 which my ordinary user account doesn't have. Same thing happens
 after su in xterm though.

 I am sure I'm getting my permissions wrong but can't find the
 magic key or magic cookie.  Anyone put me straight?!

 Chris

 --
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null



--
Jens B. Jorgensen
[EMAIL PROTECTED]



--  
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null