I'm not sure it's worked for me yet, but it's a good thing to note, I suppose...

Re: How do you enable VNC from the command line:

i.e. this does the trick:
-activate -configure -access -on -users '$users' -privs -all
-restart -agent -menu -clientopts -setvnclegacy -vnclegacy yes
-setvncpw -vncpw '$password'

The only question then is, what is $password? Through
experimentation I found that at least for 10.4, ARD's VNC 'vncpw'
argument is simply the password truncated to 8 characters and XORd
with a 16 character fixed key (1734516E8BA8C5E2FF1C39567390ADCA), in
hex. i.e.

$ perl -nwe 'BEGIN { @k = unpack 'C*', pack 'H*',
'1734516E8BA8C5E2FF1C39567390ADCA'}; chomp; s/^(.{8}).*/$1/; @p =
unpack 'C*', $_; foreach (@k) { printf '%02X', $_ ^ (shift @p || 0)
}; print '\n''