LinuxQuestions.org

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

lydgate 07-14-2005 01: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 02:26 PM

When you login what is your output with :
Code:

echo $PATH

lydgate 07-14-2005 02: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 02: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 02: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 02: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 02: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 02: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 03: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 03: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 03: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 03:14 PM

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

drwxr-xr-x
for those directories.

keefaz 07-14-2005 03:20 PM

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

gbonvehi 07-14-2005 03: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 03: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?

gbonvehi 07-14-2005 05:22 PM

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.

tmantist 07-16-2005 06:50 PM

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.

lydgate 07-18-2005 04:27 PM

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...
Loading ALSA mixer settings:  /usr/sbin/alsactl restore
/usr/sbin/alsactl: load_state:1267: No soundcards found...
Loading OSS compatibility modules for ALSA.
Setting default volumes...

alsamixer:
Code:

alsamixer: function snd_ctl_open failed for default: No such file or directory
My sound card is: "00:08.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)" and it worked fine before this, I never even had any trouble with it I just ran alsaconf and it worked. Any suggestions?

weiddy 02-28-2006 05:22 PM

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!

Widgeteye 03-01-2006 11:15 AM

Quote:

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

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.