# startx = hostname: Host name lookup failure

## canduc17

Ciao. Ho appena finito di installare kdebase su un amd athlon xp.

Nessun problema rilevato. Allora ho continuato emergendo kde-i18n, e anche qui tutto a posto.

Poi ho digitato il classico

```
echo "exec startkde" > ~/.xinitrc
```

 e subito dopo

```
startx
```

sperando fiducioso che partisse kde.

E invece:

```
hostname: Host name lookup failure

/usr/bin/startx: line 111: xauth: command not found

/usr/bin/startx: line 121: xauth: command not found

/usr/bin/startx: line 123: xauth: command not found

/usr/bin/startx: line 121: xauth: command not found

/usr/bin/startx: line 123: xauth: command not found

xinit: No such file or directory (errno 2): no server "X" in PATH

Use the -- option, or make sure that /usr/bin is in your path and that "X" is a program or a link to the rigth type of server for your display. Possible server names include:

Xorg      X.Org displays

xinit:  Server error.

/usr/bin/startx: line 141: xauth: command not found
```

Cosa è successo?!

Se faccio X -configure mi risponde: 

```
-bash: X: command not found
```

Help!

----------

## cloc3

 *canduc17 wrote:*   

> Cosa è successo?!
> 
> 

 

```

s939 ~ # equery b xauth

[ Searching for file(s) xauth in *... ]

x11-apps/xauth-1.0.1 (/usr/bin/xauth)

```

a quanto pare, ti è sfuggita la compilazione di qualche pacchetto.

O forse molti pacchetti, visto che ti manca addirittura il server X...

Io ripartirei con calma da un'occhiata a questa pagina del manuale.

Sicuramente, infatti, qualcosa nelle procedure che hai seguito era scorretto.

----------

## canduc17

Ho provato a digitare 

```
equery b xauth
```

 e mi dice 

```
-bash: equery: command not found
```

...

----------

## ^Stefano^

postaci il contenuto di /etc/profile che secondo me ti si è brasato il PATH. difatti "make sure that /usr/bin is in your path" è un opzione che ti viene suggerita. inoltre il fatto che non trova neanche equery potrebbe esserne la dimostrazione

```
genlab stefano # whereis equery

equery: /usr/bin/equery /usr/X11R6/bin/equery /usr/share/man/man1/equery.1.gz

genlab stefano #

```

Poi kde, se X non è installato nel tuo sistema, dovrebbe tirarselo dietro come dipendenza.

----------

## canduc17

Il mio /etc/profile è:

```
# /etc/profile:

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.28.4.3 2005/04/29 03:34:01 vapier Exp $

#

# That this file is used by any Bourne-shell derivative to setup the

# environment for login shells.

# Load environment settings from profile.env, which is created by

# env-update from the files in /etc/env.d

if [ -e /etc/profile.env ] ; then

   . /etc/profile.env

fi

# 077 would be more secure, but 022 is generally quite realistic

umask 022

# Set up PATH depending on whether we're root or a normal user.

# There's no real reason to exclude sbin paths from the normal user,

# but it can make tab-completion easier when they aren't in the

# user's PATH to pollute the executable namespace.

#

# It is intentional in the following line to use || instead of -o.

# This way the evaluation can be short-circuited and calling whoami is

# avoided.

if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then

   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"

else

   PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"

fi

export PATH

unset ROOTPATH

# Extract the value of EDITOR

[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"

[ -z "$EDITOR" ] && EDITOR="/bin/nano"

export EDITOR

if [ -n "${BASH_VERSION}" ] ; then

   # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1

   # including color.  We leave out color here because not all

   # terminals support it.

   if [ -f /etc/bash/bashrc ] ; then

      # Bash login shells run only /etc/profile

      # Bash non-login shells run only /etc/bash/bashrc

      # Since we want to run /etc/bash/bashrc regardless, we source it 

      # from here.  It is unfortunate that there is no way to do 

      # this *after* the user's .bash_profile runs (without putting 

      # it in the user's dot-files), but it shouldn't make any 

      # difference.

      . /etc/bash/bashrc

   else

      PS1='\u@\h \w \$ '

   fi

else

   # Setup a bland default prompt.  Since this prompt should be useable

   # on color and non-color terminals, as well as shells that don't

   # understand sequences such as \h, don't put anything special in it.

   PS1="`whoami`@`uname -n | cut -f1 -d.` \$ "

fi

```

E se provo a digitare 

```
whereis equery
```

 questo è l'output 

```
equery:
```

----------

## ^Stefano^

ma il pacchetto gentoolkit è installato? equery dovrebbe essere li dentro. 

Il tuo PATH è apposto, sei sicuro che Xorg sia installato correttamente?

----------

