October 20th, 2007
I can’t believe that the latest release of Kubuntu Gutsy (7.10) has been in beta for so long. The upgrade rendered my system all but useless because KDE wouldn’t start.
When I logged in the only thing that was presented to me was the new Kubuntu background. Nothing more, nothing less.
Starting Kubuntu with the Session in Failsafe mode presented a terminal window with the new Kubuntu background behind it. This was all it did, but I presume this is all that Failsafe mode does.
Starting the X server using startx threw an error about the user not being authorized. I found a few links like X: user not authorized to run the X server, aborting with similar looking problems. This error was resolved using dpkg-reconfigure x11-common and changing Allowed Users to “Anybody” instead of “Console”.
Running startkde then had KDE fire up but then bail back to the login screen. The last thing I saw in the terminal window was
No battery found.
This is not a laptop, quitting…
This had me puzzled for a while since it looked like this might have been the problem. However, it turns out that is simply the output of the guidance-power-manager. Nothing to be concerned with it would seem, just an unfortunate piece of wording in that output.
Read the rest of this entry »
Posted in Gripes, Linux | Comments Off
October 8th, 2007
I’ve been using the iPhone for a little over 3 days now. I’m still in the honeymoon period, but below is a first impression review. I’ll do another post with the bits I really like - there’s too many to list here…
Things that I’ve Missed
Below is the list of stuff that I have actually missed so far. I’ve recently being using a Samsung D900 so unfortunately the bar is quite low and the iPhone surpassed most existing functionality by miles.
A better way to snooze the alarm
I sleep with my phone under my pillow so snooze is within easy reach when the alarm goes off. I want to be able to whack anything on the phone to snooze. My old Samsung D900 was good at this, you could press any of the buttons anywhere (even the volume ones) and it snoozed.
With the iPhone you have to exactly press the Snooze button right in the middle of the screen, which requires you to be at least faintly lucid, of which I never am when the alarm goes off. If I could tap anywhere on the iPhone screen that would probably be better. Since you have to swipe to stop the alarm so you couldn’t accidentally sleep in and then get stuck in traffic.
UPDATE: It seems that I might have been delirious when I first tried to snooze. I tried again this morning and all of the buttons did indeed snooze the alarm. Excellent.
Read the rest of this entry »
Posted in A, F, Gripes, iPhone | Comments Off
October 8th, 2007
I am lucky enough to be one of the many New Zealanders using an iPhone. Many have gone before and many more will follow. The first hacked iPhone may belong to John Ballinger of Bluespark Interactive as described at Andrew James Sommervell’s blog.
The Red Ink Scribbles iPhone Review Part II: The Unlocked Phone blog post contains the best instructions I’ve seen to configure the iPhone correctly for New Zealand after it has been unlocked. It contains instructions to:
- Configure GPRS access for Vodafone (not full blown EDGE, just it’s baby sister equivalent)
- Configure the Voicemail button so it dials 707 to access Vodafone voicemail
- Change the phone number formating to suit New Zealand phone numbers. I’ve further updated the
ABPhoneFormats.plist phone number formats to also handle 8 digit prepay phone numbers (the weird ones that look like 021 027xxxxx).
Other changes are also needed so Caller ID matches the locally stored contact phone numbers correctly. The Fix International Caller ID thread at ModMyiPhone contains instructions to fix this.
Posted in A, Tips and Tricks, iPhone | 5 Comments »
August 5th, 2007
I’m a bit over the old theme and have been on the lookout for a 2 column fluid layout theme for the site that is simple and clear with good typography. For the moment the site is using Vertigo, which will need some tweaking to show useful things like the name of the site and to fix some of the overflow errors in the footer.
Using the WordPress theme viewer got a bit tedious as there are over a thousand themes and not many appear to have been tagged very well.
Watch this space for a new and improved look in the coming weeks.
Posted in N | 2 Comments »
June 8th, 2007
I recently configured my Shuttle SD32G2 MythTV PVR server to automatically wakeup when it needed to record a scheduled TV recording. Many of the examples on the web for doing this from MythTV used NVRAM. However, after installing NVRAM it didn’t recognise the BIOS. Given how NVRAM splashes about in sensitive memory in the BIOS I wasn’t too keen to try my luck getting that to work.
Some other web pages such as ACPI Wakeup mentioned being able to use the Linux Advanced Configuration and Power Interface (ACPI) instead. This was a much better option and I soon had everything working using simple command line scripts.
To configure your Shuttle SD32G2 server to work with ACPI all you need to do is:
- Start the machine up and go into the BIOS configuration (hold down Delete while the machine boots)
- Select
Power Management Setup
- Change the Resume By Alarm option to Enabled
- Save the BIOS configuration change and reboot the machine
This configures the BIOS so it will indeed wake up when the alarm is set.
The following are notes that relate to configuring the use of the ACPI alarm in Linux (based on Kubuntu Feisty Fawn 7.04)
- The date format for the ACPI alarm for the SD32G2 appears to be
yyyy-MM-dd hh:mm:ss. The date format can be confirmed by executing cat /proc/acpi/alarm and looking at the alarm time that is already set in the BIOS.
- The SD32G2 doesn’t appear to support setting the day of month for the wakeup alarm. This should be fine for TV recording with my configuration since the machine will simply boot up on the specified time on the next day and then shut down 2 minutes later if it doesn’t start recording.
- If the day is set to 0 (which always seems to appear), then than means start up at the specified time on every day.
- The wakeup alarm can be set using
echo "2007-06-11 16:23:00" > /proc/acpi/alarm if run as root or inside a script executed using sudo
- The wakeup alarm can be set using
sudo sh -c "echo '2007-06-11 16:23:00' > /proc/acpi/alarm" if using sudo. Trying to simply do a direct sudo echo always gave me a permission problem.
- Content located at ACPI Wakeup is quite useful. The Shuttle BIOS did not need any modifications to the
hwclock.sh script though and don’t bother with the clumsy script to alter the time from local time to UTC. Just alter the BIOS clock to use the local time.
- The BIOS time can be changed from UTC to local time in Kubuntu by opening the
/etc/default/rcS file and changing UTC=yes to UTC=no. Much easier all round.
- The BIOS clock can be set from the system clock using
sudo hwclock -systohc. I’m reasonably sure the Kubuntu does this on shutdown.
Posted in Linux, Tips and Tricks | Comments Off
June 8th, 2007
I’ve spent the last few nights playing with the wonderful world of Linux Advanced Configuration and Power Interface (ACPI) so that the MythTV server will now automatically start up to record a scheduled TV show, and automatically shut down afterwards if there are no logged in users.
This is pretty cool because it means I won’t miss recording any more of the Americas Cup Highlights because I didn’t get out of bed early enough to turn on the server.
It was a pretty arduous task with a number of steps based on content from a number of different web-sites to get things to work. After all the research though it’s not actually that complicated to setup. At a high level the following was done (subsequent blog posts will cover off some of the more tricky bits in more detail):
- Configure Power Management in the BIOS of your machine to allow being resumed by alarm
- Install appropriate bits for Linux to support ACPI
- Alter the Linux configuration so the BIOS uses local time rather than UTC time (since MythTV works using local time)
- Ensure that the ACPI alarm interface works as expected when set
- Create a small script to set the ACPI alarm given a date
- Create a small script to check to see if it is OK to shutdown the server
- Configure MythTV to use the two scripts created above
- Alter the
sudo permissions for the MythTV user so the scripts can be executed without permission problems
- Alter the login permissions so only root can shut the server down (to prevent accidental shutting down when the server is recording
Posted in Linux, MythTV, Tips and Tricks | Comments Off
June 8th, 2007
I’ve been learning a bit more about Linux over the last few weeks and updated my electronic program guide (EPG) configuration to better reflect “standard” file location usage. The changes work better for my backup strategy as well as I do not backup any directory that starts with a dot.
- The location of the EPG script has changed. The EPG related scripts are now in the
/home/mythtv/epg directory. Within that directory are two further directories. One for the old xmlTVNZ EPG configuration and the other for the new nice EPG configuration.
- The name of the EPG script has been changed. It is now simply called
nice.sh and lives in the /home/mythtv/epg directory.
- The
nice.sh script has been modified to log to the /var/log/mythtv directory:
cd /home/mythtv/epg/nice
wget http://nice.net.nz/epg/listings.xml.gz
gunzip -f listings.xml.gz
rm /var/log/mythtv/mythfilldatabase.log
mythfilldatabase --no-delete --file 1 -1 listings.xml --update > /var/log/mythtv/mythfilldatabase.log
Posted in MythTV, Tips and Tricks | 1 Comment »
May 14th, 2007
One of the most important things to get right for your MythTV installation is the Electronic Program Guide (EPG). The EPG lets MythTV know when all of the programs are on so it know when to record your favourite show like “The Best of Top Gear”.
I’ve been using xmlTVNZ for some months now reasonably successfully. xmlTVNZ is a command line tool that scrapes various web-sites for the TV listings. The specific web-sites that are scraped depend on the command line parameters passed to it, which depend on which channels you are interested in getting EPG data for. Because of it’s scraping nature, it’s prone to falling over when a web-site that it scrapes changes. I think that problem may of occurred last night because all of the TV3 listings going forward disappeared. I managed to eventually get it working again by modifying the command line parameters to scrape TV3 off the Sky web-site instead of XTRA (which now appears to be Yahoo!).
I’ve also belonged to the Myth TV in NZ mailing list for some months and recently there was talk of some other common EPG methods. At the time I didn’t look into it because xmlTVNZ had been working fine. Given the recent problems though I looked into both the “Hairy” and “Nice” EPG listing methods.
The “Hairy” EPG is located at http://hairy.geek.nz/epg/ but when I looked last night there was some other strange directory listing there. The “Nice” EPG is located at http://nice.net.nz/epg/ and was all up when I looked last night. Both the Hairy and Nice EPG’s are based of the DVB program guide broadcast by Sky. The Nice one appears to have at least better information than obtained by xmlTVNZ because after updating there was lots of information updated after running mythfilldatabase for the same number of days.
Below is a set of instructions for getting the Nice EPG running within MythTV. This just covers the analog stations that I am recording since I don’t have a satellite dish installed but should work for any set of stations that you are tuning.
- Login as the
mythtv user.
- Open the
/home/mythtv/.mythtv/ directory
- Create a new directory called
epg in that directory. This new directory could be created anywhere within the mythtv users home directory. I just put it in the .mythtv directory so it’s out of the way and next to the other MythTV related configuration directories like channels, which contains my channel icons.
- Create a new shell script file called
nice.net.nz.sh in the epg directory. This will be used to script the download of the Nice EPG and to then populate the MythTV program database. This script could be named anything you like.
- Populate the newly created shell script with the following:
#!/bin/bash
wget http://nice.net.nz/epg/listings.xml.gz
gunzip -f listings.xml.gz
mythfilldatabase --no-delete --file 1 -1 listings.xml --update
- Alter the XMLTV ID values within the MythTV configuration for the channels that you want to have updated by the Nice EPG. This can be done using
mythtv-setup or by using mythfilldatabase passing the --manual flag rather than --update. The XMLTV ID values I am using based on the Nice EPG are below.
Analog Channel ID mappings to Nice EPG XMLTV Channel ID
| Channel |
Analog Channel ID |
Nice EPG XMLTV ID |
| TV ONE |
2 |
1031.dvb.guide |
| TV2 |
4 |
1032.dvb.guide |
| TV3 |
7 |
1033.dvb.guide |
| C4 |
9 |
1034.dvb.guide |
| Juice TV |
57 |
1007.dvb.guide |
| Prime |
59 |
1037.dvb.guide |
- Open up
KCron or any other Crontab editor of your choice.
- Schedule the newly created shell script
nice.net.nz.sh to run daily at a suitable time as the mythtv user. Since it doesn’t do any web-site scraping it is much faster than xmlTVNZ so could be run at any time of the day without any problems. Based on the last time the listings.xml.gz file was updated on nice.net.nz (~5:30 AM) it would be good to schedule it sometime after 6 AM.
Posted in MythTV, Tips and Tricks | 3 Comments »
May 5th, 2007
Windows has been running pretty mental on my laptop at home for some time. This morning while downloading the latest and greatest podcasts through iTunes it went into spastic mode again. This is one party trick I haven’t seen before though. Parts of the Window dressing got confused and reverted back to the Windows 95 look and feel. Then it magically went back to XP. All the while consuming ridiculous numbers of CPU cycles.
No operating system should become so unreliable over time. Only iTunes is now stopping me from tossing Windoze out the door. Perhaps I should just buy a Mac. Windoze is normally pathetically slow and when it decides to have one of these fits it invariably wastes five or more minutes of my life.
Posted in Gripes | 2 Comments »
April 30th, 2007
After upgrading to Feisty Fawn (7.04) of Kubuntu I thought I had made all the necessary changes for my XBMC (XBox Media Center) MythTV frontend to talk to the Kubuntu server running the MythTV backend. Part of the Kubuntu upgrade altered the /etc/mysql/my.cnf configuration file for MySQL. This alteration required me to change the bind-address from localhost to the static IP addess of the server.
I thought that this change would be sufficient but it turns out that it wasn’t. The MythTV frontend on my XBox failed to connect to the MySQL database on the MythTV backend for completely non-obvious reasons. If the error output in the MythTV frontend was better I probably would of identified the problem much more quickly. After some hours of looking closely at the MySQL configuration changes and various other network related settings in Kubuntu it looked like it might have something to do with the MySQL password handling.
The old /etc/mysql/my.cnf had a old_passwords = 1 setting in it. The new configuration file did not. In addition, within the newly added configuration import directory /etc/mysql/conf.d there was an old_passwords.cnf file that explicitely set old_passwords = false. This gave me enough clues to see if the MythTV front end for the XBMC was in fact using the old password authentication mechanism (no longer supported by the server with this configuration). I found plenty of references to versions of PHP needing to use the old password authentication mechanism for MySQL and wondered if there was a similar issue with Python (the language used for the MythTV frontend on the XBMC). That information was enough to convince me to try and find out how to configure the server to continue to use the old password mechanism to see if that changed anything.
Based on instructions in the MySQL reference documentation at Client does not support authentication protocol I first tried to get the MySQL daemon mysqld to start with the --old-passwords parameter so it worked like it would have prior to the upgrade. I couldn’t get this to work (the MySQL documentation is a bit sparse on how to set some of the configuration options) so I tried to set the password for the mythtv user using the OLD_PASSWORD() function instead of the PASSWORD() function. By a stroke of luck that actually worked. That’s where I’m leaving it too.
If it aint broke, don’t fix it.
So, at the moment the MySQL configuration is exactly the same way as it was after upgrading to Kubuntu Feisty Fawn (7.04) apart from the bind-address being set to the static IP address of the server. In addition, the MySQL password for the mythtv user has been reset using the OLD_PASSWORD() function.
- Login to MySQL as the root user
mysql -u root -p
SET PASSWORD for mythtv = OLD_PASSWORD('mythtv'); - where ‘mythtv’ is the password that is configured in the MythTV settings on the XBox.
- Test the settings in MythTV on the XBox
- Pat yourself on the back when it works and then go to bed…
This was pretty frustrating to have to deal with. If the error getting spat out of the MythTV frontend on XBMC was better this problem would have been much easier to find with a bit of searching on Google.
Posted in Gripes, Linux, MythTV, Tips and Tricks, XBMC Media Center | 8 Comments »