Posts Tagged ‘How-to’
Errors with MiroBridge
For a while in MythTV 0.22 I was getting an error with MiroBridge saying Miro was not set up properly even though Miro worked just fine and I triple checked all my config files. I waited until upgrading to MythTV 0.23 to fix it because there was a much easier one button install option in Mythbuntu Control Centre. MiroBridge ran successfully once but I started getting files added to my recordings screen that didn’t exist. Once I manually cleared out the files MiroBridge automatically ran again but caused even more problems by having the two non-recordings show up 44 times.

Once I got all of those recordings removed MiroBridge would never successfully run for me again. I could run MiroBridge manually but every time I would get an error
AttributeError: ‘NoneType’ object has no attribute ‘lower’
and MiroBridge would just hang. I would have to force quit the script and never got past that point. I figured out how to fix this issue with a lot of Googling. The problem happens because all of those files that didn’t exist from before were referenced in my database and MiroBridge was trying to remove them. Because they weren’t cleanly removed from the recordings screen (or Miro) MiroBridge couldn’t delete the listings. So what we have to do is clean up these erroneous database references manually. If you have phpMyAdmin installed on your machine you can easily delete these referenced recordings through there but I didn’t want to have something else installed on my MythTV box so I did it through the terminal. Before you go on this is a great chance to learn how to use screen because we are going to want to reference a lot of information from a bunch of different terminal windows. You can either do this with multiple terminals or you can be cool and do it with screen.
Here are the steps you need to take to fix this error.
Step 1. Troubleshoot and Backup
Close out of MythTV and open a terminal. From the terminal run MiroBridge with the simulate option (-s) and redirect the output to a file (>). In MythBuntu 10.04 the command is
/usr/share/doc/mythtv-backend/contrib/imports/mirobridge/mirobridge.py -s > mirobridge.log
BTW this command needs to be run from the local machine and not through ssh because I believe the $DISPLAY variable isn’t set to :0 so MiroBridge gets confused when you are remote. We could change that variable but it is just as easy to work from the local machine.
Now we need to make sure you are having the same error I was having. To do this we are going to read that file you just created and check for any lines that tell MiroBridge to delete old recordings from the database.
cat mirobridge.log | grep oldrecorded
If you don’t have any output from this then you probably have a different error than what I was getting. If you have a bunch of lines outputted that look like this
Simulation: Remove orphaned oldrecorded record (None – ?????)
Then you have the exact same error and should continue on to the next step. Make note of the ????? value cause we will need it later. It should be the name of the video file that was giving us errors.
It is a good idea to always backup your mythconverg database so you may want to run this before continuing
/usr/share/mythtv/mythconverg_backup.pl
Step 2. Close Miro
ps aux | grep miro
Find each line that says something like /usr/bin/miro or mirobridge.py and then get the number at the front of that line and type kill *number* If you have more than 1 line just put each number and it will kill all of the running instances.
Now that Miro and MiroBridge have been killed move on to manually removing the recordings information form the database.
Step 3. Remove old data
First thing you will need is your database username and password. The easiest way to get this is just to use
cat /etc/mythtv/mysql.txt
At the begining of the output you should have DBUserName and DBName. You will need both of those but it is probably mythtv and mythconverg so make sure you also get the DBPassword near the bottom of that output.
Once you have that information connect to your mysql server. Replace ‘password’ with your actual password from the /etc/mythtv/mysql.txt file.
mysql --user=mythtv --password='password'
Then we just want to make sure we have the right mysql server (just because it is better to be safe than sorry).
SHOW DATABASES;
You should see your mythconverg table here so go ahead and use it.
USE mythconverg;
SHOW TABLES;
You should then see a whole lot of tables but the one we want is the oldrecorded table. Just to make sure we have the right information you are going to view all the erroneous database entries before you delete them. For the ????? you need to use the recording name that you got from step 1. Make sure you use the correct case when searching for the information.
SELECT * FROM oldrecorded WHERE subtitle = "?????";
If there were more than one different entry names simply put OR subtitle = “?????” with your next value. In my case I had two different recordings that caused the problem so I used
SELECT * FROM oldrecorded WHERE subtitle = "STALKER_REPORTER_ITUNES.mp4" OR "tekzilla--tzdaily--0464--2009-10-16gmaps--hd.h264.mp4";
This should list all of the entries so now you just need to delete them from the database.
DELETE FROM oldrecorded WHERE subtitle = "?????";
Just like above you can use the OR command to delete multiple entries at once.
Once the entries are deleted just type exit; to leave mysql and go back to the normal shell prompt.
Step 4. Test
Now that the the entries have been deleted repeat step 1 again and you shouldn’t have any lines returned that say
Simulation: Remove orphaned oldrecorded record (None - ?????)
You should then be able to run MiroBridge without the simulation option and get your Miro videos imported into your recordings. It is a good idea to still use the verbose (-V) option just to make sure everything goes smoothly.
/usr/share/doc/mythtv-backend/contrib/imports/mirobridge/mirobridge.py -V
That is all you need to do. Just make sure you set up your cron job to automatically run MiroBridge however often you want and you should be all set.
I hop this helps and leave a comment below if you have any questions.
Making of webOS (r)evolution commercial
I know what you are thinking, “how did my wife create that amazing (r)evolution commercial?”
I would like to take a couple minutes to share with everyone how she made it, and what software I used to help her edit it.
First of all here was the setup.

She started with a piece of poster board paper taped to our kitchen floor. Then added a microphone boom with a mini tripod zip tied to the end of the boom. This allowed her to take pictures from the same height every time and also gave a little flexibility in moving the camera around. Finally she added two small halogen lights to either side of the paper to light the “stage”. When taking pictures she took a picture of the whole piece of paper every time and we used software to edit the photos later.
For the commercial she needed 3 full size webOS cards and 6 smaller phones. She started with making the phones.

The phones were made so well it was almost painful to do this to them. The animation was made by crumpling the phones and then playing the animation backward in the commercial.

The cards were pretty easy to make. The hardest part was the animation of the media player. To animate the media player we had to cut slivers off of each album art and then tape them back together one piece at a time. It was time consuming but we were very pleased with the result. The calendar was intentionally longer than the other cards to compensate for when it would be folded.

Once all of the pictures were taken we needed to figure out how to manage 1000+ pictures to make a 1 minute commercial. To start we split up the pictures into folders labeled for each scene and numbered them in order 01_dynatac, 02_nokia, etc. We then used Phatch to trim off edges of each picture and essentially “zoom” into each picture to the size we wanted. Once the pictures were trimmed Métomorphose renamed all the pictures in sequence and then Stopmotion stitched all the pictures together into one video file. To add music and narration to the commercial I used Audacity to record the script she wrote for me and then OpenShot and PiTiVi to match up the audio and video and then export to a finished file. We could have just used one video editor, but OpenShot had a weird white frame at the end of the video so we tried PiTiVi and didn’t have a problem.
We hope you all enjoy the video and I just wanted to take the time to show a little behind the scenes for everything that went into making it. If you listen to mintCast you will know how impressed I was with this finished product, and the fact that it was made entirely with free and opensource software.
If you get a chance, head over to webOS Roundup and vote for the commercial.
How to turn on Remote Desktop remotely
Occasionally you need to get something done on a remote computer (or a clients computer) but the computer doesn’t have an easy way for you to connect to it. Luckily, if you have admin rights to the remote computer, you can still connect without needing to turn on remote desktop before hand. To do that you will just need to download one thing. PsExec is a Microsoft tool part of their PsTools. PsExec is a portable program that you can copy to any USB drive or run it anywhere from your hard drive. Once you have PsExec download you just need to open a command prompt and browse to the folder with psexec.exe. Once the command prompt is open, type in this command and it will enable remote desktop on the machine you specify.
psexec \\machinename reg add “hklm\system\currentcontrolset\control\terminal server” /f /v fDenyTSConnections /t REG_DWORD /d 0
Make sure you replace “machinename” with the computer you are trying to control remotely. Once this command has run you should now be able to connect with mstsc.exe to the remote computer.
Biometric Devices Missing from Windows 7 Control Panel
AuthenTec, a company that makes fingerprint scanning devices, worked closely with Microsoft to enable fingerprint authentication without third-party software for Windows 7. Unfortunately, the settings to set up the fingerprint scanner do not always show up in the Windows 7 control panel. To set up the fingerprint scanner you usually can navigate to Control Panel -> Hardware and Sound -> Biometric Devices. From there you can enter your password and register your fingerprints. What if biometric devices is missing from control panel?
To get the biometric devices to show up in Windows 7 control panel download the drivers from AuthenTec’s website (mirror here). I am not sure if this next step is necessary, but the directions I found said to extract the driver with uniextractor. I have extracted the driver for you and zipped it up here (x32, x64) so you don’t have to. Open the zip file and extract the files somewhere and run setup.exe. This installer will create a folder under C:\Program Files\ called WIN7TS and will install the drivers for your finger print scanner. It will also load the necessary components so you can use the fingerprint scanner from the control panel. Once the biometric devices option shows up you can set up everything from the control panel.
If you are getting the ‘Set-up Failure’ error, then try running C:\Program Files\WIN7TS\TrueSuiteApplication.exe directly. It is the same program that runs from the control panel but sometimes has less errors on setup.
Let me know in the comments if you have any problems or questions.
How-to Modify the Default User Settings in Linux
Just like my other two posts here is how you can modify your default user settings in Linux. This is similar to OSX but instead of “/System/Library/User\ Templates/English.lproj” being our template directory. It is “/etc/skel”.
The skel directory stands for skeleton and it is where the default files and settings come from when you create a new user in Linux. The skel directory is a lot more basic than Windows or OSX mainly because A) not much is needed to create a Linux profile and B) all of the configuration files are stored in plan text and not some fancy .plist or .dat file.
Typically, most distros will only include three files in their “/etc/skel” directory. Those files are “.bash_logout”, “.bash_profile”, and “.bashrc”. If you want to include any more files/settings you can simply edit the configuration in your profile (or a temporary user), copy the setting files to the “/etc/skel” directory, and chown the files with root:root.
What if you don’t want to overwrite the files that came with your distro but you still want to make a skeleton directory? Simple, edit the “/etc/adduser.conf” file and set the SKEL value to whatever you want. Just make sure that the folder is available to root when you are trying to create the new user. In other words, don’t put the folder on a removable drive.
If you are using the GUI to create the new user the files and settings will be copied automatically and if you are using the adduser command just make sure you use the -m flag.
That is really all there is too it. Let me know if you have more tips for creating a user profile or if this helped you out in the comments.
How-to Modify the Default User Settings in OSX
After my post on modifying default user settings in Vista I thought I should follow up with how to accomplish a similar thing in OSX. For OSX there is only one way to accomplish this, and that way is the manual way.
Just like with the manual way in Vista set up two user accounts, your local admin and a template user. Change all the settings you want for the template user and then restart and log in as admin. To copy the files to the default user you will need to open the terminal and follow the commands below.
Local admin isn’t enough, you will need to actually be using the terminal as the root user. If you don’t have root enabled you can find out how to enable it here.
sudo su
The English.lproj is the default user directory for any user that uses the English language. All we are doing here is copying the English.lproj folder and its contents to English.lproj.bak. For these important files ditto is better than cp because ditto will preserve the “resource fork” using the –rsrc option. It is also a good idea to keep a copy of this default user somewhere else besides just this computer in case something happens. I would recommend zipping up the English.lproj folder and storing it on a backup drive somewhere.
cd /System/Library/User\ Template/
ditto –rsrc English.lproj/* English.lproj.bak
Now that we copied a backup we can remove all the files/settings in the old English.lporj directory. If you accidentally delete the English.lproj folder (instead of just its contents) you can create it again with mkdir.
rm -rf English.lproj/*
Here we are just copying everything from our user we set up to the user template folder. Replace “rothgar” in the below command with the username you gave your template user.
cp -R /Users/rothgar/* English.lproj/
This final step will change the owner and group of the files and folders inside the user template to what they should be. All of the default user files should be owned by root and the group wheel.
chown -Rv root:wheel English.lproj
Those are all the steps needed to modify the default user. It would also be a good idea to reboot the computer, log in as admin, and check/repair disk permissions on the drive just to make sure everything is correct before you take an image of the computer. If everything is correct you can test out your settings with a new user and if everything checks out delete your template user.
Let me know if you have any questions, comments, or problems with the process in the comments.
How-to Create a default user in Windows Vista/7
In Windows Vista and Windows 7 there are two ways you can create a modified default user profile. One is automatic and the other is manual. The automatic way is the recommended way according to Microsoft. However, you may run into some problems using this way so I will explain it the manual way too.
First up is the automatic way. For the automatic way you have to use the system preparation (sysprep) tool that Microsoft provides built into Windows Vista and 7. This tool is used for a variety of things but is mainly used for when you need to create a single computer image to put onto multiple machines. To see all the crazy things sysprep can do read the technical documentation on creating an unattend.xml file for sysprep to change everything from your sidebar widgets to your computer name.
Once you have your unattend.xml file created you just need to make sure you have the CopyProfile option turned on in the “specialize” pass and you should be all set.
<CopyProfile>True</CopyProfile>
A few things to note if you are going to do it this way.
1. The account you run the sysprep command from is going to be the account that is copied to the Default profile. So make sure the account you are running sysprep from has admin rights and is set up exactly as you want it.
2. The administrator account is removed during sysprep. Even if you have everything set up the way you want it to be admin will get the same settings as Default user unless you do some fancy scripting.
You can do some more reading on using this method with the following KB article.
Now for the manual method. This method is good if you don’t want to sysprep the computer because all you want to do is change some items for all the users that are going to be logging into a computer. I got all this information from this technet thread but I have used this mothod pretty extensively.
First thing you have to do is to create the profile just as you want it (same as the automatic steps). In this situation though you need to create a second user account because you are going to use the local administrator account to copy all of the settings from the second account to the default profile.
Once everything is set up just the way you want it, restart the computer and log into the local administrator.
After you log in follow the steps below.
1. Right click Computer and select Properties
2. Select Advanced System Properties (elevating as required)
3. In the system properties dialog click the Settings button under User Profiles
4. Select the account you want to use as a template
5. Click Copy To
6. Change the “permitted to use” option to “Everyone”
7. Use the Browse button to select the location of the default profile (C:\Users\Default) You will need hidden files shown to see this.
8. Click OK
9. Click Yes to overwrite the existing default profile
The steps above copy all the files and settings to the profile but there are still things in there that probably reference your old account you had created. To get rid of all those references to the other account you will need to edit the registry hive of the Default user. Follow the steps below to remove all traces of your template account from the default user.
1. Enable “Show hidden files and folders” in Folder Options
2. Disable “Hide Protected Operating System files” in Folder Options
3. Launch Regedit
4. Select HKEY_USERS and go to File -> load hive
5. Navigate to the profile directly of the user you want to load (e.g. C:\users\default for the default user)
6. Open the ntuser.dat file
7. Provide a name for the hive, this will be used as the root key name for that hive under HKU
8. Search the hive for any reference to your old user account.
9. When you find any keys that reference your old user account you can delete the keys (they will be re-created when someone new logs in).
10. Unload the hive before attempting to log in as the user
After you have finished you can log in with a new user to test that all the correct settings transferred to the default profile. If you are satisfied with everything go ahead and go back to System Properties -> Advanced System Properties -> User Profiles and delete the account you set up for the Default User template.
If you have any questions, comments, or problems feel free to leave a comment. I hope this helps.
How-to Fix a Video Card in the Oven
I recently happen to come across a video card that had problems with 3D rendering. I usually would just throw out the video card and get a new one, but when the video card is a Nvidia 8800 GTX I just couldn’t throw away the card no matter how bad it was broken. Luckily shortly after I got the card in it’s broken state I found this article over at Engadget about someone who was able to fix their Nvidia video card by baking it in the oven. Now of course I thought they were crazy but figured “it’s not like it can break my video card any more”. So I gave it a shot.
I was completely surprised that not only did it do no visible harm to the video card. When I plugged it in my test machine it worked flawlessly. I wasn’t able to test extensively because I don’t have a dedicated desktop that can handle any games that would really test this card. So instead I ran a 3D benchmark tool before and after I cooked the video card. Lets just say that before I cooked it the benchmark tool wouldn’t even start, and after it worked flawlessly.
I am not saying this is a fix for everything you might have wrong with your computer but you may want to give it a try if you have a video card on the fritz. The reasoning I read in the forums that this works, who knows if it is actually true, is that some cards will get micro cracks in their solder joints that cause bad connections between components. Solder melts at 365 degrees Fahrenheit so when you stick the video card in the over you are really just softening and filling in those micro cracks. I have some pictures of the card before and after (there wasn’t much difference) so you can see exactly how I set the card in the oven.
I cooked my card at ~385 for 8 1/2 minutes. We will see how long this card lasts.
In the forums there are probably 2-3 dozen reports of this working on other video cards. I have see 2 unsuccessful attempts out of all the reports I read, and I even saw one person unsuccessfully cook their motherboard to see if it would fix their problems. Let me know if you give it a try in the comments.
How-to enable blank passwords in Windows
If you set up a user account in Windows and you want to allow the user account to have a blank password you may find it a little difficult. In order to accomplish this you probably need to change a couple settings in Windows.

The error message you probably got is:
The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.
To allow a blank password go to Start -> Run and type in gpedit.msc then hit enter.
You should get a window that pops up and has a whole bunch of settings you may have never seen before. On the left side expand Windows Settings -> Security Settings -> Account Policies and then click on Password Policy. On the right side you will need to change a few of the settings.

The three settings you will need to change are Maximum password age, Minimum password length, and Password must meet complexity requirements. Change maximum age and maximum length both to zero and disable the complexity requirements. Once you have these three settings changed you can just close out the window and now you should be able to set a blank password for your user account.
If you cannot change these settings you may be joined to a domain which has these settings locked down. I can’t help you there, but this should help in most other cases.
Let me know if this helps, or doesn’t help, in the comments.
How-to format a disk to FAT32
When backing up my PS3 for repair I needed to plug in a external hard drive to back up the system. My PS3 is only 40 GB but even that is larger than any USB flash drive I have so I needed to pull out one of my USB hard drives for the backup. I started the the backup process and when it asked for a hard drive I plugged in my terabyte external hard drive but nothing happened. I soon found out that the PS3 will only read FAT32 formatted hard drives. I did not think this would be as much of a problem as it was.
First I tried the format tool built into Windows but I found out that Microsoft decided not to let any drive larger than 32 GB be formatted in FAT32 because…well because they suck and wanted everyone to move to NTFS. So I tried formatting from a command line with: format d: /fs:fat32But I got an error saying the drive is too large for FAT32. I know that isn’t true because FAT32 is technically able to format drives up to 2 terabytes. So I decided to try gparted in Linux. Of course gparted wouldn’t have any problems right? Well in gparted I only had the options for ext2, ext3, reiserfs, and unformatted. That’s a bummer. So how about from the terminal? I tried variations of mkfs and mkfs.vfat but I know there was something I was doing wrong because each time it would just give me a error.
Finally I found a way to do it! There is a program called Fat 32 Formatter. This is a command line program that works in Windows XP/2000/Vista and all you need to do is open a commend prompt and type in:fat32format.exe d: You need to replace d: with whatever your drive is currently mounted as. Once the process completes you have a fully formatted FAT32 drive for your PS3 backup needs. There is a mirror of the fat32format tool here just in case it is removed from online.
And yes this was far more complicated than it needed to be. If you have the commands for completing this task in OSX or Linux please leave them in the comments.







