Watching the World Juniors Online

I’m currently attempting to watch the quarter final game between Sweden and the Czech Republic on TSN’s website. It’s really more of a slideshow and about half of the audio feed. My connection is fast enough, I can only assume that there is not enough bandwidth for all the hockey mad Canadians stuck at work (like me). And why aren’t they showing the other quarter final (United States vs. Finland) since that will be Canada’s opponent in the next round?

I watched the replay of Canada and Slovakia and that worked okay, mostly. There were a few hiccups, but nothing major. It was definitely watchable, even if the screen is a little small in a big window.

I would probably be better off with a Slingbox, so I can watch the semifinal from home. Or maybe I could try Orb, since it’s free and I have a tv tuner (that is not supported, unfortunately). I really like the idea of tv on the internet, but I don’t think it’s ready for prime time yet.

PHP 5.2 and Upgrading Drupal Without Logging In

I switched computers again, so I had to transfer my Drupal installation again. This time, I followed the instructions at joshdick.net as they are well written and more complete than mine. (Mostly. I didn’t really need the FTP server or the domain name.) And of course, I installed the newest version of each program.

After installation, I started making sure everything was working correctly. The biggest problem I had was with Drupal. I was running 4.7.3 and there is an authentication issue with PHP 5.2. I could log in but as soon as I clicked on anything, I was logged out and got plenty of denied messages. It seemed like Drupal had amnesia.

Fortunately, I found the problem and solution on drupal.org about it. There were a few things I could do to fix it. I could downgrade PHP, I could patch the current version of Drupal, or I could upgrade Drupal.

I chose to upgrade Drupal to 5.0 RC1. I followed the upgrade instructions but they didn’t work quite as described. I logged in as user 1 but when I tried to access drupal/update.php on my installation, I got a message that said Access Denied. They also listed a quick fix. There is a line near the start of the update.php, $access_check = TRUE;. All I had to do was change this to FALSE and access drupal/update.php again. Everything seemed to work, with no error messages and a reminder to change access_check back to TRUE.

How to Use Synergy

I remember reading about Synergy a while ago and now I have a chance to use it. I’ve been working on a Linux server so I can try out some web apps such as Opengroupware. Both computers are at my desk and I was annoyed with having to switch keyboards. Plus, I grabbed the wrong one half the time.

The documentation was a little confusing at first but it’s working nicely now.

The Windows computer is my primary computer, the one that has the mouse and keyboard that I plan to use. I installed the Synergy program and started the configuration. In the first window that comes up, I selected the option to Share this computer’s keyboard and mouse. Then in the Configure button, I added both screens (fedora and safety2) and then created links between them. I believe if you don’t create the links, the cursor will not change screens. I also went into the AutoStart dialogue and set Synergy to start automatically when I log in.
Next, on the Linux computer, I installed Synergy with Synaptic. There are two executable files that are installed, synergyc and synergys. Because I wanted to control the Linux computer remotely, I used synergyc. I’m not completely sure if I had to, but I created a synergy.conf file in /etc in the following pattern from the Using Synergy page:

section: screens

screen1:

screen2:

end

section: links

screen1:

right = screen2

screen2:

left = screen1

end

The next step is to start Synergy on the Linux computer by running synergyc safety2 in a terminal. Everything should be working, but if not, there is a lot of information on the Synergy web page.

If you’re feeling adventurous, you can also make the server and client run automatically as the server or client. It’s easy with the windows version and a little more involved for the Linux side of things. Instructions are available at the Synergy website under Autostarting.

Switching from PasswordSafe to Keepass

I have been using PasswordSafe for a while. It is a handy program and it works well. However, I decided to switch to KeePass to make things a little easier for Tara. PasswordSafe remembers the last open database and sometimes it was mine.

I didn’t really feel like cutting and pasting every field for all my passwords so I started looking at the import export functions for each program. There didn’t seem to be a common format. XML was promising but they didn’t use the same schema and I didn’t want to edit the xml file to match the proper format.

After a quick search, I found the following instructions.

  1. Use the Password Safe function to export to CSV file
    (File -> Export To -> Plain Text)
  2. Import the text file into KeePass
    (File->Import From->PWSafe v2 TXT file)

This process sort of worked. All of the passwords were imported but some of the names were screwed up and the groups were not imported correctly. I think that happened because I was using version 3.04 of PasswordSafe and KeePass was expecting a version 2.x format to import. I currently have about 25 passwords and I had to fix 8 of them. Also, the url wasn’t put in the proper spot. It was in the notes section instead of the url entry. Despite the importing glitches, it was still quicker than copy/pasting every field for each entry.

For those of you who are more worried about security than I am, you know this is a very insecure method to transfer passwords. For others, you may wish to export the (unencrypted) text file to a Truecrypt partition and/or use Eraser on the text file once you’re finished with it. And don’t do this on a public computer. You never know who might find your passwords.

Installing sshd in the Cygwin Package

I was installing sshd on my Windows XP computer after I was reminded about it on Lifehacker. I had previously installed Cygwin but I was missing a rather important step. The last little bit of running sshd-host-config was rather discouraging.

The service has been installed under LocalSystem account.
To start the service, call `net start sshd’ or `cygrunsrv -S sshd’.
chown: `system’: invalid user
chown: `system.544′: invalid user
chown: `system.544′: invalid user
chown: `system.544′: invalid user

Host configuration finished. Have fun!

Well, it’s difficult to have fun with sshd when the service won’t start. Fortunately, I discovered my mistake before too long. When I was making the passwd and group login files, I used mkpasswd -d and mkgroup -d, which put the domain users and groups into the files. I was supposed to use the -l switch. It turned out that I needed to add the system account to the passwd file and the group file. After I did that, everything was working. However, I should really remove some of the other users since they don’t need access and their passwords aren’t the greatest.

My Drupal Rewrite Rules

I have Drupal 4.7.3 on my Lighttpd server and it requires some rewrite rules for Clean URL’s. I found an example in the drupal.org forums (http://drupal.org/node/50243) and adapted it for my use. The only problem I’ve noticed is that the option for Private downloads through Drupal does not work. Public downloading still works, and I’m not sure why. I might have a mistake somewhere. Drupal is in its own subdirectory called (surprisingly) drupal.

Oh, and fastcgi definitely does not work with Windows, lighttpd, and php, at least for now. A new version was just released but I don’t believe that has been fixed yet.

#for Drupal, found at # Clean URL
#server.modules += ( “mod_rewrite” )

url.rewrite-final = (
# Clean URL test for 4.6
“^/drupal/system/test/(.*)$” => “/drupal/index.php?q=system/test/$1″,

# Clean URL test for 4.7
“^/drupal/system/test-clean-url/(.*)$” => “/drupal/index.php?q=system/test-clean-url/$1″,

# feed alias
“/drupal/rss.xml$” => “/drupal/index.php?q=rss.xml”,

# Search
“^/drupal/search/(.*)$” => “/drupal/index.php?q=search/$1″,

# More than one argument
“^/drupal/([^.?]*)\?(.*)$” => “/drupal/index.php?q=$1&$2″,

# No arguments
“^/drupal/([^.?]*)$” => “/drupal/index.php?q=$1″,

#to download attachments via private downloads, but doesn’t seem to work. Something missing?
“^/drupal/system/files/(.*)$” => “/drupal/index.php?q=system/files/$1″

# Exempt .html suffixes. Uncomment this if you have your path aliases end in .html
#”^/([^.?]*\.html)$” => “/index.php?q=$1″

)

#There is also a suggested deny rule to go along with the rewrite rules.

url.access-deny = ( “~”, “.inc”, “.engine”, “.install”, “.module”, “.sh”, “sql”, “.theme”, “.tpl.php”, “.xtmpl”, “Entries”, “Repository”, “Root” )

HOWTO: Installing lighttpd, PHP, and MySQL on Windows XP

I recently had to change computers at work because of a hardware failure. Unfortunately, my new one is a somewhat less capable. The biggest issue is the lack of RAM (only half a gig? That’s practically useless! And what’s up with Dell getting rid of PS/2 ports?). Anyway, I had an older version of XAMPP running on the old one for internal use and found that Apache can be a bit of a memory hog. Also, I was using the Python plug-in and it seems like they stopped development on that. I had no particular reason to stay with XAMPP anymore.

It was time to try a different web server, one that was a little less weighty (okay, that’s an awful pun). I had looked at lighttpd in the past but no Windows binaries were available. However, there is one maintained here (v1.4.11). (Here’s a new link, the website was changed)  Installation was fast and simple, although it would have been nice to pick the install directory. However, I didn’t have to compile it, so I won’t complain too much. It worked right away, and the sample page was up and running.

Next, Continue reading