Archive for November, 2008

The recurring scrambled screen in ARD

This has happened to me twice, and I’m not the only one.

While I think there are probably multiple causes, for me, this is the 100% cause and fix.

You have a machine which repeatedly presents in ARD (or your favourite VNC client) with the screen scrambled, in a pretty classic “it thinks this pictures a different size” angled lines look (below is just a simulation):

scrambledsim

You can restart ARD via SSH, and the problem goes away, only to return on your next reboot

Trawling the interweb reveals two schools of thought: you’ve either got something wrong with ARD, or loginwindow. We’re not at a flame war yet, but folks for whom a solution doesn’t work are getting anxious

Me, I think it’s both – sometimes deleting loginwindow.plist fixes it, sometimes it is more deep seated. So My fix is:

  • Do what you have to do to connect to the machine (restart ARD; delete loginwindow.plist and ARDAgent.plist and restart ARD; plug a screen into the thing)
  • Dump the two plists if you haven’t already
  • Change resolution on the monitor and back (if you’re ARD/VNC connected you may have to do the above frigmarole again). This writes new prefs files for anything interested in screen resolution.
  • Restart – not 100% necessary, but gurantees prefs files are written to disk for everything.

Bob’s your uncle.

(As I said, this is the second time I’ve had to fix this. And, naturally, now that I’ve written this, I found our solution to it the first time. Jakub was actually a little more succinct…)

Photoshop in OSX workgroups

Getting a “this file is locked” error in Photoshop, when no such lock exists?

As you may know, Apple tried to retire user Umasks in Leopard. As you may know, Mac workgroups are hell without uMasks – user A creates a folder full of documents for everyone to modify, but the group can’t write into the folder or modify any documents. It’s a hoot!

The solution was ACLs – basically NTFS-type permissions that Apple ported over for Tiger. They’re super, but the implementation was a little lacking – they were basically broken in Finder Get info for the whole of Tiger and therefore pretty much useless. In Leopard, you *still* can’t do any proper ACL admin in Finder, but they’re pretty working in Server Admin (and Xsan Admin), and as a result it all got manageable.

Except for Photoshop (and FCP, too, apparently, but as you’re meant to always work with a local copy of a project in FCP workgroups, not an issue I’ve personally run into). Photoshop just plain doesn’t notice ACL permissions: if a file’s POSIX permissions say you can’t write to it, photoshop gives you the following:
 

Photoshop error dialog

IOW, it thinks you’ve locked the file, OS 9-style. This is true of at least CS3 and CS4 (11.0). The only solutions were either some funky watch scripts that chmodded stuff, or get everyone to log into the server as the same person – fine for three employees or less, but stark raving mad for anything bigger.

Solution:

In 10.5.3, Apple relented and allowed a new method of defining per-user Umasks, this allows you to spec that new files created by User A are writeable by anyone in A’s primary group. At last, you can rest.

Painless PNG – avoiding, er, pain

Something else not currently easy to find on the interweb is painless PNG – a rails plugin that transparently handles whatever it is you have to do to get IE 5.5/6 to display PNGs with alpha correctly (documentation and broken download link here). It’s the very definition of a suave OO plugin that makes you agile as heck by making all your code work with IE6 without any modification – it subclasses image_tag and alters the html if it detects you’re on an incompetent dinosaur monopolist browser.

Sadly, the original writer’s SVN has been down ever since I found out about the plugin, and Google’s top 6 hits are still to that site or sites that refer to it.

Well, some nice guy called Alexy (who obviously likes a bit of the ole fantasy role playing), has kindly made the whole thing available via good old fashioned http (including a couple of fixes, apparently). It’s the only version I’ve ever used, and so far everything looks suitably transparent on IE 6.

(I did make one slight change – got it to use double quotes not single – to make it comply with some of my higher up hackings. But you wont have to)

Microsoft RIS and Apple Netboot – do they play together?

Couldn’t see this anywhere else on the interweb (and believe me I looked!) so I thought I’d just let it be known that, yes, it seems that these two very similar protocols can exist on the same subnet without affecting each other – Apple’s NetBoot uses two ‘vendor” DHCP options (41 and 60), while RIS/PXE uses 66 and 67, so clients only connect to servers that talk their language. On a very small sample size here in the pdaddy lab, a Mac NetBooted and a PC was able to stagger into a vile DOS menu screen thingy (i.e. they both worked as expected) while both services were active at the same time. The macs were using the Windows/AD DHCP.