diff options
Diffstat (limited to 'abs/core/LinHES-system/LinHES-session')
-rwxr-xr-x | abs/core/LinHES-system/LinHES-session | 109 |
1 files changed, 70 insertions, 39 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session index 918406d..902962f 100755 --- a/abs/core/LinHES-system/LinHES-session +++ b/abs/core/LinHES-system/LinHES-session @@ -46,25 +46,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 +75,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 "$1" } @@ -94,7 +89,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 +175,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 +187,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 +209,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 +236,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 +264,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 @@ -286,11 +291,11 @@ function start_myth() { 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 +304,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 +342,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 +369,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 +384,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 |