comments on KDE performance tips

Alexander Kellett kde-optimize@mail.kde.org
Thu, 16 Jan 2003 09:08:08 +0100


--2JFBq9zoW8cOFH7v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jan 16, 2003 at 11:23:44AM +0530, Shridhar Daithankar wrote:
> On 15 Jan 2003 at 7:42, David Leimbach wrote:
> > Try building KDE from source... Try using Konstruct... report results 
> > back.  I think it could be the rpms you are using.
> 
> Before that I thought a little and came up ith a test.
> 
> I dropped freeBSD startkde script on mandrake partition in my home dir and used 
> that in .xinitrc.

here's my ultra-l337 startkde scriptset for anyone who's seriously bored :)

the xinit script is a "replacement" for xdm in gentoo's init.d directory,
thus making kde auto-login as your user without needing kdm (as it really 
slows down startup :( ). the xinit script as can be seen runs another xinit
script in my path in a delayed fasion (telinit a, gentoo voodoo that works) 
then this su's and executes my actual .xinitrc script, which in turn calls 
a special (my)startkde. following me still?, think i can get it faster, 
but i can't really be arsed atm as this works v. well.

hope that mail clients see the full path names :)

Alex

-- 
"[...] Konqueror open source project. Weighing in at less than
            one tenth the size of another open source renderer"
Apple,  Jan 2003 (http://www.apple.com/safari/)

--2JFBq9zoW8cOFH7v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=xinit

#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-x86/x11-base/xfree/files/4.2.1/xdm.start,v 1.1 2002/09/08 20:02:04 azarah Exp $

# This is here to serve as a note to myself, and future developers.
#
# Any Display manager (gdm,kdm,xdm) have the following problem:  if
# it is started before any getty, and no vt is specified, it will
# usually run on vt2.  When the getty on vt2 then starts, and the
# DM is already started, the getty will take control of the keyboard,
# leaving us with a "dead" keyboard.
#
# Resolution: add the following line to /etc/inittab
#
#  x:a:once:/etc/X11/startDM.sh
#
# and have /etc/X11/startDM.sh start the DM in daemon mode if
# a lock is present (with the info of what DM should be started),
# else just fall through.
#
# How this basically works, is the "a" runlevel is a additional
# runlevel that you can use to fork processes with init, but the
# runlevel never gets changed to this runlevel.  Along with the "a"
# runlevel, the "once" key word means that startDM.sh will only be
# run when we specify it to run, thus eliminating respawning
# startDM.sh when "xdm" is not added to the default runleve, as was
# done previously.
#
# This script then just calls "tellinit a", and init will run
# /etc/X11/startDM.sh after the current runlevel completes (this
# script should only be added to the actual runlevel the user is
# using).
#
# Martin Schlemmer
# aka Azarah
# 04 March 2002


# Start X Font Server before X
depend() {
	use hotplug
}

setup_dm() {
	source /etc/profile.env
	export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
	EXE="/home/alex/install/misc/bin/xinit"
}

start() {
	setup_dm
	ebegin "Setting up xinit"
	save_options "service" "${EXE}"
	#tell init to run /etc/X11/startDM.sh after current
	#runlevel is finished (should *not* be in the "boot"
	#                      runlevel).
	/sbin/telinit a &>/dev/null
	eend 0
}

stop() {
	return 0
}


# vim:ts=4

--2JFBq9zoW8cOFH7v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=xinit

#!/bin/sh
su alex -c "/usr/X11R6/bin/xinit &> /dev/null"

--2JFBq9zoW8cOFH7v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=".xinitrc"

#!/bin/sh
ssh-agent /home/alex/install/misc/bin/mystartkde

--2JFBq9zoW8cOFH7v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=mystartkde

#!/bin/zsh
export SHELL=/bin/zsh
. /etc/profile
. /home/alex/.zshrc
xmodmap -e "pointer = 1 2 3 6 7 4 5"
xmodmap ~/.xmodmap-groucho
trap 'echo GOT SIGHUP' SIGHUP
lnusertemp tmp >/dev/null
lnusertemp socket >/dev/null
dcopserver_shutdown
LD_BIND_NOW=true kdeinit +kcminit +knotify
export SSH_ASKPASS
ssh-add ~/.ssh/id_dsa < /dev/null &
kwrapper ksmserver
kdeinit_shutdown
dcopserver_shutdown
artsshell -q terminate
for prefix in `kde-config --path exe| sed -e 's^bin/^shutdown/^g;s^:^ ^'`
do 
  for file in $prefix/*
  do 
    if test -f $file
    then 
       $file
    fi
  done
done
kill $SSH_AGENT_PID

--2JFBq9zoW8cOFH7v--