LinHES Forums http://forums.linhes.org/ |
|
Features I added, use, and like http://forums.linhes.org/viewtopic.php?f=17&t=5389 |
Page 1 of 1 |
Author: | mjl [ Sun Jul 17, 2005 9:47 pm ] |
Post subject: | Features I added, use, and like |
Hi, I just sent a list of a few tweaks that I do to my KnoppMyth box to a fellow board member. He was kind to share a script with me for testing (works great but he will have to do his own sharing when ready) Anyway, long story shortened a little, I have been following the knoppmyth project for longer than I care to dwell on ![]() For that reason, as memtioned in other posts or at least hinted toward that I did a # mkdir /myth/tools directory and # chown mythtv:mythv /myth/* . In that little space I store all my tools to be able to do a repeatable upgrade or install. All these little tools will fit on one floppy so you may have them for an install else where too. Here is what I sent. Most of these you should be able to just copy and paste to make your own scripts. You execute them by preceding the file name with sh and a space. When I do a reboot I also force a backup. It has happen several times in the past that I would forget and then do an upgrade. Well things get lost when that happens so now on reboot or halt an automatic backup is called. I added sounds so that I know it is alive ![]() nano reboot-control #<code> #!/bin/bash (play /usr/share/sounds/beg.wav >& /dev/null)& /usr/local/bin/mythbackup (play /usr/share/sounds/end.wav >& /dev/null) sleep 3 (play /usr/share/games/frozen-bubble/snd/applause.wav >& /dev/null) sleep 3 sudo reboot #<end code> I set it up with another script nano fix-reboot #<code> #!/bin/bash cp reboot-control /usr/bin/ chmod +x /usr/bin/reboot-control #<end code> and for the halt command: nano halt-control #<code> #!/bin/bash (play /usr/share/sounds/beg.wav >& /dev/null)& /usr/local/bin/mythbackup (play /usr/share/sounds/end.wav >& /dev/null)& sleep 2 #(play /myth/saytime/bummer.wav >& /dev/null) #seach the web for saytime sleep 3 #(play /myth/saytime/fart.wav >& /dev/null) #ripped from live knoppix ver 3.8.2 cd sleep 3 sudo halt #<end code> You can add your own sound choices as there are a few available in knoppmyth, # find / -name *.wav gets a good selection. nano fix-halt #<code> #!/bin/bash cp halt-control /usr/bin/ chmod +x /usr/bin/halt-control #<end code> As with anything I change, I copy the original to my tools directory and tweak it there. I modify knoppmyth.xml by adding this to the bottom (remove original halt & reboot) <button> <type>Halt</type> <text>Halt System</text> <action>EXEC sh /usr/bin/halt-control</action> </button> <button> <type>Reboot</type> <text>Reboot System</text> <action>EXEC sh /usr/bin/reboot-control</action> </button> oh yes, another script nano fix-knoppmyth.xml (notice any trend?) #<code> #!/bin/sh # cp /myth/tools/knoppmyth.xml /usr/share/mythtv/knoppmyth.xml chmod +x /usr/share/mythtv/knoppmyth.xml #<end code> If you run this one, it gives one stop shopping. nano fix-apt-setup #<code> #!/bin/sh #setup apt-get # echo "Will load -updates- installs -ftp- -mozilla- and -thunderbird-" echo "this will take several minutes and does require operator action" echo " select auto for mozilla and debian for email. These are both in the desktop menu under Net" apt-get update apt-get install ftp apt-get install mozilla apt-get install mozilla-thunderbird #<end code> I hope these are helpful. If so, I have a few more if interested. I just have a basic machine using R5A16 (awsome) e-machine +1600 (1.3 ghz) 256 meg, 16 gig hd with a pvr-350. Someday maybe there will be a larger drive in the budget and it will become hdb /myth No install / upgrade required ![]() ![]() Mike |
Author: | msdemich [ Sun Jul 24, 2005 2:01 am ] |
Post subject: | |
This may seem like a dumb question, but how do I copy and paste? For example, I want to copy your text here on this forum from Firefox into Xedit, vi, etc. I see the coplied text go into the xclipboard, but I cannot paste it into vi or exit. I tried cream, but it requires downloading another 44MB of stuff to get it to work.... 44MB for a text editor? For someone used to notepad.exe for windows, this sort of thing can be VERY frustrating. |
Author: | Greg Frost [ Sun Jul 24, 2005 2:28 am ] |
Post subject: | |
Try the middle mouse button for paste. If you have a 2 button mouse, press both buttons at once. |
Author: | Mephi [ Sun Jul 24, 2005 4:35 am ] |
Post subject: | |
I tend to do my major file editing in notepad, and then copy the file onto my myth box over the network... Mephi |
Author: | mjl [ Sun Jul 24, 2005 6:15 am ] |
Post subject: | Quick tip |
Hi, Quick word of quidence, if you copy &paste into nano, use nano -w (no word wrap) as if a line is broken it will fail. Not hard to fix. Same with notepad, turn word wrap off. Hope that helps an good to someone interesting in experimenting. ![]() Mike |
Author: | Xsecrets [ Sun Jul 24, 2005 11:21 am ] |
Post subject: | |
also if you are going to use a windows program to edit unix files use wordpad not notepad, as notepad doesn't do unix style line feeds. |
Author: | mjl [ Sun Jul 24, 2005 9:19 pm ] |
Post subject: | I didn't know that |
Hi Xsecrets, Learn something new everyday! Didn't know there was a lf handling difference between those two apps. The word wrap switch would still apply though as a long linux statement will fail if broken improperly. Nano caught me on that a couple of times before I took the time to read the man pages ![]() Thanks for the tip Xsecrets. Mike |
Author: | Xsecrets [ Sun Jul 24, 2005 10:30 pm ] |
Post subject: | |
yeah it's very obvious of the line handling if you just pull a long (more than one line ) script from a unix box and open it up in notepad it will be all kinds of weird with little boxes instead of line breaks. |
Author: | mjl [ Sun Jul 24, 2005 10:58 pm ] |
Post subject: | One gets use to dumb things like that |
Hi Xsecrets, It is a bit amazing what one looks at and can accept as ok, I don't know how may little tweaks I have done with those "long lines in notepad" ![]() Have a good night, alway a pleasure. Mike |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |