Thursday, July 19, 2012

Replace the Sophos shield icon in the Mac OS X menubar

How to replace the new Sophos S icon with the old shield.

UPDATE: This works, but Sophos will re-download the newer S icons when it updates. Then when you next restart Sophos by, for example, restarting your Mac, you'll find that Sophos has reverted to those newer icons. I'm looking at ways to lock the preferred files or automate the switch, but until then this has to be seen as only half a solution. Nonetheless, I'll leave it here for reference.

UPDATE 2 (11 August 2012): Sophos seems now to be changing to the newer icons every time it updates, even when the files are locked.

The new version of Sophos Anti-Virus for Mac changes the old shield icon in the menubar for a new S icon. I prefer the old one. The new one looks too much like naff Superman icon to me. This is how to replace it with the old one.

I'm on OS X 10.7.4, so that's what this will work on. Your mileage may vary with other releases. You do this entirely at your own risk. These instructions are offered without any warranty.

Make a back up.

No, really - make a back up. Use Time Machine or whatever, but make a back up.

Now, open up a Finder window and go to:

Macintosh HD … Library … Sophos Anti-Virus

In there you'll find an item called SophosUIServer. (Remember where this item is: you might be coming back to it later.)

For now, right-click (or two-finger-click or ctrl-click) on SophosUIServer and then select Show Package Contents.

This gives you a folder called Contents. Go inside there to another folder called Resources. This is where the relevant files are.

The files I changed are two called application_disabled.tif and application.tif.

I'm happy enough with the other new icons so I left them, but the process for changing them is the same as it is for these two.

To remove the existing copies of those files you may need to Authenticate, i.e., Mac may ask you to enter your admin password. This is because the folder is protected. Remove the two files (delete or - preferably - back them up somewhere) and replace them with whatever icons you want to use. I made versions of the old Sophos icons and you can get those versions in the zip file at the link below.

Sophos Icons

Unzip that file then take the two icons out of it and put them into the Resources folder. For the application to find them they need to be called application_disabled.tif and application.tif, so don't rename them.

(EDIT: Sophos will try to overwrite the files when it updates. To stop this, lock the files. Select the file in Finder, hit cmd-I (or click File … Get Info). Then click the Locked box so that it is selected. To do this, you might first have to unlock the padlock at the bottom right of the info panel by clicking on it and entering your admin password when prompted. Don't forget to click the padlock again when you're done, to relock it before you close the info panel. Do this for both application_disabled.tif and application.tif. Save copies of those locked files somewhere so you don't have to repeat this every time.)

To get the icon to change you may need to restart your Mac. Alternatively, you can use Activity Monitor (found in Applications … Utilities) to quit the process called SophosUIServer. Select it in the list and then hit the red Quit Process button. You can then quit Activity Monitor. Restart SophosUIServer by double clicking on SophosUIServer in the Resources folder (it will be where I said you should remember it was).

(EDIT: If you have to do this every time you restart your Mac then it might be easier to use Automator to create two mini-applications that (i) quit and (ii) launch SophosUIServer. You can put them in the same folder as the stored locked copies of the icon files.)

When SophosUIServer restarts you should have the shield icon in your menubar.

No comments: