Entries Tagged Ubuntu
May 29th, 2008 — Programming, Ubuntu
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 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.
May 9th, 2008 — Ubuntu
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.
March 17th, 2008 — Ubuntu, 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.
February 25th, 2008 — Ubuntu, Windows
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.
January 14th, 2008 — Enabling Technology, Ideas, Programming, Ubuntu
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)
December 21st, 2007 — Ubuntu
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.
December 12th, 2007 — Links, Ubuntu
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.
November 4th, 2007 — Ubuntu
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.
October 31st, 2007 — Ubuntu
My previous despair faded and I’m giving Gutsy another try. Configuring my disks so that I have two partitions available for OS installs made it easy to try things as I got the chance.
I finally found a combination of settings that appear to make my displays work and don’t kill gnome-terminal. I’ll attach my xorg.conf here in case I forget what it took.
Sound volume is markedly lower than under Feisty. But I simply turned up the volume on my speakers.
I went back through my old Ubuntu posts and redid the things that seemed applicable. Hopefully my update won’t be too much trouble for Murray.
October 27th, 2007 — Links, Ubuntu
I’ve been annoyed for months by my laptop selecting my neighbor’s access point over mine. On every startup I’d have to make sure I was using our network. I looked a few times but apparently with the wrong search terms. The answer is to use gconf-editor as described here. One point that momentarily fooled me, you do not want to use sudo for this.