Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 1999 09:45:37 -0400 (EDT)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        stable@freebsd.org
Cc:        se@freebsd.org
Subject:   startkde (was ``Re: KDE 1.1.2 - problems'')
Message-ID:  <199909281345.JAA68401@rtfm.newton>
In-Reply-To: <Pine.BSF.4.05.9909281027430.61516-100000@localhost> from Evren Yurtesen at "Sep 28, 1999 10:32:31 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Evren Yurtesen once stated:

=Also when I start  kde in the ps ax output I always  see 4 instances of
=startkde program. How can I solve this problem>??
=
=
=dc:/usr/local/bin#ps ax |grep kde
= 6835  ??  I      0:00.01 /bin/sh /usr/X11R6/lib/X11/xdm/Xsession kde
= 6847  ??  I      0:00.00 /bin/sh /usr/local/bin/startkde
= 6848  ??  I      0:00.00 /bin/sh /usr/local/bin/startkde
= 6849  ??  I      0:00.00 /bin/sh /usr/local/bin/startkde
= 6850  ??  I      0:00.00 /bin/sh /usr/local/bin/startkde
= 7151  p3  D+     0:00.00 grep kde
=dc:/usr/local/bin#

This is because startkde is rather stupid  AND there is an old minor bug
inf  FreeBSD's /bin/sh  -- it  does  not do  just exec(3)  for the  last
command  in the  script,  but fork(2)  and  exec(3) as  for  all of  the
intermidiate commands. This  results in the parent  sh process uselessly
waiting  for the  last command  to finish.  The bug  lives for  so long,
because it  does not really  do much harm,  other then wasting  a little
swap and process-entries. The work-around is rather simple too -- use
sh's exec command explicitly for your last command.

Make sure,  your /usr/X11R6/lib/X11/xdm/Xsession explicitly  says ``exec
startkde'' and use the following as /usr/local/bin/startkde :

#!/bin/sh
#
#  Misha's KDE STARTUP SCRIPT ( KDE-1.1 )
#

# initialize the configuration first.

kcontrol -init
sleep 1 ; kaudioserver
sleep 1 ; kwmsound &

# Add -ncols 96 after kfm if using a 8-bit display
sleep 1 ; kfm &

sleep 1 ; krootwm &
sleep 1 ; kpanel &
sleep 2 ; kbgndwm &

# finally, give the session control to the window manager
sleep 2 ; exec kwm

	Good luck,

		-mi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909281345.JAA68401>