LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   'startx' command unavailable to normal users (https://www.linuxquestions.org/questions/slackware-14/startx-command-unavailable-to-normal-users-113162/)

abs 11-06-2003 03:57 PM

'startx' command unavailable to normal users
 
hi
i managed to do a reasonably decent X setup with xf86config. got the res, etc. that i wanted. did that as root. 'startx &' worked.

i created a user and when i tried sta[TAB], all i got was startxfce, which didn't work anywat coz it couldn't find xinit. any reason why i can't startx for normal users? or is that expected behaviour?

ty

Azmeen 11-06-2003 05:57 PM

That is not normal... how did you create your user account? You should use the adduser script, it will make you have less headaches.

abs 11-07-2003 01:06 PM

i used useradd (the one which asks the series of questions...forgot whether it was useradd or adduser. i think it was useradd.

and while i'm on the subject, which file do i need to copy from /etc to get the dir colours and aliases that root has? i copied DIR-COLORS but didn't know quite what to do with it. i guess if i put a .xsession in /etc/skel, that'll handle the default wm's but what else?

ty

(and is there a way to extend the inactive timeout thing?...for the forum)

Azmeen 11-07-2003 07:48 PM

Quote:

Originally posted by abs
and while i'm on the subject, which file do i need to copy from /etc to get the dir colours and aliases that root has?
This is handled by the /etc/profile file... check it out. On all my Slack installations (and there are tens of em), users always have dircolors. I think there might be a profile sourcing problem with your user accounts, or that there's something in your skel dir that's overriding the default profile.

Maybe you can try clearing all things in your /etc/skel dir except for the .screenrc file. And then try to create another user.

(I never have timeout issues with the forum, I'm the only user of this PC so I let it remember my login permanently)

abs 11-08-2003 12:55 AM

this is what's in my /etc/profile:
gtk+.csh
gtk+.sh
htdig.csh
htdig.sh
j2sdk.csh
j2sdk.sh
lang.csh
lang.sh
mc.csh
mc.sh
metacity.csh
metacity.sh
t1lib.csh
t1lib.sh

/etc/skel was already empty

wrt to users, other than their home dir and /etc/passwd (and shadow) are there any other places where a users info pr details are stored?

abs 02-08-2004 08:37 PM

ok, this time i'm sure i did it right. did 'adduser'. added a non-root. but startx aint available to it. now when i press 'star'[TAB], i get 'startxfce4'. that's it.

i don't wanna keep using X as root. pls help.

ty
abs

abs 02-13-2004 08:06 PM

although it's still unavailable to normal users (maybe that's how it was meant to be), if i start at runlevel 4, normal users can log in.

can someone confirm if this is the only way normal users have access to X?

Shade 02-14-2004 12:15 AM

abs, no, it is NOT the only way normal uses have access to X.

And your /etc/profile looks wrong as well.

Are you sure you're even using Slackware?

--Shade

abs 02-14-2004 03:47 AM

lol, quite sure. slack 9.1.

and woah, i must've been real sleepy when i posted those contents. that was of /etc/profile.d/ and not /etc/profile. the latter has stuff like
Code:

# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.

# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"
...

what else should i check up on? (for startx)

ps: /etc/skel/ has a .screenrc in it (only) since i'd mentioned it was empty in post #5

Shade 02-14-2004 11:39 AM

Basically, you just want to ensure that startx is in the users' path.

Code:

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt-3.2.3/bin:.
That's the full path of one of my users.
Find out your path with the command

echo $PATH

/usr/X11R6/bin is the ticket

--Shade

abs 02-14-2004 05:54 PM

it's already there in the path.
Code:

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"

that's a line in /etc/profile. :( what else could be wrong?

Douwe 02-14-2004 07:52 PM

You can choose with the script xwmconfig (it is in /usr/X11R6/bin in Slackware 9.1, forgot the place of previous Slackware versions) which (installed :-) WindowManager to start with the startx command. Run it, highlight your WM (with up-down arrow),choose that WM with the Space Bar and give return.
Now issue startx and the chosen WM will be started in X. Some hidden dirs should be present in the users home-dir. Read the xwmconfig bash-script about that. It is not very difficult. And you can modify it to add a downloaded WM you want to try. (e.g. ratpoison). Be aware that xwmconfig is specific for the Slackware distro.

skog 02-14-2004 08:11 PM

you might try /usr/X11R6/bin/startx ... that will remove the path from the problem and let you know if it is a path problem or a permission problem.

abs 02-14-2004 09:52 PM

arrggh!!! i have no idea what's going on with my system.

when i did '$ /usr/X11R6/bin/startx' (as u said) it was available to normal users.

then i did '$ echo $PATH' and '/usr/X11R6/bin/' was part of it.

i was wondering what else could be causing the problem since the path and the whole command were available to the normal user. then i tried doing '$ start[TAB]' and it worked! it gave 'startx' as an option. i got the X is already running message...coz this session was on. so i know i works now.

i haven't changed anything! dunno how or why it's working now. i am glad it is but if it should happen again, i won't know how to fix it. i'll probably just post here, again!

anyways, thanks a ton skog and Shade.

@Douwe: choosing a window manager is not the problem. 'startx' itself was not available for normal users. fixed now though.


All times are GMT -5. The time now is 05:50 PM.