Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / xasroot.txt
blob0ed953940a078a38becc432696c0fa6102415736
1 TITLE:          Client is not authorized to connect to server
2 LFS VERSION:    any
3 AUTHOR:         Simon Perreault <nomis80@videotron.ca>
5 SYNOPSIS:
6         How root can connect to the X server while it is in use by another user.
8 HINT:
9 Perrin Aybara <vze24938@verizon.net> asked this question:
10 "Okay, this is strange.  When I try to run something graphical as root
11 (for example, my latest case-in-point: installing realplayer 7), I get
12 this: 
13 Xlib: connection to ":0.0" refused by server
14 Xlib: Client is not authorized to connect to server
15 Error: Can't open display: :0.0
17 Also, when I check the X server output in a VT, I get:
18 AUDIT: Sun Dec 31 21:24:00 2000: 18735 X: client 5 rejected from local
19 host
21 I got this trying to install Real Player 7, I got this when compiling
22 the Glade-Perl module (in the "make test" phase it pops up a graphical
23 UI you can test out), and I remember getting it a couple other times too
24 (I didn't take much notice though, didn't matter at the time for
25 whatever reason).  I'm running XFree86 4.0.2 as a normal user (not
26 root), and I'm attempting the aforementioned commands as root from an
27 Xterm.  I was always able to do such things before, so this is very
28 strange for me now.  Thanks in advance..."
30 The main problem here is that root can't connect to the X server while it is 
31 in use by another user. This happens fairly often, while installing software 
32 for example. Andy <atark@thepipeline.net> replied with this information:
33 "Try "xhost +" as the user that started X first, that should do it.  You
34 could also try "export DISPLAY=localhost:0.0" as root."
36 The "xhost +" command permits to everyone to run programs on :0.0. This 
37 includes root. And this includes every other user too. So, if you see programs 
38 popping up, maybe someone logged in is trying to harass you, you may just turn 
39 it off using the "xhost -" command. To restrict the command to only the root 
40 user, use "xhost root". The DISPLAY environment variable is used to determine 
41 which display to use when starting an X program.
43 "Another way, when su'ing to root:
45 Make sure the /root/.Xauthority file is a pointer to the
46 user's .Xauthority file.  Be sure to restore your original
47 root .Xauthority file before acutally logging in as root."
49 This might be a good way to bypass the "xhost +" part if you never login as 
50 root.
52 For my part, I've run into this problem sometimes, but on rare occasions, and 
53 I can't reproduce it. Normally, root can use every display he wishes, and no 
54 user can stop him. I've tried shutting down everyone's access to my display, 
55 but root could still use it. Bottom point is: this problem happens, this is 
56 the solution.