My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Monday, August 25, 2008

Disabling Monitor Power Saver

Update October 25, 2008: I've made improvements on what I describe in this post - please see this later post.

So after upgraded to Hardy Heron I'm having an annoying problem that the system keeps putting the monitor into power save mode after a couple hours. This is a problem because I turn on the monitor with my remote but I still have to go hit a key on the keyboard to then use MythTV. Not ideal. It's definitely power saving (as opposed to a screen saver) since the monitor goes into a power-off mode with the power LED blinking.

First thing I did was check System/Preferences/Power Management. But both "Put computer to sleep when inactive for:" and "Put display to sleep when inactive for:" were set to Never.

So, I tried the directions here for installing bum. A couple of notes:
  • After installing the Bootup Manager, you'll find it under System Administration
  • The Gnome-Power-Manager is just called Power Manager.

Then I rebooted and still no luck, after a couple of hours the monitor is asleep again.

Poking around on the web, I found this useful page on screen blanking under X. I verified that I can reproduce the screen blanking I'm experiencing with the following command:

% sleep 1; xset dpms force off

So, I poked a little deeper at my settings. I believe the "0" values indicate that X shouldn't be turning the monitor off:

% xset q
DPMS (Energy Star):
Standyby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On

But I pushed ahead and next I tried turning off dpms:

% xset -dpms

That seemed to do the trick! Several hours have passed and the screen is still awake.

Ok, now how do I make it permanent. I launched System/Preferences/Sessions. Then I clicked on "Add". For Name I put "Disable DPMS", for Command "xset -dpms" and left Comment blank. Clicked on OK and then Close and then I rebooted the system (I probably could have just logged out and back in, but I like to make sure things work from a boot).

And that seems to have worked, at least 'xset q' now shows DPMS as disabled. Hopefully that ends this tale.

Tuesday, August 19, 2008

Installing VMWare server

So, I wanted to play with virtual machines. I installed VMWare-server following the directions here. I ended up installing VMware-server version 1.0.6 and this was on my Ubuntu 8.04.1 Desktop system.

BTW, the apt-get approach did not work for me.

I then proceeded to download Ubuntu 8.04.1 Server and installed it in a new VM. (BTW, I did try installing a Ubuntu appliance, but I had problems with eth0 not showing up, which in retrospect I suspect might have been solved if I had followed the directions here.)

Installing VMWare Tools into the VM was also tricky. I suspect because it had a 2.6.24-19-server kernel and most of the directions out there are for older kernels. The directions I did find that worked are here.

That's it. Have to say, I'm fairly impressed so far.

Sunday, August 17, 2008

Upgrading from 7.04 to 8.04

Following directions at:

Start with upgrade to 7.10:

That worked flawlessly. Then I basically repeated that step, running the Update Manager again, to upgrade to 8.04.

This time, it didn't go so well. The update froze at

Generating locales...

Fortunately, this thread on the Ubuntu forums shorted things out for me.

So now things seems to be up and running for the most part...

One thing that is obviously broken is the remote control - aka LIRC. No surprise, it breaks every time the wind blows I'm sorry to say.

I reinstalled LIRC per directions here. Except, my lirc device was /dev/lirc/0 instead of /dev/lirc0. This effected some of the testing and also meant I had to change /etc/lirc/hardware.conf:


Then a reboot (always seems necessary with lirc) and that seems to be working.

Ok, Apache doesn't seem to be running. But I think it's time to look into a VMWare appliance...

Thursday, August 14, 2008

Locking down the web server

My next step was to lock down the web server to prevent any anonymous access.

First was to tweak /etc/apache2/apache2.conf (see this previous post for more information:

<Directory /var/www/>
AuthType Basic
AuthName "Casey Web"
AuthUserFile /etc/apache2/basicauth
Require valid-user

Second, I tweaked mediawiki to not allow anonymous access to any page by editing /var/lib/mediawiki1.7/LocalSettings.php. I changed the following line:

$wgWhitelistRead = array ("Main Page", "Special:Userlogin", "Wikipedia:Help");


$wgWhitelistRead = array ("Special:Userlogin");

Saturday, August 9, 2008

Adding SSL support to Apache2

I wanted to increase security and add https support to my Apache2 install. Poking around I found directions here. Which I basically followed:

# apt-get install ssl-cert
# mkdir /etc/apache2/ssl
# make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
# a2enmod ssl
# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
# vi /etc/apache2/sites-available/ssl
# diff /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
< NameVirtualHost *
< <VirtualHost *>
> NameVirtualHost *:443
> <VirtualHost *:443>
> SSLEngine On
> SSLCertificateFile /etc/apache2/ssl/apache.pem

# a2ensite ssl
# /etc/init.d/apache2 reload
# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
# vi /etc/apache2/sites-available/default
# diff /etc/apache2/sites-available/default.orig /etc/apache2/sites-available/default
< NameVirtualHost *
< <VirtualHost *>
> NameVirtualHost *:80
> <VirtualHost *:80>

But then I ran into this problem:
# /etc/init.d/apache2 start
* Starting web server (apache2)...
[Sat Aug 09 17:28:50 2008] [warn] The Alias directive in /etc/apache2/sites-enabled/001-mediawiki at line 1 will probably never match because it overlaps an earlier Alias.
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs!

Which I fixed by commenting out the Listen directive in ports.conf:
# vi /etc/apache2/ports.conf
# cat /etc/apache2/ports.conf
#Listen 80

That got things working.

While I was playing with Apache configuration, I went ahead and fixed a warning about a undefined server name:

# vi /etc/apache2/apache2.conf
# grep ServerName /etc/apache2/apache2.conf