Tuesday, July 27, 2010

Creating new SSP with host headers

I've just spent several hours banging my head against the desk trying to set up a MOSS development environment, and not being able to access the newly created SSP. It has nothing to do with permissions (couldn't access with the account that was used to create the SSP), or having the SSP name the same as the App Pool name.

What was the issue was that I was being tricksy and using port 80 with all three of the sites (SSP Admin, MySite and Portal) and using host headers to identify them. Without any changes, this causes a 401.1 error because in Microsoft's words: "...the Web Site uses Integrated Authentication and has a name that's mapped to the local loopback address."

In the Microsoft KB article, there are two fixes, both involve editing the registry:

  1. Specify host names in the BackConnectionHostNames multi-string value, or
  2. Disable the loopback check.
The second one is easier if it's a dev environment, but the first is preferred if using NTLM authentication.

Friday, July 16, 2010

Add album to amarok playlist remotely

Completely different track here, this is more for my own reference until I get around to creating the bash script...

I've just discovered the need to manipulate amarok remotely through SSH and came across DCOP which is really cool.

The first problem is when you login in via SSH, DCOP is not running in your session because it's not a KDE session. You can connect to the one that is already running, by adding the '--user `whoami`' parameter to each DCOP call. I just created an alias to automatically do all that:
alias damarok='dcop --user bruzie amarok'

Get list of tracks for an album:
damarok collection query "select url from tags, album where tags.album = album.id and album.name = '<album name>' order by track" | sed 's/^\./"/g; s/$/"/g' > playlist

Then replace the newlines with a space:
sed '{:q;N;s/\n/ /g;t q}' playlist

Which leaves me with a nicely formatted list of tracks to paste into:
damarok playlist addMediaList [ <tracklist> ]

So I can start playing them:
damarok player play