Is softwareupdate Broken in 10.4.0?
I've seen this more than once - the Update tab in SA doesn't do anything and neither does "softwareupdate -l" - they just wait forever. Here's a workaround (PPC!):
$ curl -O http://tinyurl.com/ynh85z
$ hdiutil attach ./*.dmg
$ cd /Volumes/Mac\ OS\ X\ Server\ 10.4.8\ Combined\ Update/
$ sudo installer -verbose -pkg ./MacOSXSrvrCombo10.4.8PPC.mpkg/ -target /


After that, softwareupdate and SA > Update seem to work again. :)

|
No More OpenWiFi From Me!
My net connection was dropped yesterday. After the standard reboot/check/repeat procedures I decided to call the ISP. The customer service person was happy to report that this was not a glitch, but that my connection had been cut due to too much spam coming from my modem...

I was of course a little surprised. We have 3 Macs + 1 Debian box in our home network, none of which, I'm pretty sure, are spamming. But then it hit me. Because the IOXperts driver/old Orinoco card combo in my sister's Lombard PB doesn't support WPA, and WEP is pointless, I decided to just leave the wireless open. I called the network OpenWiFi and promised myself I'd keep an eye out for any suspicious activity, which of course I forgot to do and I guess this was the result.

Well, MAC ACLs are now in place. What's interesting is that we had just been discussing this over at #afp548 and so it turns out that some ISPs are in fact cutting spammers off. Nice, but it sure doesn't feel so when you're on the receiving end of it...

|
The Headless Install
It's really quite simple when you know it. This is all also somewhere in the documentation, but here are the exact steps for easy reference:
1) Boot off the install media
2) On another machine that has the tools installed, pull a
/System/Library/ServerSetup/sa_srchr 224.0.0.1

That should get you something like this:
localhost#1.25 GHz PowerPC G4#192.168.0.114#00:11:24:3e:62:aa#Mac OS X Server 10.4#RDY4PkgInstall#3.0#512

3) Cool.
ssh root@192.168.0.114
Password: the first 8 characters of your server hardware's serial number

4) Set up the disks (if you have hardware RAID, remember to use megaraid!):
-sh-2.05b# diskutil list
/dev/disk0
#: type name size identifier
0: Apple_partition_scheme *37.3 GB disk0
1: Apple_partition_map 31.5 KB disk0s1
2: Apple_HFS Mac OS X Server 37.1 GB disk0s3
/dev/disk1
#: type name size identifier
0: CD_partition_scheme *746.0 MB disk1
1: Apple_partition_scheme 649.6 MB disk1s1
2: Apple_partition_map 31.5 KB disk1s1s1
3: Apple_Driver_ATAPI 4.0 KB disk1s1s2
4: Apple_HFS Mac OS X Server Install Disc 1 649.2 MB disk1s1s3
/dev/disk2
#: type name size identifier
0: untitled *467.0 KB disk2
/dev/disk3
#: type name size identifier
0: untitled *95.0 KB disk3
/dev/disk4
#: type name size identifier
0: untitled *95.0 KB disk4
/dev/disk5
#: type name size identifier
0: untitled *95.0 KB disk5
/dev/disk6
#: type name size identifier
0: untitled *219.0 KB disk6

I want my install on disk0, also check that the disk is working OK:
-sh-2.05b# diskutil randomDisk 1 /dev/disk0
-sh-2.05b# diskutil eraseDisk "Journaled HFS+" Server disk0
Started erase on disk disk0

Creating Partition Map
5% ..
Formatting Disk 100% ..
Finished erase on disk disk0

Finished partitioning on disk disk0

4) Install (this installs everything)
installer -lang en -verbose -pkg /System/Installation/Packages/OSInstall.mpkg -target /Volumes/Server

5) Reboot. Run Server Assistant.

|
Setting up HansaWorld Enterprise
Actually managed to find some documentation on this (why their server won't list it's program arguments, I will never understand). It's here.

When you're wrapping to launchd, keep in mind that every parameter has to go in a separate <string> tag. Ie not <string>--port something</string>, but <string>--port</string> <string>something</string>

Otherwise the server will start up, but won't be accepting connections on that port.

|
7 Days Without a Mouse
More like 7 hours really. It turns out today's UIs pretty much require a mouse (even though they don't list them as a requirement, like they used to). Universal Access > Full Keyboard Access helps alot, but the 2 major things that made me reconnect my mouse were:
* Webpages. Painful to access links.
* IRC. Can't open links either.

|
Useful info on AFP
Mac OS X Server: About Privilege Mapping and When It Is Used
defaults read -g com.apple.AppleShareClientCore
defaults read /Library/Preferences/com.apple.AppleFileServer

|
JSINF vol 3
Ping scanning with nmap. Ie how to find all your machines on the local subnet that have a DHCP address (100+)

nmap -sP 192.168.0.100-255

|
Securing WebMail (if only just a little bit)
By default, the squirrelmail conf only allows plaintext, but you don't have to enable that just because of your webmail users. To fix it, just do:

sudo /etc/squirrelmail/config/config.pl

And set Server Settings > Update IMAP Settings > Authentication type > cram-md5. There are a bunch of other useful settings there that should be checked as well. This must be mentioned in the docs as well.

|
Final Thoughts on LaTeX
Was just looking to find a nice clean document format for my thesis and stumbled on this Apple Blog article.

I think LaTeX is mostly useful in two situations:
* You have to write a lot of math equations

* Your language can be written in 7-bit ASCII and you have someone else to do the layouts for you (like in books etc)

Why LaTeX is NOT suited for 99,9% of users:



* It's difficult and there's a ton of useless crap you have to remember to do. Want to add an image? Know which package to use? No?, too bad. With all due respect, this isn't 1978 anymore!

* There's no concept of a page. Say you're given a task to write a 5 page report. How long is that in BBEdit or TextMate?

* It basically has no concept of non-ASCII characters. Even with extended ASCII you have to import extra packages and write "ä" as "\"a" (or something else equally nonsensical

* Document exchange - to share a document with "the rest of the world" you have to export. Sure, LaTeX will have exporters to a bazillion different formats, but it's extremely tedious.Why not just write it as RTF in the first place? RTF syntax looks pretty much like TeX anyways.

* Separation of layout from content? Have you seen an even slightly more elaborate TeX document? There's style declarations all over the place! The only difference is the syntax is so insane you can't tell structure and style apart!

* What's all this "LaTeX output looks so beautiful - nonsense?" It's ASCII! It looks consistent! And that's because you can't experiment too much simply because it's just too damn difficult (to write AND preview) And let's be honest, if you keep changing fonts and spacings all over your document with Word (or whatever), then you simply have no sense of style and you shouldn't blame the tool. And I can concentrate on the content using Pages or TextEdit just as much and even more because I don't have to worry about if this is going to compile or not.

* The MacTeX distribution is more than 800MB (uncompressed) long!!! That's almost as big as Pages 2!!!

I almost fell into this "LaTeX lunacy" myself though. I think what happens is that if you invest enough effort into anything (like hours trying to understand how to create a table!) and you read all these wonderful things others are saying about it, that thing naturally will become very dear to you. It's basic human nature. Luckily, I was able to escape it.

Some things are hard to understand because they are inherently complex and you spend time learning them. Text editing should not be one of those things!!! I agree that there's a need for a text-based format that would work on any platform but it should also be easy to author. Anyone got any suggestions? DocBook seems kind of bloated.
|
JSINF (Just So's I Never Forget) vol 2
To send a command to the background and ignore all output:

> command > /dev/null 2 > &1 &

|
client-error-not-possible
Talk about an ambiguous error message! The CUPS docs basically say this could mean anything. Well, this time the fix was actually pretty logical, after turning logging to debug level, /var/log/cups/error_log had this to say:

D [15/Nov/2006:17:19:55 +0200] [Job 8] Unknown device: cdj890

Mmkay, I guess I picked the wrong PPD. Indeed, setting it to "Foomatic/hpijs (recommended)" fixed the problem. Why the initial error couldn't include "Uknown device: cdj890" I will never understand...

Oh, and to be able to use your account on that nice CUPS web-interface, add yourself to the group lpadmin:
$ sudo usermod -G lpadmin filipp

|
Using MSN with iChat server
Finally finished that piece on getting the iChat server to work with MSN. It's available for download here. (450kB PDF)

|
Setting Up a Safety Harness
Changing IP-s is sometimes a risky business. Especially if your server's behind a firewall, in another country, across a great body of water. So here's a little backup strategy to use in case something does go bad:
> sudo at now + 1 hour
>networksetup -setmanual "Built-in Ethernet" youroldip youroldnetmask youroldrouter
> Ctrl -D


That way, if all goes to hell, it should go back to the previous state after an hour. If all goes well, don't forget to
> at -l
> at -r jobnumber
|
AppleScript Tidbits
AppleScript URL protocol support

Getting the home directory:
set theHomeDir to the POSIX path of home directory of (system info)


Getting and setting the clipboard:
set whatever to the clipboard
set the clipboard to "whatever"


Encoding URLs
Personally, I think you're best off just piping it through PHP:

do shell script "echo myurl | /usr/bin/php -r \"urlencode(fgets(STDIN));\""

Bu there's also some info on Apple's website.

How does ScriptEditor know which app is scriptable?
By looking for the NSAppleScriptEnabled key in an application bundle's Info.plist

|
Charting spam
This actually did make it to afp548.com, but I'm putting it up here also in the hopes that it might come in useful for someone else too:

One way to train the spam filter that comes with OS X Server (10.4) is by setting up two accounts - "junkmail" and "notjunkmail" and redirecting all spam and false positives to them accordingly. This is all documented on page 52 of the Mail Service manual. Since users' Mail clients are usually quite well trained, I also instruct them to create a rule to do just that for all the email their client considers spam, but hasn't been tagged as such by the server.

The manual also mentions that the redirected emails are analysed every night at 1 AM after which they should be discarded. To automate that, all we have to do is add the correct ipurge command to the crontab (I use /etc/crontab here but normally you would just edit cyrusimap's crontab).
MAILTO="postmaster@myserver.com"
PATH=$PATH:/usr/bin/cyrus/bin

# min hour mday month wday who command

30 01 * * * cyrusimap ipurge -f -d 1 user/junkmail user/notjunkmail


I think these simple steps can go a long way in battling spam in a small business environment. One thing that's missing though, is any kind of overview of how much junk-mail we're actually processing. Preferably with some-sort of graphical representation. The MAILTO variable at the beginning of the crontab means that all the output of the ipurge command will be sent to the given address, usually the "postmaster" alias. This means we have all the necessary data and can generate the statistics on a remote machine.

I've chosen (what I think is) the most straight-forward approach by using AWK to generate a (partial) HTML file that displays the date of the processing, number of messages numerically and graphically and finally the total amount of messages. Although crude, this technique is very easy to use and doesn't depend on any extra software, except for Mail.app, which is assumed to be the mail client.

To run the script, I have to provide it with the directory with the email files and a name for the generated HTML file:

awk -f spamchart.awk of=test.html ~/Library/Mail/Mailboxes/Cron\ Jobs/mac.ee.mbox/Messages/*.emlx


The script itself is very simple, with most of the typing spent on CSS for the "bars". Please notice that the total message (per day) count is assumed to be on line 32 in the email. This should be fine for default setups, but must be changed accordingly in case your server adds additional headers (or doesn't add the spam headers etc).
#! /usr/bin/awk
#Usage: awk -f spamchart.awk of=outfile.html maildir

/^Date: / {
theDate = sprintf ("%s %d %d", $4, $3, $5);
}

/^total\ messages / {
if (FNR == 32) {
total += $3;
printf ("<div style=\"background: silver; height: 15px; width: %dpx; font-size: x-small;\">%s %d</div>", $3, theDate, $3) > of;
}
}

END { printf ("<br />Total messages: %s", total) >> of; }


Here's a sample of the output. Having a graphical view of our spam, I can immediately see that the numbers have been climbing steadily since August of this year. I guess I better get back to work then…
|
When Stuff Just Works
Isn't it great when sometimes things just work? I think CUPS is one of these things. It took me a week with Solaris to finally understand that the reason my parallel printer wouldn't work is because even the parallel port didn't. Well, whatever.

Just installed Debian (from the 180 MB netinstall), selected "print server" as the basic package selection, pushed some buttons, watched some TV.
Configured networking (/etc/network/interfaces) and added the printer:
lpadmin -p DeskJet -v parallel:/dev/lp0 -P /usr/share/ppd/HP/HP-DeskJet_890C-cdj890.ppd.gz

Edited /etc/cups/cupsd.com as instructed on linuxprinting.org, "killall --HUP cupsd". And then, like magic, "lpstat -p" on the Macs had this to say:

printer DeskJet@192.168.0.104 is idle. enabled since Jan 01 00:00
Now, I have no idea why it says the queue's enabled since Jan 01 but quite frankly, I don't care. I've successfully set up a working network printer out of basically a heap of junk (a 166Mhz Pentium and an DeskJet 890c) and it's all thanks to Free Software.

Also enabled "File server" on the Debian box package selection and AFP works right out of the box! Nice.
|
Scalability
Scalable - you see the word in every other software description nowadays. But what the heck does it actually mean? Well, the Oxford dictionary has this to say:

scalable |ˈskāləbəl| |ˌskeɪləbəl| |ˌskeɪləb(ə)l|adjective1 able to be scaled or climbed.2 able to be changed in size or scale : scalable fonts.• (of a computing process) able to be used or produced in a range of capabilities : it is scalable across a range of systems.3 technical able to be measured or graded according to a scale.


It's becoming harder and harder to find a completely non-scalable tool. But let's use iMovie, for example. You start off at a certain level and you pretty much stay there no matter how much edit. You may become a better editor and use the software much faster, but the amount of things you can do with it - your creative options - remain pretty much constant.

QuickTime Player is a scalable tool. You start off with just a basic multimedia player, then let's say you want to rearrange a piece of video, or create a longer one out of many separate files. You can still use the same tool only you have to look it up how to do it. In other words, it grows with yout.

When I discovered LaTEX, I thought it was a the ultimate scalable typesetting system. You start off with a couple of basic commands and keywords (\documentclass, \begin{document}\section, etc) and learn more as your needs progress. There's very little overhead, as opposed to HTML. Then you want to add a table (the most abused data structure of the information age) - you whip out the manual, find the right commands and then spend the next two days wondering why the TEX file won't compile (something about ! Extra alignment tab has been changed to \cr.) What happened? The tool doesn't scale linearly.

So what I suggest is that, because all tools are becoming so versatile, we should stop talking about "scalability" in general and actually try and graph it. Because that's what it is, and I'm not talking about the learning curve. The scalability curve should tell us how much time it takes to fully realize the potential of any given tool.

And then there's of course the user element. It's amazing how things may start scaling in the hands of talented people. Is IRC scalable? I guess so (ie how many networks and servers you may have and what you can actually do with it), but then you see a presentation by Toni Alatalo, the TD of Elephants Dream and find out they used IRC to control their render farm.

More on this later…

|
Saw Monster House
A thoroughly enjoyable animation. And a truly creepy one too. It's fun to see someone else besides Pixar handle character animation so well.
The animation style itself was quite different from Pixar's though. Using much more mocap whereas Pixar's stuff is still a great deal hand-animated.
The mocap worked really well here because it didn't try to match human movement down to the slightest detail, choosing a more stopmotion-style instead. I've always thought of 3D CG as the next generation of stopmotion/puppeteering so I think it's a really good way to go.

I also liked the rendering style - the GI again reinforced the "stopmotion" feel.

|
Automate Out-of-Office Reply Toggling
This one actually made it to the site:

If there's one thing that computers are better at than humans, it's remembering things. Take for example the typical Out Of Office email reply - you go on vacation and set a rule in Mail.app to automatically respond of your absence to any email with a certain criteria. Then you come back and a day or two later remember to turn the notification back off again.

Well if You use iCal, your Mac most likely already knows when you're leaving and coming back so let's simply tie that information with Mail.app. Here's how:

Open Automator and from the Automator library add a "Run AppleScript" step.
Replace the code with the following, putting in the name of your Out of Office rule:
set myRule to "Name of my Out of Office rule"
tell application "Mail"
set enabled of rule myRule to not enabled of rule myRule
end tell

3) File > Save As Plug-In, give it a name (like "Toggle Out-Of-Office"), Plug-in for: iCal Alarm. Save.

iCal will open with a new event which you can simply delete. Then just create events on the start and end dates of your vacation (if you haven't already) and set our newly created script as the alarm (which you'll find in the alarm "Open file" dropdown menu).

The reply will now activate when yo leave and deactivate when you return. Just make sure your rule is Inactive before you go. :)
|
DigiExpo 2006
DigiExpo's the biggest digital entertainment show in Finland. I must say, as much as I generally try to avoid these sc "general purpose" fairs, this one was actually fun. Probably a lot of that excitement had to do with the console generation shift that's going on right now. Also, the "confusion of the HD transition" might have something to do with it.

Got to try the Wii controller which I must say felt quite odd and nonsensical. Probably one of those things that a "non-gamer" will just
pick up on the fly, but takes some time for an old gamer to adjust to (like going from Mac to Windows, or vice versa). It was more fun look at other people using it than actually using it myself. The good news are ofcourse that it can use the GameCube controller and the price.

IMG_9921

The graphics were a little troubling. From the titles they had there right now (the new Zelda, Metroid, some driving game and a bunch of tech demos) it really looks like GameCube 1.5. I know that you should never judge the potential of a device by it's first titles but if you look back, "next gen" has always look like it too (compare going from SNES to N64 or any other transition).

The PS3 is a perfect example of this. Even a Nintendo fanboy like myself, I must say I was more impressed by the PS3's visuals than the Wii controller. They had 4 demo units, 3 of them running at 720p and one 1080p and it did look quite stunning. The games were Lair, two obscure driving games and a shoot-em-up. You could really see that the PS3 camp's behind by the quality of the games though - for example the physics and handling on both of the driving games was practically non-existant.

All this HD glory will come at price, ofcourse. Not only will we have to dish out close to 700 EUR for the PS3, but keep in mind you also need an HD screen to take real advantage of it. And those start at around 1 000 EUR (?).

The XBox 360 was the most polished of them all (obviously) and they had a lot of them out there. Got to try NFS Carbon, which although undeniable impressive in HD, didn't feel that much greater than NFS MW running on the GameCube. In fact the sense of speed is even better IMHO on the GC, but that might've been because I had a crummy car. :)

Gears of War looked impressive. It's nice to see how console makers have finally really figured out it's all about the content. The games are the reason people buy a console (and maybe the BluRay player in case of the PS3) and so all of the platforms now have their exclusive hit-games that aren't ported to a competing platform. The result? I think more and more people will just end up buying more than one console.

IMG_9922

Oh, just for the record. I did buy something!

|
Flannel 1.0
This isn't much of a release announcement since it's not even available for download yet, but Flannel's demo page is finally up now.
This is all part of a not-so-elaborate scheme to get Flannel out there in the hands of the users. Not knowing the current state of true WYSIWYG publishers out there, I still think it could be very useful for people who just want their stuff online quickly and easily.

There's still alot of work to be done and the version that's running the demo's not the one I had in mind for the 1.0 release, but still...

|