Categories: Top ::
About
Codejunkie
Monologues of a mobile retro coder.
skeezix[at]codejedi.com
www.codejedi.com
Subscribe
Subscribe to a syndicated RSS feed. I've
also made a Livejournal version and Ben whipped up an auto-RSS Livejournal
Blogs
DadHacker; epic rants.
ASCII@textfiles
Michael Mace
JoelOnSoftware
Bruce Schneier
Wil Wheaton
I, Cringely
WritingOnYourPalm
Dan Gillmor
GrandTextAuto
Freedom to Tinker
Mark's SysInternals Blog
A List Apart
Tam's Palm
Bytecellar retro goodness
Lost Garden
Bill Ing
Ben Combee
PocketGoddess
PocketFactory
Random Links
PalmInfoCenter
Zodiac Gamer
GP32x
Little Green Desktop
Atari Age
Penny Arcade
Hack-a-Day
Retro Remakes
SHMUPS!
Podcasts
1SRC
RetroGamingRadio
Recent Entries
| November 2008 | ||||||
|---|---|---|---|---|---|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||
Archives
A 'headless' machine is one that is used remotely or as a server; a typical user interacts with his machine through using its mouse, keyboard and monitor -- it has a head (monitor). A web-server, for example, that user is interacting with would often go headless - no monitor - since even its local staff would usually administrate it remotely. Unix operating systems are good at going headless since it is so common with them. Windows doesn't like it so much, but it can be done by yanking out the video card after setting it up :) I've not set up many Macs, let alone headless ones, so it took me a few minutes to find the needed tidbits and I thought I'd share whichever of those came to mind.
When you're a developer supporting multiple platforms, this is the way to go -- why have 3 or 4 keyboards, monitors and mice around in a big heat-emitting mess, when you can stack the machines in a cool basement and use them remotely (if slowly for GUI applications.) I really only keep a machine or two on at a time, and they're all pretty inexpensive these days since its nice to lag behind everyone else to both keep you writing efficient code, and to support a wider population of users who might also be lagging behind.
By default, the machine had 'sleep' enabled; thats the first thing you disable for a server, since you don't want it gakking off as soon as you turn it on and walk away. (For that matter, I set up a ping from another machine to the things network port, to ensure the OS doesn't put just that interface to sleep, which it seemed to want to do.) You do wish to keep 'sleep' enabled for the hard disk and display since you don't need those so much and they can awaken on demand. If you don't let the disks sleep, it'll run warm and the little laptop drives might hate you.
I'm running on wireless so only need a single cable -- the power brick. No keyboard, mouse, monitor or network cabling is required (woowoo), so I discovered you have to head into the Bluetooth settings to disable it trying to wait for a BT keyboard and mouse when the machine comes up. (While it awaits for a wireless keyboard and mouse, it disables _everything_, despite the fact you could be running on remote desktop or VNC. Just disable the BT checkbox of note, and you're good to go.)
Enable remote login using SSH, and head to the firewall settings to enable port blocking and then only allow SSH (and VNC) into the box .. or even make VNC a localhost only setup and require SSH tunnelling to access it.
The GUI showed me lots of updates so I ran them; then it found more while I was without mouse so I eventually figured out you can run the Software Updater on the shell (which is itself /Applications/Utilities/Terminal btw; I've used OSX for years on and off, but if you're new, you'll have to figure out the directory nomenclature to find all your favourite Unix-like tools) by hitting up "softwareupdate". Remember, you have to 'sudo' everything or set up a 'root' user. If you need to install a package you've downloaded or found on DVD, then you can't use the softwareupdate for it, but invoke the installer for that type of file - I had to fire up the dev tools from the DVD thusly: "installer -pkg XcodeTools.mpkg -target /Volumes/Macintosh\ HD/"
"hdiutil" is useful for lots of things; I use it to test disk images I've made. "otool" and "lipo" and such are useful for mucking with shared libs and such, but I'll get into that later.. all my handy scripts for building disk images, linking the applications etc are on a machine thats off right now.. doh :) Anyway "hdiutil attach foo.dmg" is the way to go, and "detach" being the opposite.
I installed DarwinPorts (thanks Tux!) and they had a VNC port already; I just had to "sudo port install osxvnc" and all was well in the world. VNC is what I use for remote GUI access. I don't really want to hook up a monitor and mouse in order to launch VNC, but this port is of the command line versions and a GUI for those who want it; I just launch it from the command line with "/Application/DarwinPorts/OSXvnc/OSXvnc -rfbauth myfile.foo", where the rfbauth option instructs it where to find a VNC-password-file. Be sure to make a password file with the included command line tool.
So aftering getting all freshly updated, installing the dev tools package, installing DarwinPorts, installing VNC, and configuring it all just-so I can now boot the machine up with no input or output devices, and let it attach to my network with 802.11 wifi. Then I just ssh over, turn up VNC if I like, and do my work. I do everything from the commandline, and then run the application and pop in with VNC to operate it, if its a GUI application.
All thats left is a smart backup tool that knows how to make differential backups to CD (so one disk can last a few weeks), and email me when the CD is getting full or running out of sessions or the like. Cool stuff. Yay for pretty GUIs on top of solid classic Unix.
[ Category: / technology / osx ] [link] [Comments]>