Geeks making the world a bit better.

Entries Tagged Ubuntu

Disable balloon tips in Thunderbird

I’ve started using Lightning for my calendar and I really like it except for the stupid balloon tips that pop up and get stuck every time my mouse passes over the Thunderbird window, even when it is below another window. I turned them off with Edit->Preferences->Advanced Tab->Config Editor… and setting browser.chrome.toolbar_tips to false. Much better now.

Outfox: speech, sound, and more for Firefox

Quick net

Outfox is a Firefox extension that allows in-page JavaScript to access local platform services and devices such as text-to-speech synthesis, sound playback and game controllers. You can read all about it at its Google Code page and discuss it in its Google Group.

Motivation

In our continuing pursuit of the best platform for delivering accessible games and tools to people with disabilities we are now focusing on Firefox to see what we can accomplish from inside the browser. Up until recently, we’ve used Python. Its a great language and we’ve delivered thousands of copies of our apps to people all over the world but I kept thinking we could do better. For example, the ability to author games in Hark the Sound has enabled teachers to do things we never imagined but sharing games is so complicated that is almost never happens. In contrast, the exciting response we’ve seen to Tar Heel Reader with 419 books in 3 languages after just 10 weeks online has convinced me that browser-based apps can have a big place in our work.

Firefox is a nearly perfect platform; it runs everywhere we want to be and it is easy to program but it has a few deficiencies that limit what we can do. Many of our users are blind or visually impaired. For these kids, speech and sound are a must. Speech and sound are important for kids who can see as well. For example, many beginning readers benefit from having text read to them. Unfortunately, sound in the browser gets little respect.

We used SoundManager2 with a web-based text-to-speech server in Tar Heel Reader. It works well enough but the delays associated with fetching speech as mp3s over the web and the requirement to be online to get speech look bad in comparison locally hosted program.

Outfox

Outfox provides a simple programming interface to JavaScript running in the browser so it can access services on the computer that aren’t normally available. In this first release, we enable access to speech and multi-channel sound with callbacks into JavaScript at the beginning and ends of words and sounds. Soon we expect to extend it to include joysticks, DDR pads, and such. With access to these capabilities I believe we can implement browser-based versions of our most popular games such as Hark the Sound, Sonic Zoom, and Descent into Madness. If things work as I hope, teachers will have access to hundreds of curriculum-related games and a simple way to write and share their own. I hope we’ll get cross-over between the amazing community behind Tar Heel Reader and the community of teachers of the visually impaired and orientation and mobility teachers who use our games for blind children. When we start seeing books about games and games about books, we’ll know that synergy is taking hold.

I’m excited about offering Firefox with speech and sound to my students to see what amazing things they’ll think of doing. How about self-voicing web pages and maps? How about books with interactive, switch-accessible games embedded?

This initial version is likely buggy on at least one of the three operating systems we’re supporting. Please give it a try. Or better yet, download the source, and help us make it better.

Also, help us get it out of the sandbox at Mozilla Addons by trying and commenting on it.

Creating PowerPoint Slide Shows from Wordpress Posts

For the Tar Heel Reader project I needed to convert very simple multi-page WordPress posts into PowerPoint slide shows. I chose the circuitous route of making an OpenOffice Impress show by bashing XML and then converting it to PowerPoint. I manually created a prototype slide show with a title page and a single book page in Impress and saved it in their native .odp format. These files are simply zip archives containing several XML documents and the images. Why they didn’t include the sounds, I don’t understand. The important file is content.xml. Examining it in Firefox revealed the bits I’d have to change on the title page and for each page of the book. I found several useful hints in a Linux Journal article by Collin Park. I used the PHP DOM module to read in the prototype, update it for the current book (retrieved with the WordPress get_post function), and write it out along with the images. Zipping this result up produces a new Impress presentation for the book.

Then I needed to convert the Impress format to PowerPoint. Thankfully, I found PyODConverter to automate that part of the job. It worked fine when I ran it from the command prompt but I could not get it to find the server when I ran it from PHP. Again the web came to my rescue with a post by Piero. I’ll reproduce the code here so I don’t forget it.

cd /var/www                                      #www-data user home
sudo mkdir .openoffice.org2                      #create the openoffice working dir
sudo chown -R www-data:www-data .openoffice.org2 #set the owner
sudo chmod 700 .openoffice.org2                  #change permissions
sudo -s                                          #you need to be root
su - www-data                                    #if you want to be www-data

#start openoffice headless
xvfb-run -a soffice -accept="socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -invisible

Now I need to figure out how to get this into /etc/init.d so that it will automatically start on reboot.

Cooling off the nVidia graphics in my D800

I recently upgraded my D800 to Ubuntu Hardy. Things seem to be working fine. Looking through the packages available I saw that I could get sensors-applet to monitor internal temperature sensors. This showed that my GPU was running near 75 degrees C.The nvidia-settings tool showed I was running at Performance Level 2 and appeared to be stuck there. I searched a bit and found other people looking for the same info and got a few hints. After some fooling around I found the following commands would cool things off. They may reduce performance but I don’t need it.

nvidia-settings --assign="GPUOverclockingState=1"
nvidia-settings --assign="GPU2DClockFreqs=100,230"
nvidia-settings --assign="GPU2DClockFreqs=100,230"

Yes, I know that I’m setting the 2D Clock Freqs twice. The first time seems to move it to Performance Level 1 and the second time drops it to level 0 where I want to be. I got the numbers from the nvidia-settings on the Power Mizer tab.

I put those commands in a script and run it using the Sessions facility I found at System->Preferences->Sessions.

Access to my Ubuntu files from Windows

For some if my Windows testing VMware, sadly, won’t do the job. For example, I can’t get my USB webcam’s to work on an XP guest running on VMware on my Ubuntu machine. For testing these things I have to use my laptop. Unfortunately that requires copying files over. So I wanted to share my Ubuntu files with my laptop.

It took a while and I tried many things but I think this is the combination that did the trick.

In Synaptic, install samba.

At the command prompt, run

 sudo smbpasswd -a yourid

give it your password and the password you want to use from the windows machine.

Now on the windows machine you should be able to connect. You may need to use the numeric IP address of the host.

Guest clock running way too fast in VMware

I just noticed that the clock on my guest Windows XP system was running way too fast on my host Ubuntu Gutsy system. I had also noticed that double clicking seemed really difficult and there were a few anomalies with sound.

A bit of Googling turned up this tip from the VMware knowledge base. So to fix things I added these lines to the bottom of /etc/vmware/config.

host.cpukHz = 3060000
host.noTSC = TRUE
ptsc.noTSC = TRUE

Now the clock and lots of other things are better.

LiveCDs for delivery of ET applications?

Our games and tools for kids with disabilities should run on whatever computer they have at the school (typically an old PC running some version of Windows or a Mac). One alternative to cross-platform testing might be a LiveCD that boots some OS (say Linux) and runs our software. Then our development environment is fixed and we’re relying on the OS to cover over hardware differences. Pete and I spent a bit of time this last weekend trying our various LiveCDs to see how little memory they could be made to use.

We used VMware as the test platform and tried Ubuntu, Xubuntu, Fedora 8, Puppy Linux, and Damn Small Linux. Something Ubuntu-based would suit me best because it is the environment I know. The results of our casual testing appear to be that 128 megabytes of memory is about the minimum for for the Ubuntu or Fedora livecds to boot properly. That isn’t to say we couldn’t make our own that would require less. Pete found Reconstructor which claims to make LiveCDs configured however you like. I’m guessing we could strip things down to the point that there isn’t even a window manager. If I could get a single OpenGL rendering context that filled the screen I’d be pretty happy for most of our stuff.

I also tried Puppy Linux and DSL. I couldn’t get Puppy to boot live in less than 64 megabytes. DSL would boot live in 32 megabytes but I couldn’t do much else. I’ve ready that PyGame can be made to work under Puppy. I’m hesitant to go in that direction just because I’d be giving up the very supportive Ubuntu community and repositories.

None of these is as promising as I had hoped. I think I’ll take a LiveCD with me when I visit Andrew’s Elementary later this week and see if I can get one to boot on the PC’s there.

Pros of LiveCDs:

  • We’re in charge of the environment our software runs in.
  • We’d never have to test on Vista
  • No worries about the IT department being unwilling to install the software (lots of teachers complain about this).
  • Simple for teacher’s to use with no complicated installation instructions

Cons of LiveCDs:

  • Apparently requires a pretty beefy machine with 64 to 128 megabytes of memory and CD drive.
  • Unclear how many different hardware configurations are really supported in a strict plug-and-play way (no way I’m going to get teachers to type options for the boot command).
  • They would be impossible for most users to download because they are so big.
  • Intel only (but that hardly matters anymore)

Gutsy kernel update broke my boot

Today Gutsy automatic update brought in a new kernel and required a reboot. The reboot failed with a scary message after the grub prompt. After a few moments of panic, I remembered the command prompt available from grub and typed
find /boot/grub/menu.lst

This told me that it found them on hd1,0, hd1,1, and hd3,1. Looking at the script the update had inserted I saw that it was referencing hd0,0. Changing that to hd1,0 using the built-in editor allowed the boot to proceed. Once I had the machine up I edited /boot/grub/menu.lst to fix that error.

Recording from /dev/dsp on my Audigy2

I couldn’t get sound input to work. Output works fine but the microphone input on my Audigy2 card returned silence. After lots of Googling I found this post on Ubuntu forums. Indeed using alsamixer to adjust Master, Mic, and Analog Mix did the trick.

Compiz not ready for prime time

I fooled with turning on Desktop Effects in Gutsy. They were on by default on my R60 laptop but wouldn’t start on my desktop machine with an nVidia Quadro4 900 XGL driving two projectors. I found the nvidia-settings tool very helpful and realized after some web browsing that I could turn off xinerama and enable TwinView. Doing that plus adding the Option "AddARGBGLXVisuals" "True" to my xorg.conf fixed things up. Things looked good until I logged out. Attempting to log back in resulted in a blank desktop with the apparently meaningless message Gtk-WARNING **: This process is currently running setuid or setgid. in my .xsession-errors file. I googled around a bit and found a suggestion to try moving aside the .gnome2 folder. I did that and things appeared to work for one or two logins. Then back to hanging.

I also found there are weird problems with Matlab when it is running.

My initial problems with Gutsy were also apparently related to changes they made to enable Compiz. I worry that this buggy eye-candy is going to give Ubuntu a bad name.

My advice is turn it off.