blog advertising is good for you


blog advertising is good for you
User login

Getting Rid of the Translucent Menu Bar

There are a plethora of hacks to change the translucent menu bar in 10.5. While I doubt the sanity of the UI designers at Apple with this release of the operating system, it is relatively easy to change this behavior without installing third party hacks.

I found this post on miner49r, which says you can edit the /System/Library/LaunchDaemons/com.apple.WindowServer.plist to include the following:

<key>EnvironmentVariables</key>
   <dict>
         <key>CI_NO_BACKGROUND_IMAGE>/key>
         <string>1</string>
   </dict>

But wait! This is defining an environment variable for the WindowServer process. Why don’t we just define the environment variable?

You can simply edit the /etc/profile to include the environment variable:

CI_NO_BACKGROUND_IMAGE=1  

This will turn off the translucency and restore the menu bar to its default 10.4, all-white-it-can’t-hide-from-you-anymore.

The first tip worked for me, however editing /etc/profile did not. I suspect the reason is that launchd is stared via exec from the kernel, and then it uses exec to start its children directly without using a shell.

I thought about trying to edit the Mac OS X environment variables plist (~/.MacOSX/environment.plist) but saw that WindowServer is owned by root, so that wouldn’t be read. I thought about doing the same to root, however that’s only loaded on login for that user, and root isn’t logging in. So, alas, all you can do is change the launchd plist file.

So, instead, I thought of a simpler way to make the change:

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer EnvironmentVariables -dict-add CI_NO_BACKGROUND_IMAGE 1
sudo plutil -convert xml1 /System/Library/LaunchDaemons/com.apple.WindowServer.plist

— Adam

Verify that the plist file still has the permissions 0600 0644 (read/write, owner only) and that the owner is root before you reboot. If things fail after reboot, run Repair Permissions from Disk Utility on the install disk or go in by hand in single user mode and fix it.

Average rating
(1 vote)
About unixgeek

Adam Knight's picture

Since older video cards don’t show the translucent menu bar (hat tip to Daring Fireball), this setting probably exists to test that feature.

Cool.

There has been some discussion of this trick over at macosxhints.com (they also attribute the same original source).

Apparently any number between 0 and 1 can be used, giving a range of tints.
You can also test out different values without rebooting by reloading the WindowServer launch daemon from >console mode.

For more details, see:
http://www.macosxhints.com/article.php?story=20071115135215262

Also, note that ‘defaults’ creates files with 600 permissions (except in /Library/Preferences) but the com.apple.WindowServer.plist file’s original permissions are actually 644.

There is now a check box under the “desktop and screensaver” section of system preferences that allows you to turn the menu bar solid….

I have tried the tips and it had worked for me just fine.

Post new comment
The content of this field is kept private and will not be shown publicly.
2 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.