Archive for the ‘How To’ Category

Recover Data From a Formatted Hard Drive

Testdisk great piece of software recover data from a bad hard drive or a hard drive that has been accidentally formatted.

I discovered this software when I accidentally formatted my work laptop which was running Gentoo Linux.  Its a long story as to how I formatted the hard drive but I didn’t have a backup of my data so I was basically screwed, or so I thought.  I did some Google searches and came across Testdisk.  Once I figured out how to use it I managed to restore my system back to the original Dell Windows XP installation.  Yes that is correct it restored and booted.   I realised that I restore to wrong data and thought that I was now really screwed but I fired up the software again and was able to total restore my Linux system.  If memory serves me I had to reconfigure Grub but my system was restored and my data was safe.  Needless to say I was very very happy.  Sorry I don’t have many details on what I did to recover my data but it was over 3 years ago that I did this.

I am basically writing this post for two reason; 1) to let you know how awesome this software is and 2) I always forget the name of this software and it takes me 20-30 minutes to find it when I need it to recover data, so I am using this as a bookmark.

Here is a guide from Linux.com that gives you a run down on restoring data when you wipe your drive.

If you do use this software and are able to recover data please let me know, I like hearing the success stories.

How to: Mount A USB Drive Read Only In Windows XP/Vista/7

There are times that it would be nice to mount a drive in Windows and set it to read only to avoid accidentally over writing data on that drive. After some Google searching this is what I found. This will only work on Windows XP sp2 and later and Windows 7. I have not tested it on Vista although I assume that it will work.

Step 1
Open regedit.exe
Start > Run Type regedit.exe
Click OK

Step 2
Navigate to the following registry key.  It may not exist there for you will have to create it.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\StorageDevicePolicies

Step 3
Next create a new DWORD called WriteProtect and give it a value of 1

Step 4
Now plug in your USB drive and you will not be able to write to the device.

To make it writable again you will have to change the WriteProtect DWORD to 0 and unplug and replug in your device.

“ICU_DATA is not set” Error message in Actuate 9

A customer of mine was getting an error message when trying to start his Acuate 9 iServer service.  The service would respond with the error message “The service did not respond in a timely fashion.”  Which doest mean anything to you or me.  So I copied the path to executable statement that the service was trying to start in to a command prompt windows so that I could see any output from the command. Here is the output:

C:\>"d:\PROGRA~1\Actuate9\iServer\bin\pmd9.exe"
ICU_DATA is not set

So I checked my system environment variables and saw that the ICU_DATA variable was set to c:\windows\system32

c:\> Set
...
ICU_DATA=c:\windows\system32\
...

I attempted to Google the error message and only came up with a few pages and most didn’t help. I then searched the d:\program files\Actuate9\iServer folder looking for any file that contained the words ICU_DATA. It did have a hit but it was with a HTML help document that didn’t help.
I then decided to search the c:\windows\system32 directory, since this is where ICU_DATA is pointed, for any file that contains the letters “icu” in hopes to find something. I came up empty handed. I then decided to do the same searches on a test Actuate 9 server that I have. This time the search did find something. Two files in the system32 directory named acicudt18_71.dll and acicudt18_71w.dll. I then copied these two files to the c:\windows\system32 directory on my customers server and I was then able to start the Actaute 9 iServer service and they were very happy.

Here is a zip file containing these two dlls just in case you need them and don’t have a test server to copy them from.

Why were these files missing?  I am not sure and didnt have a chance to investigate.  I decide to write this post in hopes that it helps someone else that is having this issue since there is very little data about the ICU_DATA variable on Google

How to: Restore Outlook 2007 default enter key behavior from double space back to single space

Outlook 2007 has an annoying feature where it assumes that every time you hit the enter key in a new message that you automatically want it to be double spaced.  You can easily just hit SHIFT+Enter to invoke this single space return but that get annoying after a while.  Here is how to make you Enter key just do a single space return.

Step 1
In a new email message click on the Format Text Tab

Step 2
Click the Change Styles button

Step 3
In the drop down click Style Set then click Word 2003

Step 4
To make it the default for all messages click the Change Style button again and this time click Set As Default

Here is a screen shot of the icons that you are clicking on.

OutlookMsg1

How to: Configure Mediatomb/DLNA on Fedora 12 to work with a Samsung TV

I just purchased a Samsung LN46B650 TV and decide to play with the DLNA capiblities of the TV.  The TV come with a CD containing a Windows DLNA server but because I am a geek, I dont have a Windows machine in my house.  I though that since DLNA is a standard that it would be easy to use any DLNA server to host content for my TV.  Well I was partly right.  After reading several forum post I have successfully got everything working on my Fedora 12 netbook.  I will most likely be doing this on a Ubuntu machine at some point at which time I will update this post.

Step 1:
Assuming that you have a working Fedora 12 system that is connected to the same network as your TV make sure that you have port 50500 open or just disable your firewall (your choice).  You can manage this by going to System > Administration > Firewall

Step 2:
Open a terminal and do a yum install mediatomb.

Step 3:
Login as root and using your favorite text editor, open the /etc/mediatomb.conf file and modify the following parameter:

Enter the correct network interface for mediatomb to communicate to. In my case I am using the wireless connection of wlan0

## Network interface on which the server will run, you need to edit this!
MT_INTERFACE="wlan0"

There are other options that you can configure in this file but the network interface is the only on the I had to modify.

Step 4:
As root open a terminal and run mediatomb. This will start the software and configure the sqlite database and setup the default config.xml file that we are going to need to modify. Once the software is running go ahead and hit ctrl-c to exit from the software because we need to modify that config.xml file

Step 5:
With out this step your TV will be able to browse the content but not be able to do anything with it.
Also as root, edit the file /root/.mediatomb/config.xml
Look for the section:

<!–
<custom-http-headers>
<add header=”X-User-Agent: redsonic” />
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
–>

and change to to this

<custom-http-headers>
<add header=”X-User-Agent: redsonic”/>
<add header=”transferMode.dlna.org: Streaming”/>
<add header=”contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000?/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>

Now save the file.

Step 6:
In the terminal windows as root type mediatomb to start the application.

Now you should be able to connect to the Mediatomb webpage and start adding content to share via DLNA. Typically this is on port 49152 or 49153. You will be able to get this infomation from the lastline of output given when you run mediatomb from the command line.

Step 7:
To play videos you may have to re-tag the MIME information to video/mpeg. You can do this in the web interface. Once you have added a video to the database click on the notepad/edit button and change the mimetype to video/mpeg. There is also an option in the config.xml file where you may be able to do this globally for all media. I have not tried this yet and will update this post once I have.

Step 8:
Instead of having to start mediatomb manually each time you reboot there is also a daemon that you can start via /etc/init.d/mediatomb. If you plan on using this in daemon mode you will need to configure it by doing this:
Start the daemon so that it will install the default config files and sqlite database

root#  /etc/init.d/mediatomb start

Then go to /etc/mediatomb/config.xml and make the changes that you made above. Once you have made these changes restart the mediatomb daemon

root# /etc/init.d/mediatomb restart

Now you can go to the web interface and start adding content.

Please let me know if you have any other experiences connecting to your Samsung TV with mediatomb or any other DLNA server. Also please leave a comment if you have found this guide useful or if you see any correction that I need to make.

Also to give credit where it is due here is where I got some of the information above Cnet Forum Post

How to: Get Adobe Air Working in Fedora 12

So you just got Fedora 12 installed on your computer and you need to Tweet about it from Tweetdeck, right?  But wait you are having some issues. You have Adobe Air installed and every time you try to install Tweetdeck you get this error:

Application crashed with an unhandled SIGSEGV
Crashlog has been dumped in /tmp/airCrashLogs/1118_2022_uRpKSj

Here is how to fix it:

linux$ su -
Password:
linux# for c in /etc/opt/Adobe/certificates/crypt/*.0; do aucm -n $(basename $c) -t true; done

Thats it, here is the FedoraForum post where this came from.