SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I agree that the mostly likely cause is that the commands are no longer in your path. Post the output of
# echo $PATH
so there is more information to go on.
Different users have different paths. Different paths contain different commands. When you switch users, you switch paths possibly gaining or losing commands.
I understood everything... after you exit from X, and you change user (for example to root) you canīt access to some commands (ex: "xwmconfig")... this happens really due to your current path, that is different from the one that you have one you do a direct login...
So I think you have some solutions... one is to add all the necessary directories to your current PATH variable... the best way is to copy the ones that you have in your "normal mode" ("echo $PATH") login...
Another solution, is to just logout from the current user and login as the user that you want to use... in my opinion this is the best solution... but itīs your decision...
To add directories to your path you can use the command :
I guess its kinda there as a safety reminder... somtimes I do somthing and then forget that I have suīd but when I try to startx or somthing else it doesnīt work so I remember
ok ya i did add stuff to the path but when i restart the computer.. it is all back to its defaults.. its soo odd..
like.. i login as a normal user.. then i exit X.. and su to root.. and all of a sudden i have no access to xwmconfig and even startx!!! <-- shouldnt root have those programs?
i really dont understand whats going on? iam new to slackware so i guess is this how slackware works? i dono
and when i restart the pc.. no matter which user i login first i have access to those commands?
Just type 'exit' to get out of su and back to your normal user.
root can start X, but it's not in root's path (under su at least), so you have to specify the startx command *and* it's location (e.g. /usr/X11R6/bin/startx insted of startx). Whilst root *can* start X, it really shouldn't, and I imagine this setup is to remind you of that.
If you 'su -' then you switch to logging in as root *and* using root's path, but you really should just stick to using 'su'.
But, I think one way to add some directories to your path, is to put the commands that you have run in your file "/root/.bashrc"... than each time you login as a root, you will have you path with all the directories that you need to access the commands that you need...
So... you just put the commands that you already tried inside this file, and it should work.
But as I told you before... maybe the best thing is just to logout and do login with the user that you want to work...
oh ok i get it... so lets see if i got the understanding correct
at the start iam asked to enter a user.. if i enter root.. that is a different account then su root
as "root" i have total access to commands.. but as su root.. i do have more access but not as much.. i just have the permissions to execute commands (in which i have to sometimes specify the path and the exe) which the real "root" does
and vice versa for other accounts right
am i on the right path?
and i just noticed another odd issue i never am having with other distros.. iam currently running fluxbox 0.9.11.. and i removed the default .xinitrc and the backup so i can write my own and i typed this..
as "root" i have total access to commands.. but as su root.. i do have more access but not as much.. i just have the permissions to execute commands (in which i have to sometimes specify the path and the exe) which the real "root" does
su has the same rights as root, although some things like your path might be set differently. So you could still start x without modifying your path but you would have to type the whole path.
ok cool now i get it.. its just the paths that need to be set.. iam a moron lol.. iam just used to my other distros where it seems all the paths are more or less the same.. ah well lol slackware is amazing..iam really enjoying it..
now just to figure out this fluxbox issue.. anyone have any ideas?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.