--- 45xsession.orig	2007-03-01 04:16:15.000000000 +0100
+++ 45xsession	2007-03-01 14:37:03.000000000 +0100
@@ -2,11 +2,13 @@
 
 # override tool behaviour through distro-defaults
 FLL_DISTRO_MODE="installed"
-FLL_DISTRO_NAME="sidux"
-FLL_LIVE_USER="sidux"
-FLL_IMAGE_DIR="SIDUX"
-FLL_CDROM_INDEX="Sidux Manual"
+FLL_DISTRO_NAME="KANOTIX"
+FLL_LIVE_USER="kanotix"
+FLL_IMAGE_DIR="KANOTIX"
+FLL_CDROM_INDEX="KANOTIX Manual"
 FLL_CDROM_INDEX_ICON="html"
+FLL_WALLPAPER_PREFIX="kanotix"
+
 if [ -r /etc/default/distro ]; then
 	source /etc/default/distro
 fi
@@ -14,10 +16,6 @@
 # don't ever start me on an installed system
 [ ! "$FLL_DISTRO_MODE" = "live" ] && exit 0
 
-
-PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:."
-export PATH
-
 umask 022
 
 LANGUAGE="$(echo $LANG | cut -d\_ -f1)"
@@ -49,8 +47,25 @@
 	return "$?"
 }
 
+# /etc/X11/Xsession.d/75dbus_dbus-launch
 # needed for beryl/compiz
-sh /etc/X11/Xsession.d/75dbus_dbus-launch
+
+STARTDBUS=
+DBUSLAUNCH=/usr/bin/dbus-launch
+
+if grep -qs ^use-session-dbus "$OPTIONFILE"; then
+	if [ -x "$DBUSLAUNCH" ]; then
+		STARTDBUS=yes
+	fi
+fi
+
+if [ -n "$STARTDBUS" ]; then
+	DBUS=$($DBUSLAUNCH --exit-with-session)
+	eval "$DBUS"
+	export DBUS_SESSION_BUS_ADDRESS
+fi 	 
+
+# end /etc/X11/Xsession.d/75dbus_dbus-launch
 
 [ -n "$KDEDIR" ] || KDEDIR="/usr"
 export KDEDIR
@@ -89,6 +104,21 @@
 
 # Read default language/keyboard/background image
 [ -f /etc/sysconfig/knoppix ]  && . /etc/sysconfig/knoppix
+[ -f /etc/sysconfig/i18n ]  && . /etc/sysconfig/i18n
+
+if [ -n "$LANG" ]; then
+	# Try to repair a KDE/locale bug
+	LA="$LANG"
+	L="${LANG%%@*}"
+	C=$(awk '/^'"$LANG"'/{print $2;exit 0}' /etc/locale.gen 2>/dev/null)
+	[ -n "$L" -a -n "$C" ] && LANG="$L.$C"
+	LC_ALL="$LA"
+	export LANG
+fi
+
+if [ -n "$LC_ALL" ]; then
+	export LC_ALL
+fi
 
 [ -f /etc/sysconfig/keyboard ]  && . /etc/sysconfig/keyboard
 
@@ -99,24 +129,28 @@
 [ -z "$DESKTOP" ] && DESKTOP="kde"
 
 # Copy profiles if not already present
-# modified to pull entire /etc/skel and /usr/share/user-profile/profile folder contents,
+# modified to pull entire /etc/skel and $HOME_PROF folder contents,
 # depending on ramdisk space constraints
 
-# Calculate size of /etc/skel and /usr/share/user-profile/profile dirs
-HOME_SIZE="$(( $(du --max-depth=0 /usr/share/user-profile/profile | awk '{ print $1 }') + $(du --max-depth=0 /etc/skel | awk '{ print $1 }') ))"
+# Calculate size of /etc/skel and $HOME_PROF dirs
+HOME_PROF=/usr/share/user-profile/profile
+[ -d /usr/share/knoppix/profile ] && HOME_PROF=/usr/share/knoppix/profile
+[ -d /usr/share/kanotix/profile ] && HOME_PROF=/usr/share/kanotix/profile
+
+HOME_SIZE="$(( $(du --max-depth=0 $HOME_PROF | awk '{ print $1 }') + $(du --max-depth=0 /etc/skel | awk '{ print $1 }') ))"
 
 # Calculate free space on partition containing /home dir
 FREESPACE="$(df -k "$HOME" | awk '/^\/|^rootfs/{print $4}')"
 
 if [ "$FREESPACE" -gt "$HOME_SIZE" ]; then
-	# if there's space, copy entire /etc/skel and /usr/share/user-profile/profile
+	# if there's space, copy entire /etc/skel and $HOME_PROF
 	rsync -Ha --ignore-existing /etc/skel/ $HOME 2>/dev/null
-	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/ "$HOME/" 2>/dev/null
+	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/ "$HOME/" 2>/dev/null
 else
 	# if there's not enough space, copy important dir only
 	# XXX - not sure how "important" .klik and .zAppRun are...- bg
 	rsync -Ha --ignore-existing /etc/skel/{.Xdefaults,.bashrc,.qt,.gtk*} $HOME/ 2>/dev/null
-	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/{.Xdefaults,.bashrc,.qt,.kde,.klik,.zAppRun} "$HOME/" 2>/dev/null
+	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/{.Xdefaults,.bashrc,.qt,.kde,.klik,.zAppRun} "$HOME/" 2>/dev/null
 fi
 
 # add aliases for sudo and su
@@ -130,15 +164,12 @@
 	echo "super-user-command=sudo" >> /home/$FLL_LIVE_USER/.kde/share/config/kdesurc
 fi
 
-# Share Mozilla plugins with Firefox (and mv profile)
-if [ -x /usr/bin/iceweasel ]; then
-	MOZPROFILE=$(awk '/Profile/{if (/Profile0/){inprof=1}else{inprof=0}}/Path/{if(inprof){print;}}' \
-		$HOME/.mozilla/iceweasel/profiles.ini | sed 's/^Path\=//' )
-	NEWMOZPROFILE=$(mawk 'BEGIN{print int(10000000 * rand())}')".default"
-	mv $HOME/.mozilla/iceweasel/$MOZPROFILE $HOME/.mozilla/iceweasel/$NEWMOZPROFILE && \
-		sed 's/Path='$MOZPROFILE'/Path='$NEWMOZPROFILE'/' \
-		$HOME/.mozilla/iceweasel/profiles.ini > $HOME/.mozilla/iceweasel/profiles.ini.new && \
-		mv -f $HOME/.mozilla/iceweasel/profiles.ini.new $HOME/.mozilla/iceweasel/profiles.ini
+# Share Mozilla plugins with Firefox
+if [ -x /usr/bin/mozilla-firefox ]; then
+	if [ -e $HOME/.mozilla ]; then
+		mkdir -p $HOME/.mozilla/plugins $HOME/.firefox
+		[ -e $HOME/.firefox/plugins ] || ln -s ../.mozilla/plugins $HOME/.firefox/plugins
+	fi
 fi
 	    
 if [ -n "$LANGUAGE" ]; then
@@ -155,7 +186,7 @@
 done
 
 for f in `ls -1 $HOME/.mozilla/*/*/chrome/chrome.rdf.$LANGUAGE 2>/dev/null`; do
-	\mv -f "$f" "${f%%.${LANGUAGE}}"
+	mv -f "$f" "${f%%.${LANGUAGE}}"
 done
 
 fi
@@ -192,14 +223,14 @@
 	if [ -z "$DONTCHANGE" ]; then
 		# No persistent homedir, copy everything
 		rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2>/dev/null
-		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/{.kde*,Desktop} $HOME/ 2>/dev/null
+		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/{.kde*,Desktop} $HOME/ 2>/dev/null
 	else
 		# Only regenerate the config and Desktop files if missing
 		mkdir -p $HOME/.kde/share $HOME/Desktop
 		rsync -Ha --ignore-existing /etc/skel/.kde/share/* $HOME/.kde/share/ 2>/dev/null
-		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/.kde/share/* $HOME/.kde/share/ 2>/dev/null
+		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/.kde/share/* $HOME/.kde/share/ 2>/dev/null
 		rsync -Ha --ignore-existing /etc/skel/Desktop/* $HOME/Desktop/ 2>/dev/null
-		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/Desktop/* $HOME/Desktop/ 2>/dev/null
+		[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/Desktop/* $HOME/Desktop/ 2>/dev/null
 		rm -f $HOME/.kde/Autostart/sorticons.desktop
 	fi
 
@@ -216,7 +247,7 @@
 	fi
 
 	if [ -e "$INDEXFILE" ]; then
-		cat >> "$HOME/Desktop/$FLL_DISTRO_NAME.desktop" <<EOF
+		cat >> $HOME/Desktop/$FLL_DISTRO_NAME.desktop <<EOF
 [Desktop Entry]
 Name=$FLL_CDROM_INDEX
 # Exec=kfmclient openProfile webbrowsing $INDEXFILE
@@ -227,10 +258,15 @@
 EOF
 		if ! checkbootparam "nointro"; then
 			mkdir -p $HOME/.kde/Autostart
-			ln "$HOME/Desktop/$FLL_DISTRO_NAME.desktop" "$HOME/.kde/Autostart/showindex.desktop"
+			ln $HOME/Desktop/$FLL_DISTRO_NAME.desktop $HOME/.kde/Autostart/showindex.desktop
 		fi
 	fi
 
+	# LinuxTag
+	if [ -d /cdrom/LinuxTag ]; then
+		ln -sf /cdrom/LinuxTag "$HOME/Desktop/"
+	fi
+
 	# Beryl
 	rm -f $HOME/.kde/Autostart/beryl.desktop
 	
@@ -278,21 +314,27 @@
 
 		if [ -z "$BACKGROUND" -o ! -e "$BACKGROUND" ]; then
 			for i in png jpg gif; do
-				BACKGROUND=usr/share/wallpapers/sidux.$i
+				BACKGROUND=usr/share/wallpapers/$FLL_WALLPAPER_PREFIX.$i
 				[ -e "$BACKGROUND" ] && break
 			done
 		fi
 
 		sed -e 's|Wallpaper=.*$|Wallpaper='"$BACKGROUND"'|g' \
 		    $HOME/.kde/share/config/kdesktoprc > $HOME/.kde/share/config/kdesktoprc.tmp
-		\mv -f $HOME/.kde/share/config/kdesktoprc.tmp $HOME/.kde/share/config/kdesktoprc
+		mv -f $HOME/.kde/share/config/kdesktoprc.tmp $HOME/.kde/share/config/kdesktoprc
 		touch -r /etc/skel/.kde/share/config/kdeglobals $HOME/.kde/share/config/kdeglobals 2>/dev/null
 		touch $HOME/.kde/share/config/kxkbrc
 		rm -f $HOME/.kde/share/config/kxkbrc.tmp
 
-		sed -e 's/^LayoutList=.*$/LayoutList='"$FLL_KDEKEYBOARDS"'/' \
-		    $HOME/.kde/share/config/kxkbrc > $HOME/.kde/share/config/kxkbrc.tmp
-		\mv -f $HOME/.kde/share/config/kxkbrc.tmp $HOME/.kde/share/config/kxkbrc
+		if [ -n "$FLL_KDEKEYBOARDS" ]; then
+			sed -e 's/^LayoutList=.*$/LayoutList='"$FLL_KDEKEYBOARDS"'/' \
+			    $HOME/.kde/share/config/kxkbrc > $HOME/.kde/share/config/kxkbrc.tmp	
+		else
+			sed -e 's/^Layout=.*$/Layout='"$KDEKEYBOARD"'/' \
+			    -e 's/^Additional=.*$/Additional='"$KDEKEYBOARDS"'/' \
+			    $HOME/.kde/share/config/kxkbrc > $HOME/.kde/share/config/kxkbrc.tmp
+		fi
+		mv -f $HOME/.kde/share/config/kxkbrc.tmp $HOME/.kde/share/config/kxkbrc
 		touch -r /etc/skel/.kde/share/config/kxkbrc $HOME/.kde/share/config/kxkbrc 2>/dev/null
 
 		# Check for custom splashscreen in /cdrom/KNOPPIX
@@ -306,29 +348,235 @@
 	echo "kde_restart" >/etc/sysconfig/xsession-commands
 	export XDM_MANAGED="/etc/sysconfig/xsession-commands,maysd,mayfn,sched,method=classic"
 
-	if [ ! -r "$HOME/.kde/share/config/startupconfigkeys" ]; then
-		# see kstartupconfig source for usage
-		mkdir -m 700 -p "$HOME/.kde"
-		mkdir -m 700 -p "$HOME/.kde/share"
-		mkdir -m 700 -p "$HOME/.kde/share/config"
-		cat > "$HOME/.kde/share/config/startupconfigkeys" <<EOF
-kcminputrc Mouse cursorTheme ''
-kcminputrc Mouse cursorSize ''
-kpersonalizerrc General FirstLogin false
-ksplashrc KSplash Theme Default
-kcmrandrrc Display ApplyOnStartup false
-kcmrandrrc [Screen0]
-kcmrandrrc [Screen1]
-kcmrandrrc [Screen2]
-kcmrandrrc [Screen3]
-kcmfonts General forceFontDPI 0
-EOF
+	# This is /usr/bin/startkde
+
+	# When the X server dies we get a HUP signal from xinit. We must ignore it
+	# because we still need to do some cleanup.
+	trap 'echo GOT SIGHUP' HUP
+
+	# Check if a KDE session already is running
+	if kcheckrunning >/dev/null 2>&1; then
+		echo "KDE seems to be already running on this display."
+		xmessage -geometry 500x100 "KDE seems to be already running on this display." > /dev/null 2>/dev/null
+		exit 1
 	fi
 
-	/usr/bin/startkde
+	# we have to unset this for Darwin since it will screw up KDE's dynamic-loading
+	unset DYLD_FORCE_FLAT_NAMESPACE
 
-	killall kdeinit 2>/dev/null
+	# in case we have been started with full pathname spec without being in PATH
+	bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
+	if [ -n "$bindir" ]; then
+		case $PATH in
+			$bindir|$bindir:*|*:$bindir|*:$bindir:*)
+				;;
+			*)
+				PATH=$bindir:$PATH
+				export PATH
+				;;
+		esac
+	fi
+
+	# Boot sequence:
+	#
+	# kdeinit is used to fork off processes which improves memory usage
+	# and startup time.
+	#
+	# * kdeinit starts the dcopserver and klauncher first.
+	# * Then kded is started. kded is responsible for keeping the sycoca
+	#   database up to date. When an up to date database is present it goes
+	#   into the background and the startup continues.
+	# * Then kdeinit starts kcminit. kcminit performs initialisation of
+	#   certain devices according to the user's settings
+	#
+	# * Then ksmserver is started which takes control of the rest of the startup sequence
+	
+	# The user's personal KDE directory is usually ~/.kde, but this setting
+	# may be overridden by setting KDEHOME.
+
+	kdehome=$HOME/.kde
+	test -n "$KDEHOME" && kdehome=`echo "$KDEHOME"|sed "s,^~/,$HOME/,"`
+
+	# XCursor mouse theme needs to be applied here to work even for kded or ksmserver
+	if test -n "$kcminputrc_mouse_cursortheme" -o -n "$kcminputrc_mouse_cursorsize" ; then
+		kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
+		
+		if test $? -eq 10; then
+			export XCURSOR_THEME=default
+		elif test -n "$kcminputrc_mouse_cursortheme"; then
+			export XCURSOR_THEME="$kcminputrc_mouse_cursortheme"
+		fi
+	
+		if test -n "$kcminputrc_mouse_cursorsize"; then
+			export XCURSOR_SIZE="$kcminputrc_mouse_cursorsize"
+		fi
+	fi
 
+	if test "$kcmrandrrc_display_applyonstartup" = "true"; then
+		# 4 screens is hopefully enough
+		for scrn in 0 1 2 3; do
+			args=
+			width="\$kcmrandrrc_screen${scrn}_width" ; eval "width=$width"
+			height="\$kcmrandrrc_screen${scrn}_height" ; eval "height=$height"
+	
+			if test -n "${width}" -a -n "${height}"; then
+				args="$args -s ${width}x${height}"
+			fi
+	
+			refresh="\$kcmrandrrc_screen${scrn}_refresh" ; eval "refresh=$refresh"
+			if test -n "${refresh}"; then
+				args="$args -r ${refresh}"
+			fi
+
+			rotation="\$kcmrandrrc_screen${scrn}_rotation" ; eval "rotation=$rotation"
+			if test -n "${rotation}"; then
+				case "${rotation}" in
+					0)
+						args="$args -o 0"
+						;;
+					90)
+						args="$args -o 1"
+						;;
+					180)
+						args="$args -o 2"
+						;;
+					270)
+						args="$args -o 3"
+						;;
+				esac
+			fi
+	
+			reflectx="\$kcmrandrrc_screen${scrn}_reflectx" ; eval "reflectx=$reflectx"
+			if test "${refrectx}" = "true"; then
+				args="$args -x"
+			fi
+		
+			reflecty="\$kcmrandrrc_screen${scrn}_reflecty" ; eval "reflecty=$reflecty"
+			if test "${refrecty}" = "true"; then
+				args="$args -y"
+			fi
+		
+			if test -n "$args"; then
+				xrandr $args
+			fi
+		done
+	fi
+
+	# Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
+	# (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is installed)
+	#
+	# This is where you can define environment variables that will be available to
+	# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
+	# or eval `gpg-agent --daemon`.
+	# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script
+	#
+	# (see end of this file).
+	# For anything else (that doesn't set env vars, or that needs a window manager),
+	# better use the Autostart folder.
+	
+	exepath=`kde-config --path exe | tr : '\n'`
+	
+	for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'`; do
+		for file in "$prefix"*.sh; do
+			test -r "$file" && . "$file"
+		done
+	done
+
+	# Set a left cursor instead of the standard X11 "X" cursor, since I've heard
+	# from some users that they're confused and don't know what to do. This is
+	# especially necessary on slow machines, where starting KDE takes one or two
+	# minutes until anything appears on the screen.
+	#
+	# If the user has overwritten fonts, the cursor font may be different now
+	# so don't move this up.
+	#
+	xsetroot -cursor_name left_ptr
+
+	# Link "tmp" resource to directory in /tmp
+	# Creates a directory /tmp/kde-$USER and links $KDEHOME/tmp-$HOSTNAME to it.
+	lnusertemp tmp >/dev/null
+
+	# Link "socket" resource to directory in /tmp
+	# Creates a directory /tmp/ksocket-$USER and links $KDEHOME/socket-$HOSTNAME to it.
+	lnusertemp socket >/dev/null
+
+	# Link "cache" resource to directory in /var/tmp
+	# Creates a directory /var/tmp/kdecache-$USER and links $KDEHOME/cache-$HOSTNAME to it.
+	lnusertemp cache >/dev/null
+
+	# In case of dcop sockets left by a previous session, cleanup
+	dcopserver_shutdown
+
+	echo 'startkde: Starting up...'  1>&2
+
+	# the splashscreen and progress indicator
+	case "$ksplashrc_ksplash_theme" in 
+		None)
+			;; # nothing
+		Simple)
+			ksplashsimple 
+			;;
+		*)
+			ksplash --nodcop
+			;;
+	esac
+
+	# certain features such as Konqueror preloading work only with full KDE running
+	KDE_FULL_SESSION=true
+	export KDE_FULL_SESSION
+
+	# We set LD_BIND_NOW to increase the efficiency of kdeinit.
+	# kdeinit unsets this variable before loading applications.
+	LD_BIND_NOW=true kdeinit --new-startup +kcminit_startup
+	if test $? -ne 0; then
+		# Startup error
+		echo 'startkde: Could not start kdeinit. Check your installation.'  1>&2
+		xmessage -geometry 500x100 "Could not start kdeinit. Check your installation."
+	fi
+
+	# finally, give the session control to the session manager
+	# see kdebase/ksmserver for the description of the rest of the startup sequence
+	# if the KDEWM environment variable has been set, then it will be used as KDE's
+	# window manager instead of kwin.
+	# if KDEWM is not set, ksmserver will ensure kwin is started.
+	# kwrapper is used to reduce startup time and memory usage
+	# kwrapper does not return usefull error codes such as the exit code of ksmserver.
+	# We only check for 255 which means that the ksmserver process could not be 
+	# started, any problems thereafter, e.g. ksmserver failing to initialize, 
+	# will remain undetected.
+	test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
+	kwrapper ksmserver $KDEWM 
+	if test $? -eq 255; then
+		# Startup error
+		echo 'startkde: Could not start ksmserver. Check your installation.'  1>&2
+		xmessage -geometry 500x100 "Could not start ksmserver. Check your installation."
+	fi
+
+	# wait if there's any crashhandler shown
+	while dcop | grep -q ^drkonqi- ; do
+		sleep 5
+	done
+
+	echo 'startkde: Shutting down...'  1>&2
+
+	# Clean up
+	kdeinit_shutdown
+	dcopserver_shutdown --wait
+	artsshell -q terminate
+
+	echo 'startkde: Running shutdown scripts...'  1>&2
+
+	# Run scripts found in $KDEDIRS/shutdown
+	for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'`; do
+		for file in `ls "$prefix" 2> /dev/null | egrep -v '(~|\.bak)$'`; do
+			test -x "$prefix$file" && "$prefix$file"
+		done
+	done
+
+	echo 'startkde: Done.'  1>&2
+
+	# EOF /usr/bin/startkde
+	killall kdeinit 2>/dev/null
 	exit 0
 }
 # End startkde
@@ -430,7 +678,7 @@
 	type gnome-session >/dev/null 2>&1 || starttwm
 	rsync -Ha --ignore-existing /etc/skel/{.gnome*,.gtk*,.metacity*,GNUstep,.sawfish,.nautilus,Nautilus} $HOME/ 2>/dev/null
 
-	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing /usr/share/user-profile/profile/{.gnome*,GNUstep,.sawfish,.nautilus,Nautilus} $HOME/ 2>/dev/null
+	[ "$USER" = "$FLL_LIVE_USER" ] && rsync -Ha --ignore-existing $HOME_PROF/{.gnome*,GNUstep,.sawfish,.nautilus,Nautilus} $HOME/ 2>/dev/null
 
 	playsound
 
@@ -492,7 +740,7 @@
 
 	# XFCE4 setup
 	if [ ! -e $HOME/.xfce4 ]; then
-		rsync -Ha --ignore-existing /etc/skel/.xf* /usr/share/user-profile/profile/.xf* $HOME/ 2>/dev/null
+		rsync -Ha --ignore-existing /etc/skel/.xf* $HOME_PROF/.xf* $HOME/ 2>/dev/null
 	fi
 	exec /etc/xdg/xfce4/xinitrc 
 }
@@ -525,9 +773,9 @@
 </html>
 EOF
 
-	echo 'user_pref("privacy.popups.first_popup", false);' >> $HOME/.mozilla/user-profile/ujixazk6.slt/prefs.js
-	echo 'user_pref("dom.allow_scripts_to_close_windows", true);' >> $HOME/.mozilla/user-profile/ujixazk6.slt/prefs.js
-	echo 'user_pref("browser.toolbars.showbutton.print", false);' >> $HOME/.mozilla/user-profile/ujixazk6.slt/prefs.js
+	echo 'user_pref("privacy.popups.first_popup", false);' >> $HOME/.mozilla/*/ujixazk6.slt/prefs.js
+	echo 'user_pref("dom.allow_scripts_to_close_windows", true);' >> $HOME/.mozilla/*/ujixazk6.slt/prefs.js
+	echo 'user_pref("browser.toolbars.showbutton.print", false);' >> $HOME/.mozilla/*/ujixazk6.slt/prefs.js
 
 	while [ "$DESKTOP" = "kiosk" -o "$DESKTOP" = "KIOSK" ]; do
 		mozilla $HOME/kiosk.html
