Close the browser and edit /home/user/.config/chromium/Default/Preferences
. There will be a section in regards to window_placement
.
For a resolution of 1920x1080 for example:
...
"window_placement": {
"bottom": 1080,
"left": 0,
"maximized": true,
"right": 1920,
"top": 0,
"work_area_bottom": 1080,
"work_area_left": 0,
"work_area_right": 1920,
"work_area_top": 0
}
...
I could never find a way specify this at start-up and it can change if you open new browser windows.
User config directory
Chromium does use a ~/.config
directory (~/.config/chromium
- ~/.config/google-chrome
for Google Chrome), customisable using a command line flag:
~ man google-chrome | perl -00 -ne 'print if /\.config/'
--user-data-dir=DIR
Specifies the directory that user data (your "profile") is kept
in. Defaults to ~/.config/google-chrome . Separate instances
of Google Chrome must use separate user data directories;
repeated invocations of google-chrome will reuse an existing
process for a given user data directory.
So, the simplest way to create a new configuration is to run either of these with --user-dir=newconfig
, customize as needed, then copy over the newconfig
directory to /etc/skel/.config/chromium
and /etc/skel/.config/google-chrome
.
Administrative policies
The last, but perhaps the most flexible, way would be to use /etc/chromium-browser/policies
(or /etc/opt/chrome/policies
for Google Chrome). The Chromium Documentation for Administrators has pages for Windows, Mac and Linux.
Essentially, on Linux, you make use of JSON files in policies/managed
and policies/recommended
. The managed
directory is for settings that are enforced - the user can't change them.
I'll just adapt the example given for Linux:
$ cat /etc/chromium/policies/managed/test_policy.json
{
"HomepageLocation": "www.chromium.org",
"HomepageIsNewTabPage": false
}
Now, on Chromium, the homepage is locked to www.chromium.org
. Correspondingly, if the file had been in recommended
, the user can change their home page.
The current list of policies is available here. It lists policies, their descriptions and example values.
To install a theme or an extension, the ExtensionInstallForcelist
policy can be used. It can't be recommended
, only managed
:
$ cat /etc/chromium/policies/managed/test_policy.json
{
"ExtensionInstallForcelist": [
"gighmmpiobklfepjocnamgkkbiglidom;https://clients2.google.com/service/update2/crx",
"jeonacmfdmkgfmmdejlinolgjomhcbmh;https://clients2.google.com/service/update2/crx",
],
}
This will install the Adblock Extension and the GData Centers 1 Council Bluffs, Iowa theme.
/etc/chromium-browser/customizations
/etc/chromium-browser/customizations/00-example
seems to indicate it can only be used for detecting plugins and adding command line flags:
$ cat etc/chromium-browser/customizations/00-example
## Register plugins this way. The two parameters are yours to fill.
#discover_registration /path/to/plugin/plugin.info library-name
## A way to influence the running. This is read-write for you. Please
## Append only.
#CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --option=value"
## Read-only variables guaranteed to be set, with example values.
#APPNAME='chromium-browser'
#BUILD_DIST='Ubuntu 14.04'
#DESKTOP_SESSION='ubuntu'
#LIBDIR='/usr/lib/chromium-browser'
#UPSTREAM_VERSION='34.0.1847.131'
(That's from 48.0.2564.116-0ubuntu0.14.04.1.1111
, by the way, despite what the UPSTREAM_VERSION
might indicate. And for some reason, only the 32-bit package on Ubuntu 14.04 has it, not the 64-bit one.)
The list of command line flags for Chromium can be found at http://peter.sh/experiments/chromium-command-line-switches/, according to
the Chromium website.
discover_registration
doesn't seem to be an executable command - it might be a shell function, but I'm inclined to suspect these files are not parsed by our normal shells. In any case, I think this method is not sufficiently versatile, and it's difficult to override if all you want is for users to start off with some settings while letting them change those later. And the flags don't seem to provide a way of installing a theme or an extension.
GSettings
A quick scan of dconf-editor
on my system indicates Google Chrome doesn't use it. Neither, apparently (thanks @Serg), does Chromium.
Conclusion
All told, either of the first two methods can be used, and Google Chrome supports whatever Chromium does, but with different paths. Where Chromium has /etc/chromium-browser
and ~/.config/chromium
, Google Chrome has /etc/opt/chrome
and ~/.config/google-chrome
, respectively. The first method is OK for one-time initialization, anything more would require the second method.
Since not all settings can be configured using policies, you might have to use both of them.
Best Answer
Desktop Window Decorations can be managed by the window decoration engine itself. In this case I will suggest the usage of Emerald Window Decorator. You may need to also install Compiz Config Settings Manager in order to obtain a better results.
To install Emerald simply drop the next in a terminal:
Provide your user password and wait for Emerald to finish installing. After which you will need to run
emerald --replace
in order to allow Emerald to take control on the window decoration. The basic decoration (red in my case) may look ugly, but you can find fancy Emerald themes by simply running a search on the net using your favorite search engine, this page -in example- contains cool windows decorations based on Emerald.The Radiance_Suite by nale12 looks much like the effect you're after. But playing with the settings in the "Edit Themes" tab of the Emerald Themer you can create your own customized theme starting from an existing one.
In combination with a Chrome's Aero theme you may get the full effect you're looking for in Chrome, but Aero themes will require gtk2 so you may find a major problem to make Chrome's Aero themes transparent.
During the process to get exactly what you wish you may find an issue or two, but it will be funny and illustrative, believe me.
Good luck!