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. |
When you login what is your output with :
Code:
echo $PATH |
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 |
Now if you type startx, what is the exact error ?
Also what is the output with : ls -l /usr/X11R6/bin/startx |
Code:
-bash: startx: command not found Code:
-rwxr-xr-x 1 root bin 3190 2005-02-13 22:07 /usr/X11R6/bin/startx |
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 |
Code:
/usr/X11R6/bin/startx: line 132: 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 |
Weird ;)
Do you have xauth ? ls -l /usr/X11R6/bin/xauth Could you try : Code:
bash --login if it fails, try : Code:
exit |
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. |
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 |
Yes, xauth is there:
Code:
-rxwr-xr-x 1 root bin 32636 2005-02-13 22:14 /usr/X11R6/bin/xauth Code:
bash: id: command not found 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------ |
Also, following the command keefaz gave, I get all
Code:
drwxr-xr-x |
So maybe try a chmod +rx /usr as root ;)
(as gbonvehi pointed out) |
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). |
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? |
The normal way to mess the files like that is to install a bad made package. I remember seeing that behaviour, I don't remember if it was using rpm2tgz with my user instead of root.
|
Maybe when you uninstalled dependencies with installing/removing/deleting g-wrap.
WARNING: making your own slackware tgz binary packages can cause severe damage if you do not understand the "*pkg" tools well. When you make these packages by your self, 'makepkg' works without errors, but 'installpkg' may overwrite important directories such as /bin/, /usr/ and so on when you install packages. When done incorrectly it puts all files and directories on '/' instead of /usr/bin, /usr/sbin/, and or /usr/lib when done as root. I did that once, and I was one sad Mofo. Make a backup of your '~/' directory if you think that your box might drop dead any minute from a "race-condition error". Smart Linuxers always have a rescue system handy, mines is Knoppix. |
Okay, after restoring all the permissions in /usr everything works, but now my sound doesn't work. When gnome starts up, volume control gives an error. alsaconf says this:
Code:
Loading driver... Code:
alsamixer: function snd_ctl_open failed for default: No such file or directory |
Hello *!
I have the same problem! But i run: chmod +xr on /usr /usr/lib /usr/doc /usr/share and the problem dont be ok. I run: echo $PATH /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin bash-3.00# startx /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: xinit: command not found /usr/X11R6/bin/startx: line 144: xauth: command not found I have xauth,xinit in /usr/X11R6/bin and permission is OK! Any help to me? Thanks in advance! |
Quote:
Most likely trying to install a redhat version with alien, whatever that is. One of the things an installation program does is install directories and set their permissions as it is installing the program. Since redhat is somewhat different from Slackware it most likely set the permissions that would be used in redhat. I never use redhat packages to install a program on my system. NEVER,NEVER,NEVER!!! :) Anyway from now on when you get warnings and errors while trying to install an app on Slackware, instead of giving up, come here or search the web for answers so you can learn how to take care of your system. You were probably just missing some really simple dependancies and needed to install them so your app would build. And most times you can ignore warnings. Better luck next time. :) |
All times are GMT -5. The time now is 09:35 AM. |