Setting Chromium as the Default Web Browser

The Internet pane in System Preferences populates its browser list from [NSWorkspace infoForScheme:@"http"] (see Modules/Internet/InternetModule.m line 41 in gershwin-systempreferences). For Chromium installed in ~/Applications to appear there, two things must be true.

1. Chromium's Info.plist declares the http/https URL schemes

GNUstep discovers URL-scheme handlers via the application's Info.plist. Either of the following forms works:

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLName</key>
    <string>Web site URL</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>http</string>
      <string>https</string>
    </array>
  </dict>
</array>

or the GNUstep-native NSTypes form with an NSRole entry and a scheme list including http and https.

2. The app is registered in the GNUstep services database

After placing Chromium.app under ~/Applications, run make_services as jmaloney so the bundle gets indexed:

$ make_services

Until this is done, infoForScheme: will not return Chromium and it will not appear in the popup.

3. Choose it in System Preferences → Internet

Open System Preferences, select the Internet pane, and pick Chromium from the default-browser popup. The pane calls setBestApp:inRole:forScheme: for both http and https (InternetModule.m lines 67–69), persisting the choice.