February 28, 2006
In my last posting, I left out a command, networksetup, because I was incorrectly thinking that it only worked on Mac OS X Server. Luckily, some folks were nice enough to point out my error, so this time I'll go over networksetup. This command allows you to set various network settings for any Mac running a current version of the Apple Remote Desktop client. Like systemsetup, networksetup won't let you set every possible network setting, but it should take care of an Ivory Percentage's worth.
networksetup lives in /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/, and although you don't need sudo to get information from it, you will need to be able to use sudo to set parameters. With networksetup you can:
- get the network service order
- get a list of all network services
- get a list of all hardware ports with corresponding device name and MAC address
- detect new network hardware
- get the MAC address of a hardware port or device
- get/set the computer name
- get information for a given network service
- set up a manual IPv4/IPv6 configuration for a given service
- set up a DHCP IP configuration
- set up a BOOTP IP configuration
- set up a manual IPv4 service that uses DHCP for router and other information
- disable IPv4 and/or IPv6 for a given network service
- set a given network service to automatically acquire IPv6 information
- get/set DNS servers for a given service
- get/set search domains for a given service
- set up a 6 to 4 service
- set up a 6 to 4 service to acquire settings automatically
- set up manual settings for a 6 to 4 service
- enable/disable ftp/http/https/streaming/gopher/socks proxies
- get/set ftp/http/https/streaming/gopher/socks proxy information
- get/set proxy bypass domains
- get/set passive FTP settings for a given service
- get/set current Airport network
- get/set Airport Power
- enable/disable a given network service
- create/destroy/rename/duplicate/order network services
- get/set AppleTalk on/off state for a given service
- get/set MTU values for a hardware port or device
- list valid MTU ranges for a hardware port or device
- get/set media settings for a hardware port or device
- list valid media settings for a hardware port or device
- create/destroy/list VLANs for a given device
- list the devices that support VLANs
- create/destroy/list hardware bonds
- add/remove devices to/from hardware bonds
- list the devices that support hardware bonding
- get the status of a given hardware bond
defaults write com.apple.Bluetooth "ControllerPowerState" 1to turn Bluetooth on, and
defaults write com.apple.Bluetooth "ControllerPowerState" 0to turn Bluetooth off. SIGHUP blued to actually change the power state, and Bob's your uncle.
So that's a quick look at networksetup. If you come up with an Apple Remote Desktop command I've missed, please let me know in the comments, and I'll see about getting that up as well.| Comments ()
February 24, 2006
Some command - line tips for Apple Remote Desktop and OS X
Since I see this question come up regularly on various lists, I thought I'd push this out into the great Google database.
While Apple Remote Desktop is a fantastic GUI management tool, what a lot of people don't know, (because it's somewhat poorly documented) is that Apple Remote Desktop provides you with a couple of spiffy command - line tools, one that is just for Apple Remote Desktop, and one that works even if you don't use Apple Remote Desktop, namely kickstart and systemsetup.
Both of these are part of the Apple Remote Desktop client, so if your systems have the current client, version 2.2, you have them at your disposal. kickstart lives at:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart and systemsetup lives at:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/systemsetup . Note that you may have three files: systemsetup, systemsetup-panther and systemsetup-tiger. systemsetup is actually a symlink to one of the other two, depending on the version of your OS as seen here:
ls -l /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/
drwxr-xr-x 3 root wheel 102 Feb 21 13:41 ARDForcedViewer.app
-rwxr-xr-x 1 root wheel 46560 Feb 16 11:57 ARDHelper
drwxr-xr-x 3 root wheel 102 Feb 21 13:41 Remote Desktop Message.app
-rwxr-xr-x 1 root wheel 232816 Feb 16 11:54 build_hd_index
lrwxr-xr-x 1 root wheel 18 Feb 24 08:54 networksetup -> networksetup-tiger
-rwxr-xr-x 1 root wheel 189192 Feb 16 12:05 networksetup-panther
-rwxr-xr-x 1 root wheel 191028 Feb 16 12:06 networksetup-tiger
-rwxr-xr-x 1 root wheel 179620 Feb 16 11:55 sysinfocachegen
lrwxr-xr-x 1 root wheel 17 Feb 24 08:54 systemsetup -> systemsetup-tiger
-rwxr-xr-x 1 root wheel 219692 Feb 16 12:05 systemsetup-panther
-rwxr-xr-x 1 root wheel 203688 Feb 16 12:06 systemsetup-tiger
If you have Jaguar clients, you may have another version for that too on those boxes.
kickstart is the primary command line interface with the Apple Remote Desktop client, so it isn't a CLI version of the Apple Remote Desktop administration application, but it can still give you some nice abilities. First, obviously, you have to have SSH running, otherwise, connecting to the remote system is going to be a bit hard. Secondly, you'll need to have an account that can use sudo on the remote system, otherwise doing anything with kickstart is effectively impossible. Unless you use sudo, you can't even get a help screen for kickstart, and unfortunately, there's no man page for kickstart, so you have to have sudo access.
You can do four basic operations with kickstart: Uninstall, Install, configure, and (re)start/stop the Apple Remote Desktop client processes.
The -uninstall option allows you to uninstall at three levels:
-uninstall -prefs removes the Apple Remote Desktop preferences.
-uninstall -settings removes the Apple Remote Desktop access privileges that you may have set in System Prefernces or via kickstart.
-uninstall -files yanks all Apple Remote Desktop - related files.
-install has one option, -install -package path <path to installer package>. You can also do this via the installer command at /usr/sbin/installer, and installer gives you more options.
Since the configure options are how you set up the Apple Remote Desktop client, there's a few of them. I'm not going to detail them all, you can easily read the kickstart help page for that. But, you can:
Create Apple Remote Desktop users via -configure -users
Set the Apple Remote Desktop client to run at startup via -configure -activate, or disable this via -configure -deactivate.
Set the priviledges for a user via -configure -users <shortusername> -privs -<privilege>
Grant/Deny a user Apple Remote Desktop access via -configure -access -on/-off -users <shortusername>
Set the computer info fields via -configure -computerinfo -set1/2/3/4 -1/2/3/4 <text>
Set various client options via -configure -clientopts -<options>
Stop Apple Remote Desktop via -stop
Restart Apple Remote Desktop components via -restart -agent/-console/-menu (Restart is a very handy way to get a wonky client to behave)
systemsetup is one that used to only work on Mac OS X Server, until someone realized that if Apple Remote Desktop could use it, there was a lot it could do without reinventing the wheel. systemsetup is really a command line way of setting a rather large chunk of what you can set in System Preferences. With systemsetup, you can:
- get/set the current date
- get/set the current time
- get/set the current time zone
- list the time zones supported by a client
- get/set the use of a network time server
- get/set the timeserver a client uses
- get/set the idle time until the computer/display/hard drive sleep (this gets all three values at once and sets all three to the same value)
- get/set the the idle time until the computer sleeps
- get/set the the idle time until the display sleeps
- get/set the until the hard disk sleeps
- get/set the wake on modem state
- get/set the wake on network access state
- get/set the restart on power failure state
- get/set the restart on freeze state
- get/set the allow power button to sleep computer state
- get/set the remote login state (ssh)
- get/set the remote Apple Events state
- get/set the computer name
- get/set the local subnet name
- get/set/list the startup disks for a client
- get/set the number of seconds a computer will wait to restart after a power failure
- get/set whether the enclosure lock on an Xserve enables/disables the keyboard
Hopefully, once this gets picked up by Google, it will help some folks out with dealing with Apple Remote Desktop from the command line, and reduce the number of n00b questions on this by a few.| Comments ()
February 16, 2006
Dealing with Microsoft Windows People is tiring
Okay, I know this will seem scary, and strange to the Windows people at Microsoft:
But to the rest of the world, Windows Mobile is NOT in fact, a completely different platform than Windows. Telling me that Groove is cross platform because it runs on XP and Windows Mobile 5/2003 makes you look foolish.
One day, the rest of Microsoft1 will understand that Windows* is a single platform.
But don't hold your breath until the entire senior management of Microsoft has quit or been fired.
1other than the Mac BU
Clueless Code of the year
For the first time ever, it's the "Clueless Code of the Year" awards, and it goes to...<drumroll please>
Epson America Inc., for outstanding performance in the category of
Why in the name of sanity did they do that? for their continuing efforts to write the worst installers ever seen on Mac OS X.
No, really. You think I'm kidding?
Follow the evil trail...
Today, I had to install drivers and associated software for an Epson Stylus Pro 4800 Professional Edition. (yes, yes, I know, they get a supporting award for the Department of Redundancies Department) It took five separate downloads to get all the files I might need, including ColorSync profiles and configuration tools.
Here's the chain of events:
- Download 5 binhexed self-expanding archives, aka .sea.hqx files. Yes, I know, I thought that too. But okay.
- De-binhex down to the .sea file. Note that this file when run, is created by Stuffit Installermaker. Huh, okay, so this will install it. Oh no. No, not even close
- The .sea then creates a .dmg file. That's right, a .dmg file. No, I cannot tell you why they deliver a disk image file in this manner, because while I may indeed be the cynical *($&%# people say I am, I am not in fact, insane. But we aren't done.
- mount the .dmg file, and see....an Installer Vise installer. So to get to the installer it's taken another installer, a disk image, and de-binhexing
- Have one of the installers insist on having every running application quit to install, AND do a restart...Shades of OS 9! I pictured this old dude in the bowels of Epson America saying "When we used OS 9, this is how we did it, and WE LIKED IT!!!"
So actually setting up the printer was easy, right?
Oh hell no. You can't do it manually. You have to use either AppleTalk, or Bonjour, or some autoconfig method, or you can't install the printer.
Is Epson trying to FORCE me to only use HP? Because it seems like it. I really don't think an installer should make me wonder if I'm insane for seeing what I'm seeing.
But maybe I'm wrong. Maybe there's a worse installer on the Mac. So let's have some fun. Post your submissions for "Worst Installer" in the comments for this or as a trackback. If I can get a few done by next Wednesday, I'll turn them into a column for Datamation, and we'll see if maybe that opens an eye or two.
February 9, 2006
Script Debugger 4!
Go now my minions, fly, fly like the evil monkeys you are and buy...er...wait, note to self, don't post while readingComments ()
February 6, 2006
In case you were wondering...
This is why I laugh hysterically at the
OMG You Choose to be TEH GAY crowd:
Ive been thinking more about Brokeback Mountain lately, Cant seem to get that movie out of my head. Not becuase it had hunky cowboys making love but becuase what it means, espicially to the gay community. It was based in the 1960's and homosexuality was worst than being a spawn of satan. Those who couldnt hide it were delt with, as shown in the movie in a few graphic scenes. The two main characters found the love of thier life but society kept them apart. Even with recent events, things have changed since then, mostly for the good. But there are stil times in which it effect me and those I care for. Im pround to be a homosexual but for certain reason I choose not to express it just as much. Do you know what its like afraid to hold the hand of the one you love, having a time limit on how long you can hug someone in public, kissing at all, or even being forced to silently mouth the words "I love you". And for some they dont even find love at all, because we are constantly in hiding. Slowly things will change, but as it is for everyone that is different, it will never fully.
Wow, who wouldn't want their lives to be like that, and with a 1d20 chance for a possibly fatal beatin' every so often too?
Gay people do indeed lead charmed and more perfect lives.
February 2, 2006
It's a busy day in the troll zone
Every once in a while, you read something that just boggles the mind. Because you're reading the words, but it's like the Chewbacca defense. It does not make sense. Oh sure, your eyes read the words, and you understand the language and you comprehend the meaning of each word. But if you try to put it together, you end up thinking:
I read an article today by Tom Yager, normally a rather sane individual that makes me think he yanked both pills out of Morpheus' hand and is now quite confused. Here, read it yourself:
I have no idea why anyone with a functional logic center would write such claptrap, but since he did, and Infoworld published it, let's just take a look at all the problems with it, and hoo boy, there's a ton.
The entire thrust of the article is Microsoft signing a five year agreement means they're going to put all their stuff in maintenance mode and never do another new product for the Mac again. I know Microsoft, this is what they mean when they do this. Tom, from the entire sane computing community to you:
Let's see, the last Microsoft-Apple Five Year Plan ran from 1997 to 2002.
In that time we went from Office 4.2 (Read: Word 6 Debacle) to:
Office 2001, which introduced the first and to date, only completely original product that the Mac BU has come out with, Entourage.
Office v.X, the Mac OS X - native version of Office
Outlook Express 4
Outlook Express 5
Internet Explorer 4 (I could be off on this one)
Internet Explorer 5, the best web browser MS has ever produced. (IE 7 may beat it, but it won't count until it's out of beta)
Remote Desktop Connection, free, and a kick-butt little application.
So let's look at the great section of Tom's Article:
I know Microsoft. When the company "commits to support the product for a minimum of five years" means that the product will no longer be supported five years after this announcement. Existing users can live with that; their software is stable. But eventually the code will go into maintenance mode, and with the Mac BU, products like Virtual PC, Internet Explorer and Remote Desktop Connector.
Wow, so three major versions of Office and assorted service pack, including a completely new product the Mac BU created, two major versions of Outlook Express, two major versions of Internet Explorer, and Remote Desktop Connection, and Tom calls this maintenance mode. He may know Microsoft, but he sure as hell doesn't know the Mac BU for beans. As far as maintenance mode, well, I'll paraphrase
The Princess Bride, and say that I do not think that phrase means what you think it does.
That's not maintenance mode, that's active development. That's very active development when you consider that the Mac BU is smaller than just the Outlook team, and they've always had an open head count.
Now, what's happened since 2002?
Office 2004, Service Release 2 for Office 2004, a major upgrade for Entourage's Exchange support, and Virtual PC 7. So outside of any agreement, you have another full version of Office, a major update to Office, and a full version of Virtual PC. If that's maintenance mode, then I want the Mac BU to put my car in that kind of maintenance mode. I'd have a Ferrari by June! Note, they didn't put IE 5 Mac in maintenance mode. They put a bullet in it. Maintenance mode and killing a product dead are in fact, quite different.
Roz Ho, has, publicly, stated that the next version of Office is under active development, and that it will be a universal binary. She's said this at two keynotes, and once to me in person during Macworld. (By the way, to all the folks who don't think too much about her based on her keynote appearances, and yes, she's just not good at those, don't confuse being not so good at a Stevenote with not being smart. She's real damned smart, real damned articulate, and she's on top of things more than y'all may think.) Keep in mind that were Microsoft to do this with no intention of doing Office 12 for the Mac, they'd be in deep doodoo. That's categorically and explicitly illegal for a publicly traded company to do. That's not nebulous like figuring out anti-trust stuff. That's black and white, as in the colors you wear in prison. Roz doesn't strike me as even close to stupid, and doing that would be real stupid.
Furthermore, I've seen enough of a very early build of Word to say, at the programmer's request, that yes, I've seen the next version of Word running, and it's using the MS Open XML formats. Note that this is post agreement. That's some pretty active maintenance mode.
The lead Word dev, Rick Schaut stated point blank that they're working on Office 12, and that it will use the MS Open XML formats. Here, read the post yourself on his blog. I've met Rick. Fun guy, we talked a lot of guitar. His credibility on Word is, at the very least, much higher than Yager's right now. Okay, that's not saying much, right now Eddie Haskell has more credibility on this than Yager.
Then there's this sentence:
It's Microsoft's right, but until someone finds a solution, Office is forced to run on Rosetta, an instruction translater that gives office users real pain.
Okay Tom, how much experience do you have working day in and day out with Office 2004 on an Intel - based Mac? What? Not much, if any at all? Then how the hell do you know enough to say this? You don't, do you? No. For that matter, every non-universal binary has to run in Rosetta, including all of Apple's Pro applications, and every Adobe Mac application. Hmm, maybe Tom should look into that.
Look, when Microsoft screws it, I'll happily call them on it. WiMP Mac was a great example. It was fecal matter, and I hope the PM that approved that pile of crap got a good ass-kicking over it.
But the crap Yager's saying? It's at best trollery and Dvorakism, and at worst, wankery in pursuit of hit counts from the MacMacs.
If he's going to start writing tripe of that nature, I recommend transferring from Infoworld to The Weekly World News. It's a better place for silliness like this.| Comments ()
Okay, Katrina was bad enough, but stop making Louisiana look bad
Okay, so read this bit of idiocy.
Let me get this straight. This moron listens to his iPod cranked to the max and now it's Apple's fault. John Kiel Patterson, Idiot, is suing Apple because:
Apple’s iPod is “inherently defective” in its design and can contribute to hearing loss.
not sufficiently adorned with adequate warnings.. Patterson's suit is claiming
that Apple’s iPod is “inherently defective” in its design and can contribute to hearing loss, however,
The suit doesn’t indicate whether Patterson has suffered any hearing loss from using his iPod, according to the Associated Press.
That's right, he doesn't even know if his hearing is damaged, and if so, if the iPod did it. But that's not going to stop John K. Patterson, the biggest jackass in Louisiana from suing someone. Check this out:
Patterson does not know if the device has damaged his hearing, said his attorney, Steve W. Berman, of Seattle. But that's beside the point of the lawsuit, which takes issue with the potential the iPod has to cause irreparable hearing loss, Berman said.
I SWEAR to GOD, if this idiot even gets taken seriously, I'm going to start suing companies based potential for damage from products. Cars can kill you, the exhaust can cause cancer, gasoline is TOTALLY toxic if you drink it. Guns? Oh dear god, give me a moronic precedent like this, and I'll be able to burn Benjamins with the money I'll get from the gun companies. The only difference will be, I'll admit I'm doing it because I'm a greedy, amoral bastard who wants to take other people's money. At least I'll be more honest than John K. Patterson, Idiot.
Let's be clear. He's saying that the ABILITY of the iPod to play loudly is the problem. No one forced him to crank it. No one held a gun at his head and made him listen to 115db for days at a time. Steve Jobs didn't threaten to sell his family for dogfood if he didn't max the volume on his iPod and leave it there. The iPod didn't break, and only play at that volume. There's no defect that causes the volume to only be that loud. John Kiel Patterson, Idiot, cranked that sucker clockwise until the bar hit the far right end, and that's now Apple's fault for letting him be a moron.
Even better, he's using a French law to bolster his case. Well, in France, it's illegal to make such devices that play at over 100db. That wasn't a voluntary decision by Apple, it's what you have to do to sell iPods in France. They don't do it anywhere else.
So this moron, this acephalic idiot, this entitlement queen has decided that since he's incapable of oh, TURNING IT DOWN, because I guess he's UNABLE TO WORK A SCROLL WHEEL, then it must be APPLE'S FAULT. Because heaven forbid that anyone tell John Kiel Patterson, Idiot, that maybe TURNING THE DAMNED THING DOWN MIGHT BE A GOOD GODDAMNED IDEA!!
If this guy gets anything but repeatedly kicked in the nuts by the judge, every resident of Louisiana, and every.single.employee at Apple, from Steve Jobs to the friggin' GROUNDSKEEPER, then the USA is doomed. There's only so much state-supported stupidity a country can have and still survive.
Best quote on the Carbon v. Cocoa stupidity
Only the developer has to care. For the user, it's as immaterial as what color ball gown I was wearing when I wrote the code.
Rich Siegel has such a perfect way with words sometimes.