summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/LinHES-session
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-10-16 20:41:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-10-16 20:41:16 (GMT)
commit4fb36a904c3818185105d2fe09adc512c46285c7 (patch)
tree56c1deb162824e4695133a955a6022e90282dd79 /abs/core/LinHES-system/LinHES-session
parent2648e999d277eac5c3d331a3609bcc73fafbea71 (diff)
parent36f4b0be52fddbd5f491da90475e69c25bf6903f (diff)
downloadlinhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.zip
linhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.tar.gz
linhes_pkgbuild-4fb36a904c3818185105d2fe09adc512c46285c7.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/LinHES-system/LinHES-session')
-rwxr-xr-xabs/core/LinHES-system/LinHES-session144
1 files changed, 40 insertions, 104 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session
index 61405db..a8c8c09 100755
--- a/abs/core/LinHES-system/LinHES-session
+++ b/abs/core/LinHES-system/LinHES-session
@@ -26,67 +26,8 @@ MYTH_ARGS="-d --syslog local6"
-# # Run any scripting that applies to special hardware. These brand-specific commands that run
-# # after Tweaker will, of course, override generic or hardware-specific settings.
-# SpecialHardwareCommands() {
-# special_hardware_file=/myth/.special_hardware_type
-# special_hardware=`cat $special_hardware_file`
-#
-# case $special_hardware in
-# dragon*)
-# sudo -E twk_audio.pl --implement digital
-# sudo -E twk_dragon.pl --implement all
-# ;;
-# ausdragon*)
-# ;;
-# *)
-# # there are no brand-specific commands for configuring whatever
-# # special hardware the user chose
-# ;;
-# esac
-# }
-
-
-#
-# . /etc/osd_cat.cfg || {
-# color=yellow
-# outline=2
-# outlinecolour=black
-# shadow=0
-# shadowcolour=black
-# font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
-# }
-#
-# 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
-# }
-#
-# function msg_pyosd(){
-# /usr/LH/bin/xmsg.py -m "$1"
-# }
function msg(){
- #/usr/LH/bin/lh_message.sh "$1"
/usr/LH/bin/msg_client.py --msg "$1"
}
@@ -99,24 +40,33 @@ function unclutter(){
idle=1
jitter=200
fi
-
+ echo "Starting unclutter"
/usr/bin/unclutter -root -idle $idle -jitter $jitter -noevents &
}
+
function keylaunch(){
if [ -f /usr/bin/keylaunch ]
then
-# MHOME=`cat /etc/passwd | grep "mythtv" | cut -d":" -f6`
- if [ ! -e $HOME/.keylaunchrc ]
- then
- echo "setting symlink for keylaunch"
- ln -s /etc/keylaunchrc $HOME/.keylaunchrc
- fi
- /usr/bin/keylaunch &
+ if [ ! -z $HOME ] && [ ! -e $HOME/.keylaunchrc ]
+ then
+ echo "setting symlink for keylaunch"
+ ln -s /etc/keylaunchrc $HOME/.keylaunchrc
+ fi
+
+ echo "Checking if keylaunch is running"
+ if [ "$(pidof keylaunch)" ]
+ then
+ echo "keylaunch is already running"
+ else
+ echo "Starting keylaunch"
+ /usr/bin/keylaunch &
+ fi
fi
}
+
function start_x11vnc(){
if [ x$xvncenable = "x1" ]
then
@@ -138,11 +88,9 @@ function fluxbox_settings(){
configdir=/usr/share/fluxbox_settings
ln -s $configdir $HOME/.fluxbox
fi
-
}
-
function load_nvidia_settings(){
lsmod |cut -f1 -d" " |grep -q nvidia
if [ $? = 0 ]
@@ -152,8 +100,6 @@ function load_nvidia_settings(){
}
function run_tilda(){
-
-
if [ -f /usr/bin/tilda ]
then
if [ ! -e ~/.tilda/config_0 ]
@@ -197,7 +143,6 @@ function mouse_move(){
function start_screensaver(){
-
if [ x"$Screensavertype" = "xgscreensaver" ]
then
gnome-screensaver &
@@ -207,21 +152,22 @@ function start_screensaver(){
fi
}
-function show_help_tip(){
+function show_help_tip(){
if [ x$ShowTips = "x1" ]
then
msg "Alt+h for help"
fi
}
+
function notify_scan(){
if [ -e /tmp/scan_report ]
then
msg "\nNew storage found. \nRun add_storage.py for details"
fi
+}
- }
function auto_start(){
asdir="/etc/X11/autostart"
@@ -233,18 +179,26 @@ function auto_start(){
$i &
fi
done
- }
+}
+
function update_apple_trailers(){
#update apple trailers
if [[ x$RunFrontend = x1 && -f ~/.configure ]]
then
- /usr/bin/php -q /usr/bin/myth_trailers_grabber > /home/mythtv/appletrailer.xml && /usr/bin/fix_aple_url.sh 2>/dev/null &
+ /usr/bin/php -q /usr/bin/myth_trailers_grabber > $HOME/appletrailer.xml && /usr/bin/fix_aple_url.sh 2>/dev/null &
fi
}
+function first_mythwelcome_config(){
+ echo "First configure: Running mythwelcome-config.py"
+ /usr/LH/bin/mythwelcome-config.py
+}
+
+
function first_configure(){
+ first_mythwelcome_config
if [ ! x$STARTUP_STYLE = xlegacy ]
then
first_configure_mv
@@ -276,7 +230,7 @@ function first_configure_default(){
sudo sv start mythbackend
sudo chown -R mythtv.mythtv /home/mythtv
nice -n 19 mythfilldatabase --quiet &
- msg "Guide data is being loaded. \n Until this completes\n some shows will appear as unknown \n in the program guide."
+ msg "Guide data is being loaded.\nUntil this completes\nsome shows will appear as "unknown"\nin the program guide."
rm ~/.configure
fi
else
@@ -285,7 +239,6 @@ function first_configure_default(){
rm -f ~/.configure
fi
fi
-
}
@@ -310,13 +263,13 @@ function first_configure_mv(){
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."
+ 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
nice -n 19 mythfilldatabase --quiet &
- msg "Guide data is being loaded. \nUntil this completes \nsome shows will appear as "unknown" \nin the program guide."
+ msg "Guide data is being loaded.\nUntil this completes\nsome shows will appear as "unknown"\nin the program guide."
rm -f ~/.configure
fi
else
@@ -325,9 +278,9 @@ function first_configure_mv(){
rm -f ~/.configure
fi
fi
-
}
+
function start_myth() {
if [ x"$UseMythWelcome" = "x1" ]
then
@@ -364,8 +317,8 @@ function start_myth() {
else
run_myth
fi
+}
- }
function run_wmctrl(){
done="False"
@@ -387,9 +340,9 @@ function run_wmctrl(){
fi
sleep 5
done
-
}
+
function run_myth(){
if [ -f /tmp/nomfe ]
then
@@ -407,7 +360,6 @@ function run_myth(){
if [ ! x$STARTUP_STYLE = xlegacy ]
then
-
run_wmctrl &
$STARTCMD 2>&1
else
@@ -431,30 +383,17 @@ function start_myth_mv(){
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 [ $WM = "fluxbox" ]
+
+
+
+if [ x"$WM" = "fluxbox" ]
then
fluxbox_settings
fi
-
#if using mythvantage style, start the WM right away
# this is done so that starting mythtv can loop.
$WM &
@@ -462,7 +401,6 @@ pid=$!
mouse_move
keylaunch
start_x11vnc &
-#set_background
unclutter
load_nvidia_settings
run_tilda
@@ -483,5 +421,3 @@ fi
wmctrl -r "MythTV Frontend" -b remove,fullscreen
-
-