[CentOS] startx reboots my computer

Ted Miller ted-miller at att.net
Tue Nov 28 02:36:03 UTC 2006

Bart Schaefer wrote:
> On 11/26/06, Ted Miller <ted-miller at att.net> wrote:
>> What DOES happen:
>> on a good run, I get the error message:
>>   /usr.../startx: fork: resource temporarily unavailable
> My guess would be that, somewhere in /etc/profile or /etc/profile.d/*,
> or some similar startup file associated with your shell, is a command
> that starts either another shell, or another X session, or some
> similar thing.  When you run "startx" it runs a shell, which runs that
> command, which runs another shell, and so on until you have no more
> available processes and/or RAM.

Bart, you didn't quite nail it, but you got me pointed in the right
direction, and looking for the right kind of thing.  I looked in
/etc/profile, and didn't see anything suspicious.  Then I got to thinking
"I'll bet 'startx' is a script.  Maybe I can type the script lines in a
terminal, and see when it goes bonkers."  I didn't find it in /usr/bin, so
I did a search for it, starting at /usr.  I got back 2 results, one of them
in /usr/local.  Then it dawned on me.  I have some scripts called startx1
and startx2 which will start a second and third Xwindows session (so I can
be logged in as two different users at once, usually me and root).  Somehow
startx2 got renamed or copied to startx (probably fumble fingered me typed
the trigger key with the gun aimed at my foot).  Since all that is in that
file is

startx -- :1

it was starting itself like crazy, didn't even take a new shell, because it
is on the path before the "real" startx.

Now I will reboot into that machine, and see if I did anything else to
shoot myself in the foot.

Grateful Ted in Indiana

More information about the CentOS mailing list