Document Actions

Log

Up one level

Chronicling using, configuring, and developing for Apple stuff (predominately OSX)

hoss @ 20080422:09:35 (Tue)

In what is sure to be a chronic occurrence, I was frustrated by OSX pretending to act like Linux without actually doing the same thing.  Specifically this time I wanted to change the hostname.  The following sort of does it but not really:

  • sudo hostname <newhostname>

According to a post at the bottom of this blog, the following are also necessary:

  • sudo scutil --set LocalHostName
  • sudo scutil --set ComputerName
  • sudo scutil --set HostName

In addition, it's necessary to go into [System Preferences] -> [Sharing] and change the 'Computer Name'.

And all of that won't get around the name provided by DHCP, depending on the DHCP server's config.

(note that this applies to Leopard 10.5.2)

 

hoss @ 20080422:11:25 (Tue)

If you need to do any bulk file transfers from OSX (using SCP or SFTP), Fugu works great.

hoss @ 20080422:12:10 (Tue)

Want to have the window focus follow your mouse (i.e. without clicking)?  Tough.  You can't.  At least, not for native quartz apps.  You can get the OSX X11 server to do it for X11 apps via the following command:

defaults write org.x.X11 wm_ffm true

But as far as I can tell from googling, it's impossible to get quartz to behave this way.  Which SUCKS!

Here's how you can get OSX (Leorpard) to flush its DNS cache:

sudo dscacheutil -flushcache

If prior to doing so you wanted to see what it actually had cached, use the following:

sudo dscacheutil -cachedump -entries

Not terribly useful, but when you're setting up a LAN and there's some IP:name flux and you need to force OSX to see the new mapping, this is the way to do it.

hoss @ 20081121:18:33 (Fri)
OSX Graffiti

I was feeling churlish and finally annoyed enough with the default login background for OSX that I figured I'd google out the recipe for changing it.  Turns out it was trivially simple.  And in addition I swapped in an 'improvement' on the apple logo itself  [snicker snicker].

hoss @ 20081125:12:15 (Tue)

An OS and/or window manager shouldn't be leaving little turds all over my filesystem.  That's exactly what OSX does.  It poops everywhere it goes.  Little OSX dingleberries named '.DS_Store'.  It's annoying enough that it does it locally, where it at least has the good sense to not show them in the GUI file browser (though they're in full view from the shell).  But the fact that it flings its poo all over any and every network mounted directory is just inexcusable.

Thankfully, its easy enough to get it to behave a bit more civilized 'in public', by disabling the creation of the .DS_Store files on network mounted directories.  The necessary bit of OSX voodoo is the following command:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

I think a reboot is necessary for it to take effect.  And you'll probably want to take a broom to any locations that have been sullied, via something like:

find . -mount -name '.DS_Store' | xargs -L1 -I {} rm -v {}

Bad OSX -- No biscuit!!

While in a previous post I claimed that Finder had the 'good sense' to not show .DS_Store files, the fact of the matter is that in general I don't want it hiding things from me.  If something's on disk, I want to see it.  Apparently I'm in the universal minority here, since all three main platforms (*nix, OSX, and Windows) have as their default behavior the cloaking/supressing of various filesystem content.  On linux, 'ls' requires the '-a' argument if you want to see everything.  Windows forces you to edit folder visibility properties.  And OSX hides all '.*' content unless you apply the following bit of voodoo:

defaults write com.apple.finder AppleShowAllFiles TRUE

A quick restart will reveal all, including things like '.localized' on your desktop.