LinHES Forums
http://forum.linhes.org/

Version display
http://forum.linhes.org/viewtopic.php?f=3&t=18221
Page 1 of 1

Author:  mjl [ Sat Apr 26, 2008 10:38 pm ]
Post subject:  Version display

Hi,

I find the Version script doesn't present adequate information for my needs so I changed it.. (watch for line wrap)

Code:
#!/bin/bash
killall osd_cat
lsmod |grep "ivtvfb "|cut -b1-6 >/tmp/tv
if [ "$(cat /tmp/tv)" = "ivtvfb" ]; then
fontsize="25"
fontcolor="lightyellow"
else
fontsize="34"
fontcolor="yellow"
fi
export FONT="-adobe-helvetica-bold-*-*-*-$fontsize-*-*-*-*-*-*-*"
export DISPLAY=:0
cat /etc/KnoppMyth-version > /tmp/ver
date >> /tmp/ver
/sbin/ifconfig |grep eth |cut -b1-4 >/tmp/net
/sbin/ifconfig "$(cat /tmp/net)" | sed -n -e '/inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/s//\1/p' | cut -c11-26 >/tmp/ip
echo -n  "IP $(cat /tmp/ip) _._ MythTV  - " >> /tmp/ver
cat /etc/hostname >> /tmp/ver
cat /etc/mythtv/version >> /tmp/ver
cat /tmp/ver | osd_cat --l=8 --delay=12 --font=$FONT --shadow=2 --color=$fontcolor --pos=middle --align=centre&

Save the file as ver.sh.plus in your home mythtv. You can test it a user mythtv first, $ sh ver.sh.plus
then as root,
# cp /home/mythtv/ver.sh.plus /usr/local/bin/ver.sh

If you only have one network card, it should be happy and display your ip. If you have more than one card, add the number of your port after the eth

If you are using the PVR-350 tv out, it will reduce the font size so information should fit on the tv screen.

If you wish to have the info as a "hot" key, I use alt v: (Please note, be sure there are TWO >>) Not responsible for accidents!
Code:
echo "Mod1 v :ExecCommand ver.sh" >> /etc/X11/fluxbox/keys/
Restart your xserver (ctl + alt + bksp) and done.

Thanks to tjc & Britney for the hints to make it work :)
Mike

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/