Saturday, February 6, 2021

How to run Chromium as a portable app

 Is there a way to install Chromium on a portable drive with all the relevant profile information?  I'm a little bit old school and prefer that way over synchronizing profile online (to a Google account for instance).  So I spent some time to figure out how to do that on OS X, as it's not quite straightforward.  Two key points to the solution.

  1. Use a specific location instead of the default for profile.  Chromium loads profile info from the home folder (~) by default, but that's not portable.  The only way I found to use a specific location is through the command parameter --user-data-dir.
    1. It's of course a pain to use command parameter from GUI, so I made an AppleScript
    2. Export the script as an Application, so I can just doubleclick to run it without going through Script Editor
  2. Updating Chromium is also a bit tricky.  Chromium doesn't have built-in update so I have to download new binary to my portable drive.  However if I simply replace it, the Application would start Chromium without the profile location for some reason - I'm guessing the compiled Application sticks to some particular setup.  So after updating a new binary, the Application needs to be re-exported.

That's it!  A fully functioning, convenient solution for anyone who's obsessed with running Chromium as an offline portable application on OS X.

No comments:

Post a Comment