[PC-BSD Commits] r155 - pcbsd/trunk/system-overlay/usr/local/bin

svn at pcbsd.org svn at pcbsd.org
Thu Apr 5 20:59:29 PDT 2007


Author: kris
Date: 2007-04-06 04:59:29 +0100 (Fri, 06 Apr 2007)
New Revision: 155

Modified:
   pcbsd/trunk/system-overlay/usr/local/bin/startkde
Log:
Updated startkde to 3.5.6 script

Modified: pcbsd/trunk/system-overlay/usr/local/bin/startkde
===================================================================
--- pcbsd/trunk/system-overlay/usr/local/bin/startkde	2007-04-06 03:52:16 UTC (rev 154)
+++ pcbsd/trunk/system-overlay/usr/local/bin/startkde	2007-04-06 03:59:29 UTC (rev 155)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#  DEFAULT KDE STARTUP SCRIPT ( KDE-3.5.3 )
+#  DEFAULT KDE STARTUP SCRIPT ( KDE-3.5.6 )
 #
 
 # When the X server dies we get a HUP signal from xinit. We must ignore it
@@ -19,7 +19,7 @@
 # people's heads. We use colours from the standard KDE palette for those with
 # palettised displays.
 if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
-  xsetroot -solid "#000000"
+  #xsetroot -solid "#000000"
   xv -root -quit -max /usr/local/share/wallpapers/pcbsd-default.png
 fi
 
@@ -69,6 +69,7 @@
 kcmrandrrc [Screen1]
 kcmrandrrc [Screen2]
 kcmrandrrc [Screen3]
+kcmfonts General forceFontDPI 0
 EOF
 kstartupconfig
 if test $? -ne 0; then
@@ -133,6 +134,33 @@
     done
 fi
 
+dl=$DESKTOP_LOCKED
+unset DESKTOP_LOCKED # Don't want it in the environment
+
+# Launch splash that doesn't need any KDE libraries here, before
+# KDE libraries are loaded into memory (which may take some time
+# with cold caches). Makes the splash appear sooner.
+# If kpersonalizer needs to be run splash will be started only later.
+if test -z "$dl" && test "$kpersonalizerrc_general_firstlogin" != "true"; then
+    case "$ksplashrc_ksplash_theme" in 
+      Simple)
+         ksplashsimple 
+         ;;
+      *)
+         ;;
+    esac
+fi
+
+if test "$kcmfonts_general_forcefontdpi" -eq 120; then
+    xrdb -quiet -merge -nocpp <<EOF
+Xft.dpi: 120
+EOF
+elif test "$kcmfonts_general_forcefontdpi" -eq 96; then
+    xrdb -quiet -merge -nocpp <<EOF
+Xft.dpi: 96
+EOF
+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)
 #
@@ -270,25 +298,43 @@
     dcopserver_shutdown --wait
 fi
 
-# the splashscreen and progress indicator
-case "$ksplashrc_ksplash_theme" in 
-  None)
-     ;; # nothing
-  Simple)
-     ksplashsimple 
-     ;;
-  *)
-     ksplash --nodcop
-     ;;
-esac
+if test -z "$dl"; then
+  # the splashscreen and progress indicator
+  case "$ksplashrc_ksplash_theme" in 
+    None)
+       ;; # nothing
+    Simple)
+       if test "$kpersonalizerrc_general_firstlogin" = "true"; then
+           ksplashsimple 
+       fi # otherwise started earlier
+       ;;
+    *)
+       ksplash --nodcop
+       ;;
+  esac
+fi
 
-# certain features such as Konqueror preloading work only with full KDE running
+# Mark that full KDE session is running (e.g. Konqueror preloading works only
+# with full KDE running). The KDE_FULL_SESSION property can be detected by
+# any X client connected to the same X session, even if not launched
+# directly from the KDE session but e.g. using "ssh -X", kdesu. $KDE_FULL_SESSION
+# however guarantees that the application is launched in the same environment
+# like the KDE session and that e.g. KDE utilities/libraries are available.
+# KDE_FULL_SESSION property is also only available since KDE 3.5.5.
+# The matching tests are:
+#   For $KDE_FULL_SESSION:
+#     if test -n "$KDE_FULL_SESSION"; then ... whatever
+#   For KDE_FULL_SESSION property:
+#     xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null
+#     if test $? -eq 0; then ... whatever
+#
 KDE_FULL_SESSION=true
 export KDE_FULL_SESSION
+xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
 
 # 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
+LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup
 if test $? -ne 0; then
   # Startup error
   echo 'startkde: Could not start kdeinit. Check your installation.'  1>&2
@@ -297,8 +343,7 @@
 
 # If the session should be locked from the start (locked autologin),
 # lock now and do the rest of the KDE startup underneath the locker.
-if test -n "$DESKTOP_LOCKED"; then
-  unset DESKTOP_LOCKED # Won't need it any more
+if test -n "$dl"; then
   kwrapper kdesktop_lock --forcelock &
   # Give it some time for starting up. This is somewhat unclean; some
   # notification would be better.
@@ -344,4 +389,7 @@
   done
 done
 
+unset KDE_FULL_SESSION
+xprop -root -remove KDE_FULL_SESSION
+
 echo 'startkde: Done.'  1>&2



More information about the Commits mailing list