diff options
author | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
commit | 2648e999d277eac5c3d331a3609bcc73fafbea71 (patch) | |
tree | 40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/LinHES-system/LinHES-session | |
parent | c759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff) | |
parent | 7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff) | |
download | linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2 |
Merge branch 'testing'
# By James Meyer (1091) and others
# Via James Meyer (5) and others
* testing: (1148 commits)
LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish
Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web
LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables.
xf86-video-ati: xorg ati driver.
LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE.
LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop.
e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers.
LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902
zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to
linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink
runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr
LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900
iguanair: rebuild with python 2.7
LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first.
linhes-udev-rules: add rules for mce,streamzap,serial lirc devices.
mythinstall: recompile for matching libs
mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager
linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist
LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV
linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/
...
Diffstat (limited to 'abs/core/LinHES-system/LinHES-session')
-rwxr-xr-x | abs/core/LinHES-system/LinHES-session | 199 |
1 files changed, 154 insertions, 45 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session index 918406d..61405db 100755 --- a/abs/core/LinHES-system/LinHES-session +++ b/abs/core/LinHES-system/LinHES-session @@ -1,7 +1,15 @@ #!/bin/bash +MYTH_RUN_STATUS="1" . /etc/profile . /etc/systemconfig + +#set some defaults, then override from /etc/X11/WINDOWMANAGER +configdir="/usr/share/wm_data" +WM="e16 -P $configdir/e16_config_dir/" +STARTUP_STYLE=enhanced + + if [ -e /etc/X11/WINDOWMANAGER ] then . /etc/X11/WINDOWMANAGER @@ -13,6 +21,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 +57,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,18 +86,13 @@ 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" } function unclutter(){ - if [ -e /etc/unclutter ] + if [ -e /etc/unclutter.cfg ] then . /etc/unclutter.cfg else @@ -94,7 +100,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(){ @@ -111,6 +117,31 @@ function keylaunch(){ } +function start_x11vnc(){ + if [ x$xvncenable = "x1" ] + then + if [ -e /etc/x11vnc.cfg ] + then + . /etc/x11vnc.cfg + x11vnc $x11vnc_options + else + x11vnc -rfbport 5902 --passwd $xvncpassword + fi + fi +} + + +function fluxbox_settings(){ + if [ ! -e $HOME/.fluxbox ] + then + echo "setting symlink fluxbox" + configdir=/usr/share/fluxbox_settings + ln -s $configdir $HOME/.fluxbox + fi + +} + + function load_nvidia_settings(){ lsmod |cut -f1 -d" " |grep -q nvidia @@ -180,12 +211,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 +223,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 +245,7 @@ function update_apple_trailers(){ function first_configure(){ - if [ x$STARTUP_STYLE = xmythvantage ] + if [ ! x$STARTUP_STYLE = xlegacy ] then first_configure_mv else @@ -231,7 +272,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 @@ -239,7 +279,13 @@ function first_configure_default(){ msg "Guide data is being loaded. \n Until this completes\n some shows will appear as unknown \n in the program guide." rm ~/.configure fi + else + if [ -f ~/.configure ] + then + rm -f ~/.configure + fi fi + } @@ -248,18 +294,24 @@ function first_configure_mv(){ then if [ -f ~/.configure ] then - msg "This is the first time starting MythTV.\nThe MythTV backend process will be stopped for setup." + msg "New install of LinHES; starting setup." #for now skip these #autocard.py -g & #MythVantage -b #0 yes #1 yes/autodetech #2 no + while [ -e '/var/run/autocard.lock' ] + do + msg "Waiting for capture card detection to complete" + sleep 5 + done STATUS=$? if [ ! $STATUS = 2 ] 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 @@ -267,6 +319,11 @@ function first_configure_mv(){ msg "Guide data is being loaded. \nUntil this completes \nsome shows will appear as "unknown" \nin the program guide." rm -f ~/.configure fi + else + if [ -f ~/.configure ] + then + rm -f ~/.configure + fi fi } @@ -280,17 +337,28 @@ 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 & + if [ "x$bewait" = "x1" ] + then + #do init check + /usr/LH/bin/be_check.py + rc=$? + while [ $rc -ne 0 ] + do + msg "Waiting for connection to MythBackend" + /usr/LH/bin/be_check.py + rc=$? + sleep 6 + done + fi #continue on with starting mythtv - - if [ x$STARTUP_STYLE = xmythvantage ] + if [ ! x$STARTUP_STYLE = xlegacy ] then start_myth_mv else @@ -299,6 +367,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" >/dev/null + rcx=$? + if [ $rcx = 0 ] + then + wmctrl -r "$name" -b remove,fullscreen + done="True" + fi + done + if [ $done = "True" ] + then + break + fi + sleep 5 + done + +} function run_myth(){ if [ -f /tmp/nomfe ] @@ -315,8 +405,10 @@ function run_myth(){ killall -9 irexec /usr/bin/irexec -d - if [ x$STARTUP_STYLE = xmythvantage ] + if [ ! x$STARTUP_STYLE = xlegacy ] then + + run_wmctrl & $STARTCMD 2>&1 else $STARTCMD 2>&1 & @@ -340,39 +432,56 @@ function set_background() { echo "Setting the background" - } +} +# if [ x"$WM" = "xdefault" ] +# then +# # fluxbox > /var/log/fluxbox.log 2>&1 +# WM=fluxbox +# fi +# +# +# if [ x"$WM" = "x" ] +# then +# # fluxbox > /var/log/fluxbox.log 2>&1 +# WM=fluxbox +# fi +# -if [ x$WM = "x" ] +if [ $WM = "fluxbox" ] then -# fluxbox > /var/log/fluxbox.log 2>&1 - WM=fluxbox + fluxbox_settings fi + + #if using mythvantage style, start the WM right away # this is done so that starting mythtv can loop. $WM & pid=$! mouse_move keylaunch -set_background +start_x11vnc & +#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 = xlegacy ] then wait $pid fi +wmctrl -r "MythTV Frontend" -b remove,fullscreen |