Posted by CANbike on Sun, 3 Mar 2013

[Precise Puppy 5.4.3] Chromium Browser: Run as Root and Start Maximized

Installing Chromium Browser (the open source web browser from which Chrome Browser is derived) in Puppy Precise 5.4.3 should be simple but there were a few minor issues.

  • There were multiple versions of Chromium Browser to install
  • By default, chromium-browser cannot run as root
  • chromium-browser does not start maximized nor does it remember the maximized setting

Install Chromium Browser

  1. Click on “Menu->Setup->Puppy Package Manager”
  2. Find “Chromium” in [ubuntu-precise-universe]
  3. Multiple version of chromium-browser will be listed
  4. Click on the item with description “[ubuntu-precise-universe] Chromium browser” for the latest version with security updates.
  5. Install it plus any additional dependencies

A menu item should automatically be created in the “Internet” category. The browser can also be launched from the command line by the command chromium-browser.

Chromium Can Not be Run as Root

When launched, Chromium will display the error message:

Chromium can not be run as root.
Please start Chromium as a normal user. To run as root, you must specify an alternate --user-data-dir for storage of profile information.

That is simple enough to add the flag from the command line, but it can be inconvenient. The next step is to automatically include the flag when launching chromium-browser.

Edit the file /etc/chromium-browser/default using a text editor like geany.

Change the line CHROMIUM_FLAGS="" to CHROMIUM_FLAGS="--user-data-dir" and save the file. Now chromium-browser will launch as root.

Start Chromium Browser Maximized

When launching chromium-browser it does not start maximized. Moreover, even when clicking on the maximized button, it will not remember the last window position. It is a minor inconvenience. However, there is an undocumented flag -start-maximized which will do just that.

To automate the process, edit the file /etc/chromium-browser/default and add the additional flag. The line should now look like

CHROMIUM_FLAGS="--user-data-dir -start-maximized"

Now chromium-browser will launch as root and start maximized.

Related Item(s):