Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jul 1997 14:04:50 -0000
From:      "P. van Leeuwen" <pvl@nanoteq.com>
To:        "'Steve Howe'" <un_x@anchorage.net>, freebsd-questions <questions@FreeBSD.ORG>
Subject:   RE: in Xterm as root.
Message-ID:  <01BC87BA.1446C3A0@pc-pvl.nanoteq.co.za>

Next in thread | Raw E-Mail | Index | Archive | Help
First check the environment variable DISPLAY. It should be :0.0
If that checks out, you probably have a xauthority problem. Im guessing
that you ran xdm, logged in as a user and then used su to become root. 
The problem is that the .Xauthority file in /root isn't updated when you su.
The fix is to run 

xauth -f /root/.Xauthority merge /home/user_I_su'ed_from/.Xauthority

See man xauth.

I inserted the above line in my /root/.login after a line which checks whether 
I su'ed. I can then run the graphical version of CVSup :)

One last thing, make sure that there isn't a line saying xhosts + in any of
your startup dotfiles. Type xhosts - to see if your problem goes away.

Hope this helps
Pierre

P. van Leeuwen
pvl@nanoteq.com
http://www.nanoteq.co.za

-----Original Message-----
From:	Steve Howe [SMTP:un_x@anchorage.net]
Sent:	Thursday, July 03, 1997 12:52 PM
To:	freebsd-questions
Subject:	in Xterm as root.


in an Xterm window, as "superuser" - root, 

i get "Error: cannot open display" errors

when i try to launch a "graphics" application
such as XV, GV, GhostView, Netscape, etc.

i know i shouldn't want to do this,
but was wondering if something is wrong.
------------------------------------------------
all my text based apps work ok.
and all my graphical based apps
work ok as a normal user.





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?01BC87BA.1446C3A0>