LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't startx or anything (http://www.linuxquestions.org/questions/slackware-14/cant-startx-or-anything-343186/)

lydgate 07-14-2005 02:51 PM

Can't startx or anything
 
Okay, I had a fully working Slackware-current distro with gware gnome on my new laptop. I've been using it for a few weeks. Today I wanted to try to install gnucash, so I was trying to ./configure that but it needed g-wrap, so I went and got that and was messing with it. There was no slackware package, so I initially tried compiling g-wrap, but it was giving me errors that I didn't really understand. I got the redhat version and tried rpm2tgz and alien to install it, and then removed it a few times using pkgtool (because the ./configure for gnucash was still telling me that g-wrap wasn't installed).

One of the times that I removed g-wrap, my amarok crashed, and a lot of gnome's icons turned to red Xs. So I thought I'd reboot. I quit out, and tried rebooting. Well, I can log in, but now it seems that the paths to everything are messed up. When I log in it can't find fortune to display the little MOTD. I can't startx, it says not found, and when I type the full path to it, it says xauth not found. I am pretty positive that I didn't remove any other package except g-wrap.

Let me know if there's anything I need to post here or tell you, I can still get around in the terminal but I can't get into X or use many commandline tools from a regular user. When I su I get the path to some things, but others it says it can't find. But they're all there, it just seems that somehow the path is messed up.

Any help greatly appreciated.

keefaz 07-14-2005 03:26 PM

When you login what is your output with :
Code:

echo $PATH

lydgate 07-14-2005 03:33 PM

Code:

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/bin

keefaz 07-14-2005 03:35 PM

Now if you type startx, what is the exact error ?

Also what is the output with :
ls -l /usr/X11R6/bin/startx

lydgate 07-14-2005 03:39 PM

Code:

-bash: startx: command not found
and
Code:

-rwxr-xr-x 1 root bin 3190 2005-02-13 22:07 /usr/X11R6/bin/startx

keefaz 07-14-2005 03:42 PM

is it the same behaviour if you type :
/usr/X11R6/bin/startx

Also what is the output with :
ls -l /usr/X11R6/bin/xterm
ls -l /usr/X11R6/bin/X

lydgate 07-14-2005 03:49 PM

Code:

/usr/X11R6/bin/startx: line 132: xauth: command not found
/usr/X11R6/bin/startx: line 133: xauth: command not found
/usr/X11R6/bin/startx: line 132: xauth: command not found
/usr/X11R6/bin/startx: line 133: xauth: command not found
/usr/X11R6/bin/startx: line 141: xauth: command not found
/usr/X11R6/bin/startx: line 144: xauth: command not found

Code:

-rwxr-xr-x 1 root bin 261440 2005-02-13 22:14 /usr/X11R6/bin/xterm
Code:

lrwxrwxrwx 1 root root 4 2005-06-15 18:08 /usr/X11R6/bin/X -> Xorg

keefaz 07-14-2005 03:57 PM

Weird ;)

Do you have xauth ?
ls -l /usr/X11R6/bin/xauth

Could you try :
Code:

bash --login
startx

You're simple user, not root, aren't you ?
if it fails, try :
Code:

exit
export PATH=/bin:/usr/bin:/usr/X11R6/bin
startx


gbonvehi 07-14-2005 04:01 PM

Check the permissions starting at the root directory (/). It happened once to a friend of mine that directory permissions got corrupted and couldn't execute anything.
If you find a directory with wrong permissions (probably /usr) get inside it and check the permissions there, do that until you've no more directories to search.

keefaz 07-14-2005 04:07 PM

I didn't think of that (command not found)
You could check the permissions quickly with :
Code:

find / -type d -name '*bin' -maxdepth 3 -ls 2> /dev/null

lydgate 07-14-2005 04:10 PM

Yes, xauth is there:
Code:

-rxwr-xr-x 1 root bin 32636 2005-02-13 22:14 /usr/X11R6/bin/xauth
If I do bash --login from regular user I get:
Code:

bash: id: command not found

bash: fortune: command not found

bash: id: command not found

If I do bash --login from su it shows the login stuff.

As simple user I tried the export line you gave me and it still can't find bash.

I'm not sure what permissions should look like (I'm really new) but I did ls -l / and I see that /usr comes up as
Code:

drwx------
I think that's wrong? Inside /usr the directories that look just like that are doc, lib, and share

lydgate 07-14-2005 04:14 PM

Also, following the command keefaz gave, I get all
Code:

drwxr-xr-x
for those directories.

keefaz 07-14-2005 04:20 PM

So maybe try a chmod +rx /usr as root ;)
(as gbonvehi pointed out)

gbonvehi 07-14-2005 04:21 PM

Adding to what keefaz said, you should also set read permissions with: chmod +r /usr

After doing this get into /usr and check for "weird" permissions there.


drwx------
Explaining permissions, the first letter indicates stuff about that file, in this case, the 'd' because it's a directory. Then it comes in three groups of three letters the following permissions: read write execute
The first group is for owner, the second for group and the third for others.

You can find more about this here: http://slackbook.org/html/filesystem-structure.html (and the next page which talks specifically about permissions).

lydgate 07-14-2005 04:37 PM

okay, chmod +xr on /usr /usr/lib /usr/share and /usr/doc seemed to do the trick, now I can startx and everything seems to be fine.

Anyone know how those permissions could have gotten messed up in the first place?


All times are GMT -5. The time now is 11:24 AM.