su funkifies startx command
I'm running Slackware 10.2 and using the standard X stuff that it's installed with. Now anyways I've got this realy peculiar problem.
Startx works fine, at first. But if I exit it and then change users (from root to my normal one or normal to root) then I get a command not found error. I can however exit X then type startx again and it comes back up, provided that I don't change users. Also, say I startx, exit it, then change user and get the command not found error; It doesn't work if I change back to the user that first ran it. I get the same error. Rebooting sorts it all out though. Also, I was playing around, and if I get the command not found error, I can switch to another terminal with alt-f* and run startx from that terminal. Any help would be greatly appreciated. |
Are you changing users by logout/login or by su ?
If it's su, do you su or 'su -' ? And what do your .bashrc and .bash_(login|profile) look like for the users involved? Cheers, Tink |
I use su. I don't have a .bashrc or .bash_(login|profile), I used find / -name .bash* and it came up with /root/.bash_history. searching for .*rc gave me .xinitrc, .screenrc, and .kderc however. .kderc was pretty boring, .xinitrc was just a bunch of if/then statements, and .screenrc is pretty big. Searching for .bash gave me .bash_history, which just had a single d in it. And I tried using logout/login to switch users and it worked perfectly! I'd still like to try and figure out how to use su though. Thanks a lot!
.xinitrc Code:
#!/bin/sh Code:
# Code:
[General] Code:
d |
Try one of the other two methods ;}
'su ' by itself doesn't change the environment. logout/login or su - Report back. Cheers, Tink |
They both worked like a charm. Thanks a bunch :). What does su do then, if it doesn't just change users and what does su - do that's different?
|
su doesn't change the environment to the new users, su - does.
Read 'man su' for details. Cheers, Tink |
All times are GMT -5. The time now is 11:13 AM. |