[PC-BSD Commits] r15666 - pcbsd/current/src-sh/pc-firstgui

svn at pcbsd.org svn at pcbsd.org
Thu Mar 1 10:00:10 PST 2012


Author: kris
Date: 2012-03-01 18:00:09 +0000 (Thu, 01 Mar 2012)
New Revision: 15666

Modified:
   pcbsd/current/src-sh/pc-firstgui/pc-firstgui
Log:

Play the intro movie on first boot now



Modified: pcbsd/current/src-sh/pc-firstgui/pc-firstgui
===================================================================
--- pcbsd/current/src-sh/pc-firstgui/pc-firstgui	2012-03-01 17:03:19 UTC (rev 15665)
+++ pcbsd/current/src-sh/pc-firstgui/pc-firstgui	2012-03-01 18:00:09 UTC (rev 15666)
@@ -27,6 +27,22 @@
 
 if [ -e "/root/.xprofile" ] ; then . /root/.xprofile ; fi
 
+# Figure out which intro video to play
+res=`xdpyinfo | grep dimensions: | awk "{print $2}"`
+h=`echo $res | cut -d "x" -f 1`
+w=`echo $res | cut -d "x" -f 2`
+h=`expr 100 \* $h`
+ratio=`expr $h \/ $w | cut -c 1-2`
+case $ratio in
+   13) mov="PCBSD9_4-3_UXGA.flv";;
+   16) mov="PCBSD9_16-10_WUXGA.flv";;
+   17) mov="PCBSD9_16-9_1080p.flv";;
+    *) mov="PCBSD9_4-3_UXGA.flv";;
+esac
+
+# Play the video now
+mplayer -fs -nomouseinput /usr/local/share/pcbsd/movies/$mov
+
 /usr/local/bin/startfluxbox &
 PID=$!
 /usr/local/bin/pc-firstboot



More information about the Commits mailing list