Click to See Complete Forum and Search --> : startx fails


Ghazgkull
09-23-2001, 01:20 PM
In my attempts at getting Quake3 running under Linux I apparently broke something. If I set my default run level to 3, log in at the console as a user, and run "startx" I get the following error:

/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: exec: xinit: not found

startx used to work just fine (and still does for root). It's supposed to load Ximian Gnome (though I'm not sure if that's determined by /etc/sysconfig/desktop or some other file).

If I set my default run level back to 5, my machine loads kdm just fine and I can log into KDE as usual. However, I don't want to set my run level to 5.

It might also be useful to note that if I try "exec startkde" from the console, I get the following error:

/usr/bin/startkde: xsetroot: command not found
/usr/bin/startkde: xmodmap: command not found
/usr/bin/startkde: xmodmap: command not found
/usr/bin/startkde: mkfontdir: command not found
/usr/bin/startkde: xset: command not found
/usr/bin/startkde: mkfontdir: command not found
/usr/bin/startkde: xset: command not found
/usr/bin/startkde: xset: command not found
ksplash: cannot connect to X server
Aborting. $DISPLAY is not set.
Aborting. $DISPLAY is not set.
ERROR: KUniqueApplication: Pipe closed unexpected.
ksmserver: cannot connect to X server

I'm still a newbie and I have no idea how to fix these problems. Any help would be appreciated.

Thanks,
- Ghaz

TheBouleOfFools
09-23-2001, 03:45 PM
Sounds like the permissions on startx got all screwy. Try chmod a+x /usr/X11R6/bin/startx.

Ghazgkull
09-23-2001, 05:37 PM
Thanks for the response.

Given the fact that it works for my root account, I agree that it would seem to be a permissions problem. However, I tried the fix you suggested to no avail.

- Ghaz

X_console
09-23-2001, 05:44 PM
Actually, it sounds like a PATH problem to me. Does your regular account have the PATHs for xauth and xinit? Also, are you allowed to run xauth and xinit? Try adding xauth and xinit to your PATH and see if it works.

Ghazgkull
09-23-2001, 06:24 PM
My user account has /usr/X11R6/bin on the PATH (xauth and xinit both reside therein).

The entire planet has read and execute permissions on both files.

It is probably also important for me to mention that I built and installed new NVidia drivers today following these directions (http://www.littlewhitedog.com/reviews_other_00022.asp). Unfortunately, I can't recall if startx stopped working immediately after I built/installed these drivers or if it started sometime thereafter.

Thanks,
- Ghaz

Ghazgkull
09-24-2001, 06:44 PM
...so I'm screwed then? :confused:

- Ghaz

X_console
09-24-2001, 08:22 PM
Hm, startx should be a shell script. Try adding the following right at the top:

PATH=/usr/X11R6/bin/

Save the file and try again.

Ghazgkull
09-24-2001, 09:19 PM
Interesting.

I did as you suggested and got different results. It got significantly further this time, spamming me with a bunch of output and even changing screen resolution like it was about to succeed, but then it dropped back to the console and the output ended with the following errors:
sh: cat: command not found
/etc/X11/Xsession: which: command not found
/etc/X11/Xsession: which: command not found
/etc/X11/xinit.d/imwheel: which: command not found
/etc/X11/xinit.d/Mod_Meta_L_Disable: grep: command not found
/etc/X11/Xsession: exec: sh: not found


waiting for X server to shut down


If you think the rest of the output (there's a lot of it) would be useful, let me know and I can post that too.

Something is really F'ed up, huh?
- Ghaz

Ghazgkull
09-25-2001, 10:56 AM
Well, I (sort of) figured out what the problem was.

If I just logged into the console and did a "echo $PATH," /usr/X11R6/bin was listed as the last entry. However, when I added "echo $PATH" to the top of my /usr/X11R6/bin/startx script, the last entry was listed as "/usr/X11R6/bin=" I didn't have time to track down where the '=' was getting added to my PATH, but I did have time to add "PATH=$PATH:/usr/X11R6/bin" to the top of my startx script and, lo and behold, it worked again.

When I get home from work, I'll poke around through my scripts to see if I can find where the '=' is getting added. It seems really odd that it's not there when I echo from the console, but it suddenly appears when I echo it from the startx script.

Thanks for the help,
- Ghaz

TheBouleOfFools
09-25-2001, 08:36 PM
I'm dumb :(