Trashing a “Clever” OS X Trash Utility

Here’s an article featured on Daring Fireball which claims:

The Mac OS X command line is missing any way to move files to the trash…

Uh.

No it’s not, and your Ruby util is completely unnecessary.

Move file to the trash:
mv ~/Desktop/filename.ext ~/.Trash/

Move file from trash:
mv ~/.Trash/filename.ext ~/Desktop/

List items in the trash:
ls ~/.Trash/

Empty the trash:
cd ~/.Trash/
rm -rf ./*

Elementary CLI shit here, folks. Or… am I missing the point entirely?

Update: Respected Mac blogger says of the above commands: “This won’t do the magic the Finder does where you can trash multiple files with the exact same name, and they get unique names in the trash. This won’t list items from other volumes than your boot disk.” To which, I reply: “So the app exists to bring “magic” from the UI down to the CLI. Not that the facilities don’t already exist, they’re merely inconvenient? I suppose that’s enough to create the app for a niche group of users, but the description he uses to justify its development is a bit hyperbolic,” and note, “Each mounted volume’s trash is accessible at /Volumes/[mountpoint]/.Trashes/[userid].” cf. this previous MMH post.

Posted in Mac. 2 Comments »

Desktop Network Share Aliases on OS X 10.5 (Leopard)

We need aliases to network shares at work so people don’t have to Apple+K every time they want to access the file server. IMHO, Apple fucked up when they decided the new OS would exclude mounted shares from the Desktop in deference to the new “Shared” section in the sidebar of Finder windows. As an aside, I think the “Shared” section is a stupid idea akin to Windows’ hand-holding “Network Neighborhood” bullshit.

From the 3rd comment on this post.

  1. Open Finder preferences, General, check the “Connected servers” box, which is unchecked by default.
  2. Mount network share; it should appear on the Desktop.
  3. Right-click to create alias.
Posted in Mac. No Comments »

Apple Software Update Reboot Problem

1. Software Update runs…
2. You are forced to reboot or shutdown…
3. You select reboot…
4. After the chime, you get only a white screen; no Apple logo even appears.

Solution: Disconnect your iPod from the Mac.

This has happened to me twice, and I never remember to eject the damned thing before clicking “Reboot”.

Duh.

Rage Maker: Fuck Adobe

Framemaker is, arguably, the best application for producing voluminous documentation on the market. Anybody that argues that Microsoft Word is even remotely capable of handling documents more than 30 pages long is either an idiot, a masochist, or both.

The Company has been using Framemaker for all of our manuals for more than 10 years, all the way back to the good (?) ol’ NeXTSTEP days. We’ve paid for new licenses and upgrades as required throughout the years. Attempts were made (against my advice) to do one of our larger manuals in MS Word. That attempt failed miserably, and we paid a nice chunk of cash to a 3rd-party vendor to convert it back to Framemaker.

Unfortunately, our years-long romance with this powerful software may soon come to an end. In a blog post from Feb. 2007, Framemaker’s Product Manager states:

Adobe discontinued FrameMaker software for the Apple Macintosh operating system on April 21, 2004. The decision to discontinue FrameMaker on the Macintosh operating systems was based on the market conditions for FrameMaker.

This after having declared in a previous post that:

Let me assure you, as the Product Manager of FrameMaker, that FrameMaker is here to stay.

A number of events precipitated the demise of Framemaker on Mac machines, and without going into too much detail, they are:
1. The release of Mac OS X 10.0 in 2001
2. The existence of the “Classic” environment therein
3. Adobe’s porting of Photoshop and Illustrator in late 2003
4. Adobe’s “market conditions” preclude porting Framemaker to OS X
5. Apple’s announced intent to move to Intel processors in 2005
6. The extinction of the “Classic” environment therewith
7. Apple stops shipping PowerPC-based Macs in 2006

I will not attempt to pin the injustice of losing Framemaker-on-a-Mac on either company. But… Aseem Dokania’s hubris in response to Mac users’ comments is personally-infuriating, and belies his knowledge of a customer base that has been loyal to–and perhaps buttressed for lengths of time–the company for which he now works.

… I believe there are some good workarounds available now for using windows applications on Mac. It may be possible to use one of them for FrameMaker.

Fuck you, Aseem.

Update: Apparently Aseem is no longer the PM for FM. It’s now Mahesh Kumar Gupta. Bring it back to Mac, Mahesh! If not, you may be told to go fuck yourself. You have been warned.

How to Empty the Trash on a Single OS X Volume

This is a fairly basic how-to, if you’re already familiar with Linux and/or OS X.

There are many different ways to empty the “Trash” in OS X; there are keyboard shortcuts, menu options, right-clicking magic, etcetera.

All of these methods, however, will permanently delete trashed files on all the mounted volumes (disks). E.g., the standard “Empty Trash” will kill everything in Trash from your standard Mac’s hard drive (Macintosh HD), as well as things you’ve trashed off your iPod, and everything in Trash from that USB thumb drive… if you happen to have them connected to the machine.

But

What if you want to kill only the trashed files from the iPod to free up some disk space?

The only way I know how to do it is to launch the Terminal.app (inside Applications>Utilities) and manually delete the files directly from the command line. For example, let’s say your iPod is named “My iPod”. You’d navigate to:

/Volumes/My\ iPod/.Trashes/

… and tell it to delete the files therein.

I’ve purposefully excluded the actual commands that you’d issue in Terminal to do this… to save some poor n00b from accidentally nuking their shit and complaining to me that I fucked ‘em over.

Anyway, every mounted volume has its own “.Trashes” directory. Do what you need to do, and free up the disk space on that other device, and save the trashed files on your main HDD that you just might need tomorrow.

OS X Server, SMB, and Password Torment

There’s a new guy at work who insists that the use of “to whom” is archaic. His incorrect opinion, therefore, earns him the traditional MMH pseudonym of “The Unlettered Python Expert”, or TUPE for short.

So, TUPE comes into my office yesterday with a problem: He cannot connect to our shared file server (which runs Mac OS X Server 10.4.x) from his Linux box using SMB. He experienced the same problem a couple of weeks ago, but during my troubleshooting efforts the Server Admin utility stopped responding altogether. I had to reboot the whole thing anyway, and dismissed his inability to connect as some fux0r’d daemons and whatnot.

That wasn’t the case yesterday (and probably wasn’t the first time).

To make sure the SMB server was handling shit properly, I connected to it from my Mac using the traditional Apple+k keystroke, standard “smb://” server address, and my username & password. Success.

Next, I tried it from the Terminal application (command line) using smbclient, as he had tried from his box, again using my login credentials:

~ $ smbclient -U myname //1.1.1.1/SHARENAME
Password: (entered the right one)
Domain=[XSERVE] OS=[Unix] Server=[Samba 3.0.10]
smb: />

Success.

Aside: The above command will implicitly attempt to connect to the remote server (1.1.1.1) on port 445, which is the canonical SMB Domain Server port. If you wish to connect directly to port 139 (the “pure” SMB port), you must specify “-p 139″ somewhere in the command (as I’ve done below). Add “-d 3″ to the command to turn on debugging level 3, which will display IPs, ports, etc. if you want to see stuff like that.

Then, I tried it again from my box, but this time using TUPE’s username and password:

~ $ smbclient -U username -p 139 //1.1.1.1/SHARENAME
Password: (entered one)
session setup failed: NT_STATUS_LOGON_FAILURE

Failure? Agony!

This pointed to something wrong with his user account on the server. Naturally, I assumed that I’d supplied an incorrect password, and exhausted that possibility.

By this time, the Workgroup Manager app had been launched, and I was fucking around with his user account in an unholy manner. Going through it all, I noticed that my (working) user account was using a “Shadow” password, whereas his (b0rk’d) account was using a “Crypto” password.

Conclusion #1: The SMB server on OS X Server 10.4.x requires an account use shadow passwords.

Aha! Time to fix it. Go in, change his account to use shadow, re-enter his password a couple of times, and save it. Refresh the page…

“Crypto” Goddamnit!

Attempt the same procedure 4 to 23 more times. Utter “goddamnit!” 4 to 23 more times. The stupid GUI won’t let me change it!

Time to read up on some Apple Support docs, eh? I finally found one that says:

Only users whose accounts reside in the local directory domain can have a shadow password.

Huh? WTF is a “local directory domain”? As the “administrator”, am I supposed to know? Cuz fuck if I do! Further down:

Click the small globe icon above the list of users and choose from the pop-up menu to open the local directory domain where the user’s account resides.

“Small globe icon”? WTF? I can’t see any small globe…

smbshadow1.png

Yeah, so there it is. Note also that the line of text next to that elusive little prick of an icon reads, “Authenticated as xxxxxxxx to directory: /NetInfo/root”. Could this be the problem? Click the little bastard…

smbshadow2.png

Oh, shit… I can change that! I still don’t know WTF a “local directory domain” is, but that fuckin’ pulldown has a “Local” option! Select that.

Now the line of text reads, “Authenticated as xxxxxxxx to local directory: /NetInfo/DefaultLocalNode”.

Go back to his user account, change it to use shadow, do the password dance, and save it. Refresh the page…

“Shadow” w00t!

Conclusion #2: Make sure that you have “Local” selected in that crappy little pulldown menu if you experience problems doing shit to the user accounts on the server.

Try the connection again:

~ $ smbclient -U username -p 139 //1.1.1.1/SHARENAME
Password: (entered the right one)
smb: />

Success.

Astro-Nerd!

If you’re at all like me… you’ve had the following conversation with yourself:

Yeah, so there’s this bright thing in the southern sky tonight, and it’s not the moon.

It’s, like, right above the brightest star in the Scorpius constellation… which I recognize because it’s summer and I was born in early November.

I wonder what it could be. Is it a star, or, like, a fuckin’ supernova or something?

Well wonder no more! Go download and install Stellarium. I snagged this open-source virtual planetarium for the ol’ Mac about a year ago, and it rocks your balls.

Trust. I’m your friendly neighborhood astronomical-type nerdboy. Represent.

p.s. It’s Jupiter.

Since Last We Spoke: A Massive Missive

Sure, the title and sub aren’t all that original (and probably redundant). Either way, this is only my latest attempt at catching up after an unintended posting hiatus.

In roughly chronological order:

1. Anaheim Ducks won the Stanley Cup. Congratulations to them and all their fans. Apparently, I wasn’t the only one thinking that Ottawa would have at least tried to put up some semblance of a fight by way of competition in the Finals. And, yes, all of us were proven rubes. You should be ashamed of yourselves, Ottawa Senators… you got beat down worse than Chuck Liddell, and that’s saying a hell of a fuckin’ lot. You were all my collective heroes (you’re in there, too, Chuck), and you ended up on your backs. Despite my disappointment–and Erin’s trying to assuage said–I vetoed her channel change to watch the Ducks accept and enjoy the Cup. There is no more goosebump-inducing (read: thrilling) ceremony than that.

2. Given the obvious lack of interest in our townhouse, we lowered the asking price from $409,900 to $399,900. It may not elicit more interest, but at least it will put the place closer to the top of people’s real estate website search results.

3. After lowering the price, our realtor was verbally assaulted by some rude fuck in an orange Kia (Erin hawked him) who called her (the realtor, not Erin) from in front of the place. According to him, this is a blue-collar neighborhood, and we will never sell the townhouse for the price we’re asking. Had I been on the phone with that particular asshole, I would have told him to consult my next-door, blue-collar neighbor who paid $440k for his home less than 6 months ago. Aside from my neighbor’s being despondent at our asking price, he would have told DickHead that he’s been working, fixing up the place for almost as long as he’s owned it. It’s only KiaBoy’s fault that he can’t secure financing to land some shit he wants… and maybe his Dad’s fault for calling him a dumbfuck every day… or giving him the belt for spying on his mother in the shower… or making him touch some manwhore’s cock. Either way, it’s not the goddamned realtor’s fault. Lay off the smack, and put some change in the piggy bank, Fuck-O.

4. We had our second showing… and it wasn’t FuckoKiaAngryBoyWhoLovesTheCock.

5. We watched the final episode of “Sopranos”. Immediately after cut-to-black, I felt gyped… Journey-rockin’ notwithstanding. But after reading all the press surrounding the “please make it end like I want it to” and “immediate gratification” and “we hate our day-to-day lives, so please dear god allow us to enjoy some closure by way of a bloodbath” bullshit… I’m cool with the way it all ended. Plus, there was Journey!

6. Steve Jobs’ Apple WWDC keynote speech. BFD. For those who aren’t playing along at home, that stands for “big fucking deal”. Everyone’s bitching about the iPhone developer announcement. Basically, The Steve said: “Make a cool web app, and then hit it using iPhone’s Safari web browser… bickity-bam, iPhone application! No SDK! These aren’t the droids you’re looking for!” The Jedi mind trick doesn’t work here, Steve. You’re full of shit. It’s not an iPhone application if it’s not… hrm… native to the iPhone itself? Cockbag.

7. At work we had yet another PowerBook death, and a resurrection of the one-in-house-Windows-box drama-slash-hatred. Resolution? Undetermined.

8. Our third “open house” is coming up this weekend. Hopefully, a single person will show up to check out the place during the realtor-scheduled-viewing-window. That would beat the first two “open houses” by… infinity. You can’t divide by zero, folks.

9. We’re going to Virginia Beach for my sister-in-law’s wedding. That’s Erin’s sister… not the chick who married my brother. Jesus… are you even trying to follow me here? Also happening on Saturday: Sean & Michelle’s wedding in Toronto. Congratulations all around!

10. Chris Gratton back in Tampa?! WTFAYFKMHBANTCOTLF? (what the fuck are you fucking kidding me he’s back and not the cornerstone of this lightning franchise)? He is “the ideal third-line center” nowadays… and that is some sweet, sweet irony-slash-karma-slash-fuck-you-chris-gratton action right there.

Nice to talk to you; hope to do it again soon.

Upgrading to the Intel iMac: Pain in my Ass

Yesterday:
1. De-authorize iTunes account on G5 iMac.
2. Transfer activation of Adobe CS2 on G5.
3. Unbox and set up new Intel iMac.
4. Begin transfer of account, applications, etc. from G5 to Intel.
5. Entertain self for 2.5 hours while transfer process consistently lies about remaining time.
6. Authorize iTunes account on new Intel.
7. Launch Photoshop and transfer activation to new Intel.

Everything seemed to be on the up-and-up. Until…

Today:
1. Launch Illustrator to finalize artwork for tradeshow exhibition.
2. Intel says: “Cannot perform that operation.”
3. Mutter “fuck”.
4. Attempted launch of Illustrator fails for the second time.
5. Mutter “fuck” some more.
6. Follow instructions on how to uninstall all CS2 apps as provided by Adobe on the installation CD to exacting specification.
7. Attempt reinstall of all CS2 apps via Adobe’s on-disk installer.
8. Install fails silently with no errors. Try install again. Failure.
9. Exclaim “Goddamnit” while simultaneously half-assedly remembering something about CS2 and Quicktime version wonkiness.
10. Engage software update.
11. Become shocked that 338.9 MB of updates must be applied to the brand-new, ordered-last-week machine to get it up-to-date, even though 10.4.9 has been released for months.
12. Entertain self for 1 hour while software update relentlessly mocks the user.
13. Restart the Intel 14 times as prompted by the system; additional mockery by way of firmware update.
14. Run software update again to snag the latest Quicktime… 61.8 MB more; restart yet again.
15. Attempt installation of CS2 for the third time.
16. Entertain self for 35 minutes while CS2 allegedly installs.
17. Run Adobe software updater.
18. Entertain self for another hour while shit gets downloaded from Adobe and installed; enter Admin password 18 times.

19. Launch Illustrator to finalize artwork for tradeshow exhibition.

Filthy Lies from Apple

Got a new iMac at work. In the process of transferring the account, files, apps, etc. from the older G5 iMac which is destined for my co-worker’s desk sometime in the near future.

During the transfer process, “about 4 minutes remaining” really means, “about half an hour to go, but you’d really be pissed if we were truthful about how long this is going to take.”

Cupertino bastards.