Wednesday, November 14, 2007

Turn off Translucent Menu Bar in Leopard

Update: The 10.5.2 Update now lets you control the Translucent Menu Bar in the Desktop system preference pane so there's no need to hack your System file anymore.


This tip is only for experts who understand the risks of editing system config files. (Obviously, this is not approved by Apple.) By the way, make sure you preserve the permissions on this file.

Edit the following file:

/System/Library/LaunchDaemons/com.apple.WindowServer.plist

Add an entry like this:

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



Restart you Mac and you'll get a plain white menu bar. This hack forces the window server to act as if it were running on older hardware that didn't support fragment processing. I hope Apple gives us a configurable option (at least a dwrite) in the future so that people can rely on it. It's a shame that law-abiding citizens like myself can be driven to commit crimes against system integrity over minor look-and-feel issues but that's what happens when people get desperate.

42 comments:

Unknown said...

Interesting -- thanks.

I'm curious what steps you took to figure this out?

Krioni said...

I _think_ you could accomplish this by doing the following:
sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 1

(with NO line returns in that).
The defaults command can write to files directly when you leave off the ".plist" part of the filepath. I believe the rest of the syntax is correct, but I don't have Leopard, so I cannot test this. If you are going to, make a copy of that file and see what the permissions are first, so you could restore it by doing a command-S boot if you mess something up.

I agree with Steve, this shouldn't be so worrisome - it should be a simple preference.

DocC said...

Well, I got brave (or was that stupid?) and did it krioni's way.

It worked like a charm.

Steve said...

Kids, don't try this at home. It's an unsupported hack.

This info came from a friend of a friend with confidential sources. I suspect that there's a boffin in Cupertino who doesn't like the translucent menu bar.

Thanks to krioni for the dwrite version. It's still a bad thing to modify a System file to accomplish this. There should be an option to configure this on a per user basis without using sudo. Maybe if Apple sees a lot of people hacking their systems, they'll decide to provide an official way to do it.

Unknown said...

And if you set it to "0" instead of "1" you get an opaque gray menu bar.

Sam Tardif said...

Note that the defaults command outputs in binary format, which is hazardous to the readability of the plist file.

Unknown said...

You, sir, are a GOD AMONG MEN.

THANK YOU!

Unknown said...

you have to help me please..
after i changed the plist y didn't check the permission in the file and rebooted..
now my macbook is stuck at the gray screen with the apple in the center, i cant boot into leopard anymore.

Unknown said...

Try booting from the Leopard install DVD, launching Disk Utility and running repair permissions.

Steve said...

This is a tip for experts only. Always make a backup before fiddling with System files.

If something goes wrong, you might be able to fix by booting in single-user mode (hold down "cmd-s" while booting) and repairing the file by hand. Just copy a good version of the file (from another Mac) over the mangled one. Use sudo chmod to fix the permissions.

Another idea... it might be easier to boot into "target mode" (hold down the "T" key while booting). Then your problem Mac can be mounted as an external disk for another Mac via a firewire cable. Copy the good file from the live Mac onto the right place in the problem Mac.

Unknown said...

i dont have a leopard dvd so fixing permissions is not an option, i dont have another mac to take the file from, but when booting in single user mode, how can i fix it manually?? Can you tell me what to do step by step please :)

Unknown said...

Please steve, i didn't know what i was doing and i'm a bit scared right now... can you tell me what to do step by step when booting in single-user mode
thanks in advance

Unknown said...

Once in single user mode try:

cd /System/Library/LaunchDaemons/

sudo chmod 600 com.apple.WindowServer.plist

sudo chown root:wheel com.apple.WindowServer.plist

Unknown said...

Thanks nick
i'll post the results

Unknown said...

oh, yeah, and reboot after those commands with:

sudo /sbin/reboot

Unknown said...

after the last 2 lines what i get is "read-only file system", still not booting. If you want i can send you a picture of what i did from my iphone. I'll pay via paypal to someone that takes me out from this situation.
thanks guys

Unknown said...

DOH! forgot about that... before anything else, remount to root filesystem with write permission with:

/sbin/mount -uw /

Unknown said...

still getting "read-only file system" any ideas?

What i did was:
1. Boot with cmd+s
2. /sbin/mount -uw/
3. Cd /system/library/launchdaemons/
4. Sudo chmod 600 com.apple.blabla (read-only file system)
5. Sudo chown root:wheel com.apple.blabla (read-only file system)
6. Sudo /sbin/reboot

And i'm still stuck at the gray screen with the apple in the middle

Unknown said...

It should be:

/sbin/mount -uw /


There's a space between "-uw" and "/"

Unknown said...

it worked!!
i'm back on my mac :D :D
THANKS!!!!!!!! is there anything i can do for you??

PS: i also have the beautifull white bar from tiger :D

James-Jaie said...

I have a problem as well. I tried repairing permissions from the install DVD, but I still can't boot.

I also tried the single user instructions above and no luck.

Any ideas.

James-Jaie said...

Still stuck.

Can someone tell me how to mount a USB flash drive in Terminal while in Single User mode so I can copy the com.apple.WindowServer.plist file from a different computer.

Unknown said...

sorry dude, i have no idea

Unknown said...

Do it the defaults way mentioned by krioni. Better yet, break it up short so you know you're not getting any unexpected returns:

sudo defaults write \
/System/Library/LaunchDaemons/ \
com.apple.WindowServer \
'EnvironmentVariables' -dict \
'CI_NO_BACKGROUND_IMAGE' 1

Unknown said...

Oh yeah, and thank you, Thank You, THANK YOU!!! for posting this tip. You have no idea how much happier this makes me.

Unknown said...

Augh, I managed to screw up the line breaks in the command two up. It SHOULD read:

sudo defaults write \
/System/Library/LaunchDaemons/com.apple.WindowServer \
'EnvironmentVariables' -dict \
'CI_NO_BACKGROUND_IMAGE' 1

My apologies...

James-Jaie said...

I would suggest people pass on this one. Even if you think you are pretty knowledgeable (I did), this is a very dangerous hack.

Wait until someone puts it in a UI.

John Slaughter said...

Is there a command line way to remove it? If so I'll AppleScript the whole thing.

Dave A said...

I made the mistake of installing this hack and got stuck on the same gray-Apple logo-spinner screen. (I wonder if the hack does not work on 10.5.1, which I installed a couple of days ago when it became available.)

Luckily I did make a copy of the original and was able to CMD-S into single user, mount the file system in RW, and use my fading memory of Unix commands to restore the original file.

Obviously I agree with others that say this is way too radioactive. It could fail with the next Apple system update (I think it may have already, as I've suggested).

tenz said...

I got same problem that after modifying the com.apple.WindowServer.plist my Mac refused to boot. And finally I fixed it. Here is my steps:

1. Boot your Mac with command-S

2. cd /System/Library/LaunchDaemons

3. pico com.apple.WindowServer.plist

4. you will see an easy-to-use text editor, then delete all the modifications you have made

5. CTRL-X to leave and save

6. fsck -f

7. when fsck finishes file permission check, it should tell you to reboot, type /sbin/reboot

8. you should see the login screen. Done.

try it.

Unknown said...

@tenz

What if I don't know what changes were performed on the file?

Unknown said...

could somone point me to a default version of the file that I could download?

Edward Johnson said...

If you set CI_NO_BACKGROUND_IMAGE to 0, then it goes to something that's similar to the old Tiger dock. Use this:

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0

Also, after you've done this, change the permissions on com.apple.WindowServer.plist to 644. After you use defaults, it will set the permissions on the file to 400 which is probably what causes your system to not boot up.

sudo chmod 644 /System/Library/LaunchDaemons/com.apple.WindowServer.plist

I'm just waiting for someone to get back the rounded corners without having to have an application open. (My suggestion is to see if you can take the PNG files that are curved for the menu bar, in Tiger, and add them to Leopard. I'd try this but I sold my Tiger disc when Leopard was released.)

marc said...
This comment has been removed by the author.
marc said...

@edward johnson:

Actually, if it's the rounded screen corners you were looking for, have a look at:

http://www.manytricks.com/displaperture/


Many Tricks also tweaked Steve's original Menu Bar hack / method and made an app:

http://www.manytricks.com/menubartint/


http://www.manytricks.com/blog/?id=21


(see also the other blog entries on this subject)

Steve said...

10.5.2 makes this trick obsolete. Use the Desktop system preference pane to control the translucent menu bar.

nxtmeef said...

Does nobody know that in the desktop and wallpaper section of system prefs there is a checkbox called "Translucent menu bar" that fixes everything?
I guess everyone stopped looking.

Unknown said...

It was before 10.5.2 jackass

Unknown said...

Well I'm running 10.5.2 and I see nothing in the Desktop system preference pane that relates to the menu bar. Where is it?

m_cantar said...

It's near the bottom in the "Desktop" tab of the "Desktop & Screensaver" pane. I missed it the first time too.

Here's a screenshot of it and one of my menu bar too...
http://s259.photobucket.com/albums/hh292/m_cantar/

What I really like about it is that the effects were immediate, no need to restart (I absolutely hate restarting my machine).

Hope this helped.

m_cantar said...

Actaully that takes you to the album. Here's a direct link to the screenshot...

http://s259.photobucket.com/albums/hh292/m_cantar/?action=view¤t=Picture1.jpg

JzzNJ.02Xz said...

Look at all these people with fucked up systems. I'm going to pretend I wasn't one of them who didn't make a backup...

But, if you're looking for the default file, it looks like this:

http://paste.lisp.org/display/51516

I hope that helps someone out there who tried this and got screwed.