What's this?
It's a port to OS X El Capitan 10.11 and later of our beloved utility MenuMeters originally by Alex Harper, at http://ragingmenace.com.
The port started as a minimal modification to run on El Capitan, but it now incorporates many contributions by many people.
Originally it was a preference pane, but it is now made into an independent app, due to Apple's restriction on System Preferences.
Setting up
- Please download the app from this download link.
- Move the app to a different location, say /Applications , using the Finder.
- Launch it.
To update
- When a new version is available, it should auto-update itself.
- You can also explicitly check if the update is available, through the Dock menu.
To uninstall
Comment
I develop and test the latest version on Catalina 10.15, and believe that it runs fine on El Capitan 10.11 and later. But it might have problems if you use Mojave 10.14 or before. In that case, you might want to try an older version
following the instruction here.
Source code
It's available at
GitHub.
Contact
Please report any issue at
"issues" at GitHub. If you don't know how to use "issues" at GitHub, you can email me at yuji.tachikawa at ipmu dot jp.
Why is it made into an independent app, rather than a preference pane, on Catalina and later?
The preference pane runs within System Preferences. In the past, the binary of a preference pane was loaded witin it, so we could do whatever we want within it. Apple does not want this anymore, so System Preferences now loads non-Apple preference panes in a separate process, and shows it within System Preferences using some magic. We can not even attach a debugger to System Preferences in a normal manner. This caused a lot of unexpected and undebuggable problems.
To make it run as an independent app, all that was necessary was to provide a window in which the original preference pane is shown. More concretely, I replaced NSPreferencePane
by NSWindowController
, and that was basically it.
Sierra and later implements the security feature caleld App Translocation. This is to fight against a certain class of vulnerabilities (explained nicely by the security researcher who found them). Namely, a newly-downloaded app, when launched, is copied into a read-only volume and run from it. Although it's done transparently from the user and mostly harmless, the app is put on a read-only volume anyway, so the app cannot auto-update itself.
The OS uses the com.apple.quarantine
extended attributes to see if an app is newly downloaded, so you need to clear it. The easiest way is for a user to move the app by Finder from the originally downloaded place to some other folder. This is why MenuMeters ask you to move it.
It is not difficult to make MenuMeters remove the quarantine bit itself, but I do not think it is kosher.
Setting up (up to Mojave)
- Please download the preference pane from this download link.
- Double click the resulting preference pane.
- If you already have an older version of MenuMeters, the System Preference will ask you if you want to replace it. Please answer yes.
- The System Preference might complain that it cannot be loaded. In that case please quit the System Preference once, and relaunch it. It should work.
- You might also need to uncheck and then check the various meters to re-activate them, once the new version of the MenuMeters preference pane is open.
To update (up to Mojave)
- Please follow the installation procedure given above.
- Then, explicitly empty the trash to remove the old version.
- You might need to reboot the machine once, or to logout and login once.
To uninstall (up to Mojave)
- Please open the System Preferences.
- Right-click on the MenuMeters icon, and from the pop-up menu, choose to remove MenuMeters.
- Then, explicitly empty the trash to really remove the old version.
- You might need to reboot the machine once, or to logout and login once.
Why doesn't the original work on El Capitan and later?
As you very well know and is shown in the screenshot above, there can be various utilities put on the right hand side of the menu bar. There are in fact two types of such menu bar items, one known as NSMenuExtra
's and another known as NSStatusItem
's. The former are loaded and displayed by SystemUIServer
, a process provided by the system. The latter can be displayed by any app written by any developer. One good thing about the former is that you can rearrange them by ⌘-dragging the menu items. I have no idea why ⌘-dragging was not provided for the latter by the system. (On macOS Sierra 10.12, Apple finally implemented and enabled ⌘-dragging for all NSStatusItem
's, including this port of MenuMeters. But this happened later than the need to port MenuMeters to El Capitan 10.11.)
Anyway, due to this better behavior of NSMenuExtra
's, people often wanted to write their own. In fact until and including OS X 10.1, Apple allowed it. But since 10.2, Apple had a code that blocked SystemUIServer
to load non-system-provided NSMenuExtra
's. But until Yosemite, there was a known way to work around it, available as an open-source code as MenuCracker. MenuMeters used this to inject their own NSMenuExtra
's to SystemUIServer
; in fact MenuMeters' author is one of the main authors of MenuCracker.
Essentially, until Yosemite, SystemUIServer
had a fixed list of allowed NSMenuExtra
s. MenuCracker was an NSMenuExtra
that pretended to be one of those allowed ones, which, once loaded inside SystemUIServer
, removed these checks, so that more NSMenuExtra
s can be loaded without any problem. In El Capitan, Apple added a more stringent check of the allowed NSMenuExtra
's, and MenuCracker no longer works.
So, how did I port MenuMeters to El Capitan, then? Well, I just gave up having ⌘-dragging. Then all I had to do was to, basically speaking, replace the occurrences of "NSMenuExtra
" by "NSStatusItem
", since the two APIs are almost the same.