Remove the 'Get Mac OS X Software' menu item

Oct 31, '01 02:03:29PM

Contributed by: Anonymous

A Co-worker noticed that the idea of having a link to buy MacOS X software right there in the Apple menu was very "Microsoftish", so he tracked down where it was located and I figured out how to get rid of the menu item altogether. (I know there are other links out there to customize (in a way) the Apple menu. This simply tells how to get rid of that menu item in X 10.1.)

Warning: If you're not comfy in the Terminal and/or vi, this might not be for you. An unsuccessful attempt at this has the nasty side-effect of not allowing you to run the Finder... (yes, you'd have to ssh/telnet into the machine to fix it if you mess this up somehow.)

[Editor's caution: I have not tried this myself, and it's quite possible that a mix-up in the editing will render your Finder unusable. Please proceed with caution if you're going to attempt this modification! Read the rest of the article for the how-to.]

The XML file to be edited is located in:

/System/Library/Frameworks/Carbon.framework/Versions/A/
Frameworks/HIToolbox.framework/Versions/A/Resources/
English.lproj/StandardMenus.nib/
[NOTE: Full path is one line; shown split here to reduce width. 'cd' into this directory in the Terminal.

There is a file named objects.xib in the folder (it's the only file). First (as root) MAKE A BACKUP copy of that file somewhere else where you will remember (root, home, wherever, just not the same directory). I would also make sure you have remote access turned on to telnet in and move the original file back, or the have the ability to swap files out either in OS9 or remotely.

You then need to edit the objects.xib file. (I did this in vi, but any text editor should work. However, some of the characters came up differently in BBEdit than they did in vi, so your milage may vary...). Here are the changes (if you start at the top, the line numbers change):

1) Delete (line 205) '<reference idRef="221"/>'

2) Delete the following four lines (lines 188 through 191):
<object class="IBCarbonMenuItem" id="216">
<string name="title">Get Mac OS X Software\xe2\x80\xa6</string>
<ostype name="command">soft</ostype>
</object>
3) Delete the following four lines (lines 16 through 19):
<object class="IBCarbonMenuItem" id="221">
<string name="title">Get Mac OS X Software\xe2\x80\xa6</string>
<ostype name="command">soft</ostype>
</object>
4) In line 11 (<array count="16" name="items">), replace the '16' with '15' - you're removing something from an array.

5) In line 7 (<array count="69" name="allObjects">), change '69' to '68'.

Log out and in again and it should work fine. If you have problems, you may need to replace the edited file with the original.

Comments (15)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011031140329668