Sound for Mythbuntu

I couldn’t get my sound to work.  Here is what I went through.

This command will help you figure out what is installed:

skp@peanut:~$ lspci -v | grep -i audio
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

This command can also help identify what is installed:

skp@peanut:~$ asoundconf list
Names of available sound cards:
NVidia

This command will also give you some clues:

skp@peanut:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC883 Analog [ALC883 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC883 Digital [ALC883 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0

My problem was that this command said there were no sound devices.  I found I need to make the following changes.

I added these lines to the  /etc/modprobe.d/options file:

# from: http://ubuntuforums.org/showthread.php?p=6313016
options snd-hda-intel model=3stack

I added these lines to the /etc/modules:

# from: http://ubuntuforums.org/showthread.php?p=6313016
snd-hwdep
snd-hda-intel

Then, I rebooted, and the sound worked!

X Configuration for My ESA Plasma TV

We bought a TV a while ago with the thought that one day we could hook the computer up to it.  Well, that day has come, but I had trouble getting it to display correctly.

I enabled the restricted drivers for the nvidia video card.  I could run nvidia-settings to configure the displays.

I had to add some options to me screen section in the xorg.conf to make it look like this:

Section “Screen”
Identifier     “Screen0”
Device         “Device0”
Monitor        “Monitor0”
DefaultDepth    24
Option         “TwinView”
Option         “NoTwinViewXineramInfo” “1”
Option         “metamodes” “1024x768_85,NULL”
Option         “TwinViewOrientation” “RightOf”
Option         “ModeValidation” “AllowNon60HzDFPModes,NoEdidModes,NoEdidDFPMaxSizeCheck,NoVertRefreshCheck,NoHorizSyncCheck,NoMaxSizeCheck,NoDFPNativeResolutionCheck”
Option         “UseEDID” “FALSE”
SubSection     “Display”
Depth       24
EndSubSection
EndSection
Then, I found a nice tool to generate mode lines.  I put the modeline in the monitor section:

Section “Monitor”

# HorizSync source: builtin, VertRefresh source: builtin
Identifier     “Monitor0”
VendorName     “Unknown”
ModelName      “CRT-0”
HorizSync       28.0 – 55.0
VertRefresh     43.0 – 72.0
Option         “DPMS”
ModeLine       “1024x768_85”     69.54   1024 1056 1320 1352    576  586  594  605
EndSection

Resources

Options for xorg.conf

Modeline Tools

PDFLatex

This post is just a fex explorations with latex. I had trouble with the images and PDFLatex.  One thing I noticed was the pdftex.def version:

  • installed: 0.04d
  • currently listed at project website: 0.04l

Updating the pdftex.def (assuming downloaded to the desktop):

cd /usr/share/texmf-texlive/tex/latex/pdftex-def
sudo mv pdftex.def pdftex.def.old
sudo cp /home/skp/Desktop/pdftex.def-0.04l/pdftex.def .

Now, this didn’t solve the problem.  I found that I had to convert the images to pdf. You need to install texlive-extra-utils: sudo apt-get install texlive-extra-utils
Then,
epstopdf imagename.eps

Here is a quick script that will convert all .eps images:

#!/bin/sh
cd images
for f in *.eps
do
epstopdf $f
done

Resources

LaTeX to OpenOffice

I thought I read that converting Latex documents into Open Office documents was possible, but I had trouble figuring it out today.  The bottom line was that I was using the wrong program to do so, and I didn’t have dvipng installed.

Where is oolatex?

When I typed oolatex on the command-line, the system couldn’t find the program.  It turns out that oolatex just isn’t on the path.  It is installed with the tex4ht system.  When installed, it is located at:

/usr/share/tex4ht/oolatex

You can install it with:

apt-get install tex4ht

To compile a document you could use:

/usr/share/tex4ht/oolatex MyDoc.tex

Using htlatex

The command-line for htlatex is a little more complex, but it works.  You can use htlatex to convert a document like this:

htlatex MyDoc.tex 'xhtml,ooffice' 'ooffice/! -cmozhtf' '-coo' '-cvalidate'

Using mk4ht

Mk4ht is  much simpler.  You can use mk4ht like this:

mk4ht oolatex MyDoc.tex

Images

I noticed this in the output:

sh: dvipng: not found

To fix it, I installed dvipng with:

sudo apt-get install dvipng

Then, the images worked fine.

Resources

Java + Compiz

I have been having trouble with getting blank Windows with my Java programs.  The problem first appeared in programs I was working on in Eclipse, but then I found other programs I had downloaded from SourceForge also had the same problem.  Apparently, the problem comes from a conflict with Compiz-Fusion and Java.

Here is the solution:

Add the following line to /etc/environment —

AWT_TOOLKIT="MToolkit"

You possibly need to reboot for this change to take effect.

When I did this I got this error:

java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386

The problem appears to be caused by using OpenJDK.  The solution was to use Sun’s JDK.  This post will not go into detail about how to switch, but here are some things to consider:

  • Install Sun’s JDK with Add/Remove Programs, apt-get, etc.
  • Use update-alternatives to point the OS to the correct Java Home
  • Run java -version to check that the correct version is in use
  • Update the installed JVMs in the Eclipse preferences to make sure that Eclipse is lauching programs with the correct JVM

Resources

winmail.dat

I received an email today from a user with Outlook.  The email contained an attachment called winmail.dat.  I tried to figure out how to view it in Thunderbird, and I couldn’t figure it out.  I finally was able to view it online in GMail.

First, I tried to install the LookOut extension, but it didn’t work.  I am guessing it doesn’t support new versions of Outlook.  I don’t know.

Then, I tried TNEF.  You can install it with “sudo apt-get install tnef”.  I downloaded the winmail.dat file and ran “tnef winmail.dat”.  The response was “Seems not to be a TNEF file”.

In synaptic, I noticed another program called ytnef.  I tried that: “sudo apt-get install ytnef”.  Again, “ytnef winmail.dat”.  Reponse was “ERROR: Signature does not match. Not TNEF.”.

Finally, I checked my mail online with Gmail, and it displayed the embedded image without even complaining about a winmail.dat file!

Sorry that is not much help, but it solved the problem for now.  Please comment if you know another solution.

Resources

Bootable ISO to USB Drive

I was trying to boot the Trinity Rescue Kit without having to burn a CD.  I never did get it to work, but I did get the Ubuntu ISO to boot.

Method 1 (didn’t work for me)

Step 1.  Download the ISO File.  Save it to a directory where you can browse to it.

Step 2.  Browse to the downloaded file.  Right click and choose “Open with ‘Archive Manager’.  (This is for linux.  You could use 7-zip in Windows, maybe WinZip).

Step 3.  Insert the USB Drive; notice where it mounts the drive.  For me it was at /media/disk.

Step 4.  Extract the ISO file by clicking the Extract button in Archive Manager.  Enter the path where the USB drive was mounted for the destination path.

This didn’t work for me.  I am assuming there is more to it than just copying the files onto the disk.

Method 2

Step 1.  Download  UNetbootin.

Step 2.  You need to make the file bootable.  I ran chmod +x unetbootin-linux-299.

Step 3.  When I ran it the first time, it told me that it needed mtools installed.  This was easy to install with: sudo apt-get install mtools

Step 4.  Run it from the terminal with ./unetbootin-linux-299

Step 5.  Choose the diskimage and pick the iso file.

Step 6.  Then, click OK

This worked on Ubuntu, but not on TRK.  When it booted into Ubuntu, it gave me a UNetBootin boot menu, and then it booted all the way into Ubuntu 8.10.

Resources

.iso to USB

Ubuntu: Installation from USB Stick

UNetBootIn

Recovering Windows Vista Password

I had a relative tonight forget her password to Windows Vista.  She hadn’t used her computer in three months, which is a shame because it is a relatively nice one.

Here is a walk-through of what I did.  You may want to read through the whole thing before you try it so you don’t repeat the steps that did not work.

Step 1.  I downloaded Trinity Resource Kit.  I tried to copy it to a USB key and boot from USB, but that didn’t work for some reason.  I had to burn the ISO to a physical CD.

Step 2.  At the boot menu, I tried several options before it would work.  I am guessing it had a conflict with the graphics card.  I finally got it to work by choosing the option #14, (Alternate boot 1).

Step 3.  Once it booted I got a command-line.  I typed:

winpass -u Administrator

Step 4.  Then, the command asked me to choose the Windows installation.  This computer had two Windows options.  Possibly, one of them was the recovery partition.  I didn’t know which one to choose, so I guessed the first option.  Apparently, this was a wrong guess because it just took me to a command-line registry editor.  I hit “q” to quit and it took me back to the command-line without doing anything.

Step 5.  I tried the same winpass command again.  This time, I chose the second “Windows installation”.  This time it gave me a menu.  The menu was different than my instructions, and so, I just hit q for quit.  I could have reset the administrator account, and that would have solved them problem, but I would have had to logon as the administrator and sorted out the account information.

Step 6.  I noticed in the winpass output (before the menu) that it displayed a list of usernames.  I knew which one my relative used, and I substituted the actual username for administrator:

winpass -u <username>

Step 7.  At the menu, I chose 4 to unlock the account — just in case.  I wasn’t sure that it was locked, but they had tried many guesses before I got the computer.

Step 8.  I ran the whole winpass command one more time, and at the last menu, I chose option 1 to blank out the password.

Step 9.  I typed reboot at the command-line to restart the computer.  It ejected the CD before it restarted, and I removed it to let it boot into Windows.  When it started, it bypassed the login screen and logged in automatically.

Problem solved!

Resources