Wednesday, December 10, 2025

where to change the CEF helper executable's name on MacOS - two LLM answers

Two answers from ChatGPT (or is it Copilot?) and Gemini respectively.

Yes — on macOS the CEF helper does not need to be named “AppName Helper.app”.
You can rename it, but the name must be configured in the app bundle structure, the build system, and each helper’s Info.plist.
It is not set in cefhost.cpp.

Below is the definitive breakdown.


✅ Where the helper name comes from (macOS)

CEF on macOS requires three helper bundles:

MyApp.app
 └─ Contents
     └─ Frameworks
         ├─ MyApp Helper.app
         ├─ MyApp Helper (GPU).app
         └─ MyApp Helper (Renderer).app

The names of these helper apps must match the names embedded in Info.plist entries, including:

  • CFBundleName

  • CFBundleExecutable

  • CFBundleIdentifier

  • LSEnvironment (for specifying the subprocess type)


⚙️ Where to change the name

### 1. Xcode / CMake / GN build target name

If you use CMake (CEF standard):

set_target_properties(my_custom_helper PROPERTIES
    OUTPUT_NAME "MyCustom Helper"
)

This determines:

MyCustom Helper.app

2. Helper’s Info.plist

You must update the plist inside each helper bundle:

<key>CFBundleName</key>
<string>MyCustom Helper</string>

<key>CFBundleExecutable</key>
<string>MyCustom Helper</string>

<key>CFBundleIdentifier</key>
<string>com.mycompany.myapp.helper</string>

Each helper type also requires:

<key>LSEnvironment</key>
<dict>
    <key>CEF_PROCESS_TYPE</key>
    <string>renderer</string>
</dict>

(“renderer”, “gpu”, or “zygote” depending on helper.)


3. Main app’s Info.plist linking to helpers

The main app references the helpers in:

  • CEFSubprocessPath

  • or the ChromeHelper mechanism depending on version

A typical example:

<key>CEFSubprocessPath</key>
<string>Contents/Frameworks/MyCustom Helper.app/Contents/MacOS/MyCustom Helper</string>

🚫 NOT set in cefhost.cpp

cefhost.cpp (and other platform code in CEF) does not control helper names.
CEF simply launches whatever bundle/executable path you specify.


✔️ Summary

SettingWhere changed
Helper app nameBuild system (Xcode/CMake/GN)
Executable nameInfo.plist (CFBundleExecutable)
Bundle nameInfo.plist (CFBundleName)
Bundle identifierInfo.plist (CFBundleIdentifier)
CEF subprocess pathMain app’s Info.plist or CEF API call

If you want, I can also provide:

  • A ready-to-use CMake configuration for custom helper names

  • A complete set of 3 macOS helper Info.plists

  • A template for an entire renamed CEF macOS bundle layout


Gemini says,

Yes, you can rename the CEF helper application to something other than AppName Helper.app. This is common for branding or obscuring the use of CEF.

To do this, you must coordinate changes in two places: the filesystem (the actual app bundle) and the source code (CefSettings).

Step 1: Rename the Helper Bundle (File System)

You need to change the name of the helper application bundle itself and its internal executable.

  1. Rename the Bundle: Change YourApp Helper.app to CustomName.app inside your main application's Contents/Frameworks/ directory.

  2. Rename the Executable: Inside CustomName.app/Contents/MacOS/, rename the executable binary from YourApp Helper to CustomName.

  3. Update Info.plist: Open CustomName.app/Contents/Info.plist and update these keys to match your new name:

    • CFBundleName: CustomName

    • CFBundleExecutable: CustomName

    • CFBundleIdentifier: (Optional but recommended) com.yourcompany.CustomName

Step 2: Configure CEF (Source Code)

You must explicitly tell CEF where to find this newly renamed sub-process, or it will continue looking for the default AppName Helper name.

You do this by setting the browser_subprocess_path in the CefSettings structure. This should be done in your application's initialization code (likely where you call CefInitialize). If you are using a file named cefhost.cpp, that is likely where this code resides.

Code Example:

C++
// In your main process initialization (e.g., cefhost.cpp or main_mac.mm)
CefSettings settings;

// ... other settings ...

// Get the main bundle path
CefString main_bundle_path = CefGetMainBundlePath();

// Construct the full path to your renamed helper
// Path: Contents/Frameworks/CustomName.app/Contents/MacOS/CustomName
std::string helper_path = main_bundle_path.ToString() + 
                          "/Contents/Frameworks/CustomName.app/Contents/MacOS/CustomName";

// Convert to CefString and assign to settings
CefString(&settings.browser_subprocess_path) = helper_path;

// Initialize CEF
CefInitialize(main_args, settings, app, sandbox_info);

Important Note for Modern macOS (Catalina+)

Since macOS 10.15 (Catalina), strictly secure applications are required to use multiple helper apps with specific entitlements (e.g., one for GPU, one for Rendering, one for Plugins).

If you are shipping a modern, notarized macOS app, you generally need 4 distinct helper bundles:

  1. CustomName.app

  2. CustomName (GPU).app

  3. CustomName (Renderer).app

  4. CustomName (Plugin).app

If you rename the main helper, you should ensure you rename/configure these variants as well if your build system generates them. However, setting browser_subprocess_path usually targets the "main" helper executable, which acts as the entry point for all sub-processes unless configured otherwise.

Summary Checklist

  • [ ] Rename YourApp Helper.app -> CustomName.app

  • [ ] Rename binary inside Contents/MacOS/

  • [ ] Update Info.plist (BundleName, Executable)

  • [ ] Set settings.browser_subprocess_path in your C/C++ code.

Change Application Display Name in Toolbar on macOS

This video demonstrates how to modify the Info.plist and CFBundleName for a macOS application, which is a necessary step when renaming your CEF helper app bundle.


No comments:

Post a Comment