Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NWN from TuxGames: Installer can't connect to localhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Fri May 07, 2004 5:00 pm    Post subject: NWN from TuxGames: Installer can't connect to localhost Reply with quote

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
View user's profile Send private message
ToucanMan
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2003
Posts: 97
Location: Montreal, Quebec

PostPosted: Fri May 07, 2004 5:10 pm    Post subject: Reply with quote

try
Code:
$ xhost + localhost

Good luck!
Back to top
View user's profile Send private message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Fri May 07, 2004 5:15 pm    Post subject: Reply with quote

ToucanMan wrote:
try
Code:
$ xhost + localhost

Good luck!


Nope, didn't work.
Back to top
View user's profile Send private message
zakk
l33t
l33t


Joined: 16 Jun 2003
Posts: 614
Location: Oakland, CA

PostPosted: Fri May 07, 2004 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
zakk
l33t
l33t


Joined: 16 Jun 2003
Posts: 614
Location: Oakland, CA

PostPosted: Fri May 07, 2004 7:53 pm    Post subject: Reply with quote

Oh and, you can also try typing
Code:
export DISPLAY=:0

as the user who is about to install the game
Back to top
View user's profile Send private message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Fri May 07, 2004 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Fri May 07, 2004 10:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Sat May 08, 2004 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Caynreth
n00b
n00b


Joined: 17 Apr 2004
Posts: 10

PostPosted: Sun May 09, 2004 9:36 pm    Post subject: NWN from TuxGames: can't connect to localhost [SOLVED] Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum