LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Random problems with startx (https://www.linuxquestions.org/questions/slackware-14/random-problems-with-startx-43669/)

jstef 02-01-2003 04:15 PM

Random problems with startx
 
I am having a fairly random problem running startx. If I start the computer, login as a user and immediatly run startx, then xwindows starts just fine. However, if I switch users with su, then type startx, I get the error "startx:command not found". Any ideas on why this might be happening?

Thanks everyone!

Mara 02-01-2003 04:29 PM

Does it happen with all users?

jelly 02-01-2003 04:29 PM

could be a permissions problem for the user you are su-ing to? my startx is in /usr/X11R6/bin/ and everyone has r-x access to startx and to the parent directory.

jstef 02-01-2003 05:45 PM

It happens with all users... I can actually shut X down and then startx again, but if I su to another user and try to startx, it doesn't work.

jelly 02-02-2003 03:23 AM

in the man entry for su it says:

The current environment is passed to the new shell. The
value of $PATH is reset to /bin:/usr/bin for normal users,
or /sbin:/bin:/usr/sbin:/usr/bin for the super user.

so bearing in mind the command 'startx' is in /usr/X11R6/bin/ it's not on your path.

One way to fix it might be to create a sim link to startx in /usr/bin

cd /usr/bin
ln -s /usr/X11R6/bin/startx startx

then it will be in the path of the user you su to.


All times are GMT -5. The time now is 06:52 PM.