1

(2,564 replies, posted in Tips, Tricks & Scripts)

Just a note to say that I have created a python script that will display various bits of information about your MythTV backend (upcoming recordings, tuner status, etc) in Conky. You can get more information and a screenshot from http://trac.wilkesley.org/projects/myth_status/wiki . Some people have had trouble reaching my web site, so I there is an alternative url on github at http://wiki.github.com/geekinthesticks/mythtv-status .

Comments and feedback welcome!

Ian.

2

(8 replies, posted in Tips, Tricks & Scripts)

I have never managed to get Clonezilla to work backing stuff up over the network. I use partimage on the System Rescue CD to make images via nfs to an external hard disk on my server.

For general backup I use backuppc. This automatically slurps stuff off my eeePC to the server. You can configure exactly what gets backed up and what gets ignored.

All my important day to day stuff is in text files, so I use git for them. If I am using my laptop away from the network I just do a git pull before I leave, which gets all my stuff onto the laptop. When I get back I just do a git push, which merges all my changes back to the server. I also keep a copy of my git repo on an Internet accessible server, so I can update via the Internet using the phone, if I forget before I leave home.

At home I keep almost everything important on my server and access it via nfs shares. The stuff I really care about is backed up to an external usb drive using Duplicity. This creates encrypted tar volumes. I do daily incrementals and full new backups weekly. The duplicity files are rsynced to my iBackup account. Duplicity is great for storing stuff off site. Everything is encrypted via gpg and it requires no special software on the destination server. You can send your changes via ssh, ftp and various other protocols.

Ian.

/usr/bin/nice -n19 ffmpeg -y -i infile -f mp4 -vcodec mpeg4 -b 720kb -qmin 3  -qmax 5 -g 300 -acodec libfaac -ab 192kb -r 29.97 -s 640x480  outfile.tmp
/usr/bin/MP4Box -add outfile.tmp outfile.mp4

I convert using ffmpeg. The code above shows the two relevant bits from my script. MP4Box can be installed by:

sudo apt-get install mpac

The script converts the input file to mp4 and Mp4Box wraps it in a special container that many phones media players require.  Note that the script is optimized so I can play the resulting file on anything from my TV to my iPod with little loss of quality. You can shrink the file considerably by adjusting:

-s 640x480 to your screen size.

Also you should be able to decrease the bit rate (-b 720k).

Note you will require ffmpeg from the Medibuntu repos and all the unstripped libraries to get aac and mp4 support. Files produced like this play fine on my N95.

Ian.

It should work OK, although I haven't used that specific drive. Make sure that you computer can boot OK from USB first, use something like a usb stick. I have got Ubuntu installed on my Archos media player and I can boot from that.

Essentially, if your computer has no trouble recognizing usb hard drives and can boot correctly from something like a usb stick it should work. However, don't blame me if it doesn't:)

Ian.

You can enable the root account if you wish (saves lots of typing sudo):

sudo passwd root

You will be prompted for your user password by sudo and then prompted twice to enter a new root password. You can then log in as root from your own account by:

su root

when you will be prompted for the root password.

Ian.

6

(9 replies, posted in Help & Support (Stable))

jwp1 wrote:

grub> find /boot/grub/stage1
(hd0,0)
(hd2,5)

You have 2 boot sectors, one on the usb stick and one of the internal drive. I am assuming that hd0 is the internal one, so you need to:
sudo grub
root (hd0,0)
setup (hd0)
quit

Which will install grub on hd0.

Ian.

7

(9 replies, posted in Help & Support (Stable))

You might want to try the following:

* Boot from your usb stick

sudo grub
find /boot/grub/stage1
root (hd#,#)
setup (hd#)
quit

Note that # are the numbers printed when you run find /boot/grub/stage1 .

You might also want to check /boot/grub/menu.lst and check it's pointing to the correct hard disk, although I thinnk it now uses the UUID of the disk and not the old hd(0,0) format.


Ian.

8

(15 replies, posted in Tips, Tricks & Scripts)

I have been using bzr in my home directory for a while. However, I don't use it for the whole directory, as I suspect I would end up with loads of stuff in the vcs I don't really want there. Even with a .bzrignore file  think I would end of with loads of unwanted binary files in the repo. My approach is to add selected directories e.g. devel and Documents.

One thing I like about bzr is that if you accidentally put something into your repo e.g. a 10Gb mpg, you can easily remove it. Try doing that with subversion!

I also use bzr to keep track of my emacs org files, which now contain most of my life:) The main branch is on my home server, but this gets pushed nightly to an off site server. I also keep a local branch on my eeePC. If I go away, I just do a bzr pull on the eeePC to get the latest version of my files. If I forget, I can just pull from the branch on my remote server. I find this easier than rsyncing stuff and because it's version controlled if you make a mess, you can easily revert to a working version.

Ian.

9

(6 replies, posted in CrunchBang Talk)

celtic426 wrote:

Is picassa by google a possibility?  I think I installed it on my old ubuntu system...

Thanks, I have just tried Picassa. It's good for browsing and the interface is quite good. However, it won't let me edit tags. However, I have a working prototype using python and Gtk. I don't want to try and write a new photo management tool, but just a simple tag editor. I need to get more familiar with Gtk,as I have never used it before!

Ian.

10

(6 replies, posted in CrunchBang Talk)

I looked at gThumb, which looked quite nice. However, I can't edit tags and it doesn't store comments in the photo itself. I don't want my data in a database, that's what EXIF/IPTC fields are for. It makes moving between computers/image viewers much easier!

Ian.

11

(6 replies, posted in CrunchBang Talk)

What do people use for managing photos? As a recovering KDE user I found Digikam to be very good. Unfortunately installing it will bring in half of kubuntu-desktop. Just tried F-spot, which was very slow and had almost no useful features.

My main requirements are the ability to easily edit EXIF and IPTC tags, so I can enter descriptions for my photos and easy browsing of my collection. However, I can't seem to find anything that fits these simple requirements. I may end up writing something in Python.

Ian.

12

(3 replies, posted in Tips, Tricks & Scripts)

If you subscribe to a mailing list, or are trying to find something on Google it's much easier to follow things if the reply is posted below the original message. This sig from a mail list illustrates why top posting is bad:)

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Ian.

Thanks Nick. It wasn't me that filed the bug report. I look forward to the fixed version.

Ian.

Very nice, but one small problem:) If I suspend, when I resume I still see the logout dialog box and have to choose Cancel to clear it. Looking at the script it seems as though self.quit() isn't being executed for some reason.

Ian.

arpbook wrote:

hi geekinthesticks wink
maybe you can add this line before the text in your conkyrc:

text_buffer_size 2048

Thanks, that worked perfectly.

Ian.

I have a slight problem with my MythTV script, which I haven't been able to fix. Perhaps someone here has an idea? The script is written in Python and outputs to stdout. It works correctly when I run it in a terminal. However, in conky the last few lines are never displayed. The exact number of lines displayed seems to vary randomly. It's called in conky using:

${color white}${execpi 60 ~/devel/myth_python_status/myth_status.py}

Ian.

17

(2,564 replies, posted in Tips, Tricks & Scripts)

Trouble'n'strife wrote:

Here in the UK, we tend to refer to our weather in degrees Celsius, but seeing single digits displayed on my Conky always makes me feel colder than I actually am sad  Think I'm going to change my Conky to Fahrenheit and see if it makes a difference!

Pah, the younger generation! Us grumpy old gits still use Fahrenheit, acres roods and perches, etc. Now that will be half a crown please:)

Ian.

18

(2,564 replies, posted in Tips, Tricks & Scripts)

corenominal wrote:

If I remember correctly, I registered as being in the US and then modified my location in the conky weather configuration file. It worked for me, but obviously I cannot condone my behaviour. big_smile

Naughty boy! I accidentally did the same thing. Now I have registered I have noticed a couple of interesting things about locations at weather.com:

The list of UK locations on weather.com is much smaller than on Yahoo. There isn't a location on weather.com within 20 miles of here.

The codes for matching locations in weather.com and yahoo.com are the same eg. Snowdon is UKXX0295.

I wonder if Yahoo get their weather from weather.com and if weather.com don't expose their full list of locations in their xml feed. Time to do some digging.

Ian.

19

(1,043 replies, posted in Off Topic / General Chat)

53
Cheshire/Shropshire border.

20

(2,564 replies, posted in Tips, Tricks & Scripts)

Can you get the weather.com site to give you non US forecasts? When I try to register for a feed, it will only accept a US state. I have a Python script, which uses the Yahoo feed, to update my web page, which I will probably adapt to work with Conky. See http://www.ian-barton.com/ to see the Web version. I have also got a python script I use with Conky to show the status of my MythTV box if anyone is interested.

Ian.

21

(2 replies, posted in Introductions)

Hi,

I was persuaded to try CrunchBang after hearing about it on Linux Outlaws. I have installed it on my Asus eee 900 with the custom kernel and so far I am very impressed. Thanks for making it available.

Ian.