summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/LinHES-session
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system/LinHES-session')
-rwxr-xr-xabs/core/LinHES-system/LinHES-session114
1 files changed, 74 insertions, 40 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session
index ea22344..0c61c6f 100755
--- a/abs/core/LinHES-system/LinHES-session
+++ b/abs/core/LinHES-system/LinHES-session
@@ -13,6 +13,9 @@ xset -dpms s off
export MALLOC_CHECK_=0
+MYTH_ARGS="-d --syslog local6"
+[ -f /etc/conf.d/mythfrontend ] && . /etc/conf.d/mythfrontend
+
# # Run any scripting that applies to special hardware. These brand-specific commands that run
@@ -46,25 +49,25 @@ export MALLOC_CHECK_=0
# font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
# }
#
-function delay_osd(){
- if [ x$STARTUP_STYLE = xmythvantage ]
- then
- cmd="ps -ef | grep -v grep | grep -q xmsg.py"
- else
- cmd="ps -ef | grep -v grep | grep -q osd_cat"
- fi
-
- eval $cmd
-
- rc=$?
- while [ $rc = 0 ]
- do
- eval $cmd
- rc=$?
- done
-
-
- }
+# function delay_osd(){
+# if [ x$STARTUP_STYLE = xenhanced ]
+# then
+# cmd="ps -ef | grep -v grep | grep -q xmsg.py"
+# else
+# cmd="ps -ef | grep -v grep | grep -q osd_cat"
+# fi
+#
+# eval $cmd
+#
+# rc=$?
+# while [ $rc = 0 ]
+# do
+# eval $cmd
+# rc=$?
+# done
+#
+#
+# }
#
# function msg_osd(){
# echo -e "$1" | osd_cat --pos=middle --align=center --offset=200 --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font
@@ -75,13 +78,8 @@ function delay_osd(){
# }
function msg(){
-# if [ x$STARTUP_STYLE = xmythvantage ]
-# then
-# msg_pyosd "$1"
-# else
-# msg_osd "$1"
-# fi
- /usr/LH/bin/lh_message.sh "$1"
+ #/usr/LH/bin/lh_message.sh "$1"
+ /usr/LH/bin/msg_client.py --msg "$1"
}
@@ -94,7 +92,7 @@ function unclutter(){
jitter=200
fi
- /usr/X11R6/bin/unclutter -root -idle $idle -jitter $jitter -noevents &
+ /usr/bin/unclutter -root -idle $idle -jitter $jitter -noevents &
}
function keylaunch(){
@@ -180,12 +178,11 @@ function show_help_tip(){
if [ x$ShowTips = "x1" ]
then
- msg "Alt+h for help" &
+ msg "Alt+h for help"
fi
}
function notify_scan(){
- delay_osd
if [ -e /tmp/scan_report ]
then
msg "\nNew storage found. \nRun add_storage.py for details"
@@ -193,6 +190,17 @@ function notify_scan(){
}
+function auto_start(){
+ asdir="/etc/X11/autostart"
+ for i in `ls $asdir/*`
+ do
+ if [ -x $i ]
+ then
+ echo "Starting $i"
+ $i &
+ fi
+ done
+ }
function update_apple_trailers(){
#update apple trailers
@@ -204,7 +212,7 @@ function update_apple_trailers(){
function first_configure(){
- if [ x$STARTUP_STYLE = xmythvantage ]
+ if [ x$STARTUP_STYLE = xenhanced ]
then
first_configure_mv
else
@@ -231,7 +239,6 @@ function first_configure_default(){
fi
sudo sv stop mythbackend
- /usr/LH/bin/dtheme.sh
xterm -fn *18* -e sudo taskset -c 0 /usr/bin/mythtv-setup
sudo sv start mythbackend
sudo chown -R mythtv.mythtv /home/mythtv
@@ -260,6 +267,7 @@ function first_configure_mv(){
then
/usr/MythVantage/bin/backend_control.sh stop BE 127.0.0.1
msg "MythTV setup is starting.\nPlease follow the steps for adding tuners and guide data."
+ run_wmctrl &
/usr/bin/taskset -c 0 /usr/bin/mythtv-setup
/usr/MythVantage/bin/backend_control.sh start BE 127.0.0.1
fi
@@ -280,17 +288,17 @@ function start_myth() {
then
STARTCMD="/usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log"
else
- STARTCMD="/usr/bin/mythfrontend -d --syslog local6"
+ STARTCMD="/usr/bin/mythfrontend $MYTH_ARGS"
fi
fi
echo "====================================================================="
echo "Starting $STARTCMD"
- firstboot.sh &
+ #firstboot.sh &
#continue on with starting mythtv
- if [ x$STARTUP_STYLE = xmythvantage ]
+ if [ x$STARTUP_STYLE = xenhanced ]
then
start_myth_mv
else
@@ -299,6 +307,28 @@ function start_myth() {
}
+function run_wmctrl(){
+ done="False"
+ for i in `seq 60`
+ do
+ for name in "MythTV Frontend" "MythTV Setup" "mythwelcome"
+ do
+ xwininfo -name "$name"
+ rc=$?
+ if [ $rc = 0 ]
+ then
+ wmctrl -r "$name" -b remove,fullscreen
+ done="True"
+ fi
+ if [ $done = "True" ]
+ then
+ break
+ fi
+ done
+ sleep 5
+ done
+
+}
function run_myth(){
if [ -f /tmp/nomfe ]
@@ -315,8 +345,10 @@ function run_myth(){
killall -9 irexec
/usr/bin/irexec -d
- if [ x$STARTUP_STYLE = xmythvantage ]
+ if [ x$STARTUP_STYLE = xenhanced ]
then
+
+ run_wmctrl &
$STARTCMD 2>&1
else
$STARTCMD 2>&1 &
@@ -340,10 +372,10 @@ function set_background()
{
echo "Setting the background"
- }
+}
-if [ x$WM = "x" ]
+if [ x"$WM" = "x" ]
then
# fluxbox > /var/log/fluxbox.log 2>&1
WM=fluxbox
@@ -355,24 +387,26 @@ $WM &
pid=$!
mouse_move
keylaunch
-set_background
+#set_background
unclutter
load_nvidia_settings
run_tilda
start_screensaver
-show_help_tip
notify_scan &
+auto_start &
update_apple_trailers
first_configure
+show_help_tip
start_myth
# wait for the windowmanger
#This will make the session wait on the WM to exit.
-if [ x$STARTUP_STYLE != xmythvantage ]
+if [ x$STARTUP_STYLE != xenhanced ]
then
wait $pid
fi
+wmctrl -r "MythTV Frontend" -b remove,fullscreen