Results 1 to 4 of 4
I'm trying to install a program from a .sh file and I use the command "sh" I get this error:
The DISPLAY variable is not set. You should either login ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-25-2006 #1Just Joined!
- Join Date
- Jan 2006
- Posts
- 2
can't figure out how to install with su and sh
I'm trying to install a program from a .sh file and I use the command "sh" I get this error:
The DISPLAY variable is not set. You should either login to as root or use
the command "su" with no flags, to make sure setup has an X display to use.
Then I tried su commands and xhost and this is what I got:
XANN3OMVT56:/home/adam/Shared# su
XANN3OMVT56:/home/adam/Shared# xhost +localhost
xhost: unable to open display "localhost:0.0"
XANN3OMVT56:/home/adam/Shared# export DISPLAY=localhost:0.0
XANN3OMVT56:/home/adam/Shared# xhost +localhost
xhost: unable to open display "localhost:0.0"
XANN3OMVT56:/home/adam/Shared# sh install.sh
Verifying archive integrity...OK
Uncompressing CrossO............................................
you have no permissions to access the X server (localhost:0.0) it points to.
Try running xhost +localhost before su'ing to root.
I tried diffent comdinations just to be sure I just didn't do it in the right order
- 01-25-2006 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 678
The line "xhost +localhost" must be run as the user who owns the console. That is the user you logged into X as.
If you su to root first, it doesn't have permission to alter the X session so it can't add permissions for localhost.
Let us know how you get on
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.
- 01-25-2006 #3Just Joined!
- Join Date
- Jan 2006
- Posts
- 2
no change
I just tried that and got the same result... it says this before I do the su command:
access control disabled, clients can connect from any host
any ideas??
- 01-25-2006 #4Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 678
Try dropping the localhost when setting up the display.
Also, which distro are you using? Having access controls disabled is unusual in my experience (unless you ran "xhost +" by itself).Code:#export DISPLAY=:0.0 #sh install.sh
Let us know how you get on
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.


Reply With Quote
