bash not Launch Google Chrome from the command line with specific window coordinates

chrome--window-position not working (4) says --window-position=x,y is what you're looking for.

Updating this years later to include a small shell script I wrote years ago (but after answering this question) that provides an example of how to start chrome with custom window sizes/position and has the ability to create 'fake' user data directories by name.

It may or may not still work, and has some dangerous options set, but you get the idea.. Do not use this verbatim, some of the flags may have been renamed or been removed entirely.. (like the socks proxy commands did)

#!/bin/bash -x


mkdir -p ${CHROMEROOT}

export PROFILE="${CHROMEROOT}/${FAKEUSER}-chromium-profile"
export DISK_CACHEDIR="${CHROMEROOT}/${FAKEUSER}-chromium-profile-cache"
export DISK_CACHESIZE=4096

        --no-displaying-insecure-content \
        --no-referrers \
        --disable-zero-suggest \
        --disable-sync  \
        --cipher-suite-blacklist=0x0004,0x0005,0xc011,0xc007 \
        --enable-sandbox-logging >/dev/null 2>&1

/Applications/Google\\ Chrome \
        --remember-cert-error-decisions \
        --ignore-certificate-errors \
        --ignore-urlfetcher-cert-requests \
        --allow-running-insecure-content \
        --window-position=2400,400 \
        --window-size=1500,1000 \
        --no-pings \
        --user-data-dir=${PROFILE} \
        --disk-cache-dir=${DISK_CACHEDIR} \
        --disk-cache-size=${DISK_CACHESIZE} \
        --media-cache-size=${MEDIA_CACHESIZE} \

#--proxy-server="socks4://localhost:30604" \
#--host-resolver-rules="MAP * , EXCLUDE localhost" \

I'm trying to find a shell command that will open Google Chrome with specific x and y coordinates (so that I can set the position of the window when it opens.) Is it possible to do this using command line-arguments?

I need to modify the following command in order to achieve this:


I've used this:

google-chrome "data:text/html;charset=ISO-8859-1,<html>
    <head></head><body><script language=\"javascript\">'',

but google-chrome block popup windows, so this:

google-chrome "data:text/html;charset=ISO-8859-1,<html><head></head><body>
    <button onclick=\"
        +'resizable=1,width=600,height=600,top=100,left=120');\"> clock </button>"

give a nice way to do this.

Nota: This work as well with firefox too.

When you're using Google's Chrome, there is a shorter way:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" 


  • Automatically opens the window
  • Avoids the popup-blocker
  • Opens multiple windows on different monitors (multi monitor setup, requires two or more Chrome profiles)


  • Only seems to work in "app" Mode
  • Not tested with other browsers

With my latest version of Chrome - I only needed the following. Everytime I closed the app, it remembered my window size and position.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --chrome-frame --app=

This worked for me in Version 48.0.2564.48 beta-m (64-bit) and Version 48.0.2564.48 beta-m (64-bit)