View previous topic :: View next topic |
Author |
Message |
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Fri May 07, 2004 5:00 pm Post subject: NWN from TuxGames: Installer can't connect to localhost |
|
|
Hi
I bought a copy of NWN from Tux Games. When I try to install the game with the included 'Install-CD' I get the following output:
'xhost: unable to open display "localhost:0.0"
Unable to connect to display localhost:0.0
/tmp/.tuxnwnsetup/setup.run: line 44: 8514 Speicherzugriffsfehler /tmp/tuxsetup $PWD
xhost: unable to open display "localhost:0.0"
I don't realy understand this, as I can start all the other GUI-programs like Kwrite etc. out of the console without this kind of error.
Does anybody know what might be wrong or suggest some kind of solution to this?
Thanks in advance
Cay |
|
Back to top |
|
|
ToucanMan Tux's lil' helper
Joined: 28 May 2003 Posts: 97 Location: Montreal, Quebec
|
Posted: Fri May 07, 2004 5:10 pm Post subject: |
|
|
try Code: | $ xhost + localhost |
Good luck! |
|
Back to top |
|
|
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Fri May 07, 2004 5:15 pm Post subject: |
|
|
ToucanMan wrote: | try Code: | $ xhost + localhost |
Good luck! |
Nope, didn't work. |
|
Back to top |
|
|
zakk l33t
Joined: 16 Jun 2003 Posts: 614 Location: Oakland, CA
|
Posted: Fri May 07, 2004 7:53 pm Post subject: |
|
|
You have to run the xhost command as the user who ran the X display, or else you'll get a similar message about being unable to connect to the server. |
|
Back to top |
|
|
zakk l33t
Joined: 16 Jun 2003 Posts: 614 Location: Oakland, CA
|
Posted: Fri May 07, 2004 7:53 pm Post subject: |
|
|
Oh and, you can also try typing
as the user who is about to install the game |
|
Back to top |
|
|
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Fri May 07, 2004 8:24 pm Post subject: |
|
|
That's what I did:
1) Start KDE as a normal user from KDM.
2) Open a console or xterm and mount the cd-drive
3) Execute the command "source setup" from the cd-directory
I tried it with 'xhost +' and 'export DISPLAY=:0.0' but it doesn't work. I always get the same output: "Unable to connect to display localhost:0.0" and "xhost: unable to open display "localhost:0.0""
Furthermore I don't have any other problems to execute programs with GUI from the console, not even as root.
The installer itself works on my SuSE-box but doesn't work on my gentoo-system. How could I find out what the problem is? |
|
Back to top |
|
|
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Fri May 07, 2004 10:00 pm Post subject: |
|
|
One more thing: The same problem occurs on a Debian-System. So the only system it seems to work is the SuSE-system.
Now: What might be the difference??? |
|
Back to top |
|
|
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Sat May 08, 2004 11:26 am Post subject: |
|
|
OK, I suppose it's a problem with the installer-script. Here is the content of this script:
Quote: | #!/bin/sh -
if [ "x`pwd`" != "x/tmp/.tuxnwnsetup" ]
then
echo Initialising files
cdpwd=`pwd`
mkdir -p /tmp/.tuxnwnsetup
echo Extracting archive from CD
tar --exclude nwn_linux.tbz --exclude maj_demo.tbz -cf /tmp/.tuxtar *
cd /tmp/.tuxnwnsetup
echo Uncompressing archive
tar -xf /tmp/.tuxtar
chmod -R 755 /tmp/.tuxnwnsetup
rm -f /tmp/.tuxtar
exec ./setup.run $cdpwd
fi
echo $1 > /tmp/.tuxcddrive
echo "If you do not see a popup window, then please simply "
echo "untar the files in the install directory and read the "
echo "appropriate README files"
if [ "x$DISPLAY" = "x" ]
then
export DISPLAY="localhost:0.0"
else
if [ "x$DISPLAY" = "x:0" ]
then
export DISPLAY="localhost:0.0"
else
if [ "x$DISPLAY" = "x:0.0" ]
then
export DISPLAY="localhost:0.0"
fi
fi
fi
cp setup.2.1 /tmp/tuxsetup
chmod 755 /tmp/tuxsetup
xhost + localhost > /dev/null
/tmp/tuxsetup $PWD
xhost - localhost > /dev/null
rm -f /tmp/tuxsetup
rm -rf /tmp/.tuxnwnsetup
rm -f /tmp/.tuxcddrive
|
What does it wrong? Any hints? |
|
Back to top |
|
|
Caynreth n00b
Joined: 17 Apr 2004 Posts: 10
|
Posted: Sun May 09, 2004 9:36 pm Post subject: NWN from TuxGames: can't connect to localhost [SOLVED] |
|
|
Some nice person on the gentoo-users-mailing-list found the problem with the installer. I'll quote it here in case someone has a similar problem:
Quote: | >if [ "x$DISPLAY" = "x" ]
>> then
>> export DISPLAY="localhost:0.0"
***
>> else
>> if [ "x$DISPLAY" = "x:0" ]
>> then
>> export DISPLAY="localhost:0.0"
>> else
>> if [ "x$DISPLAY" = "x:0.0" ]
>> then
>> export DISPLAY="localhost:0.0"
>> fi
>> fi
***
>> fi
This is the problem. By setting DISPLAY to this value it has to be able to
make a TCP connection to the X server via localhost. By default Gentoo
configures X not to accept TCP connections and so it doesn't work. In my
opinion the installer shouldn't be changing a DISPLAY of :0 or :0.0 in this
way.
Assuming this is setup.run then edit it by removing everything between the
***s. The run the setup.run script as follows substituting the dir where you
want to install NWN.
|
Did it and it works! |
|
Back to top |
|
|
|