View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Version display
PostPosted: Sat Apr 26, 2008 10:38 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
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


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu