Month: December 2008

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