developer's diary

最近はc#のエントリが多いです

LinuxのGoogle chromeをコマンドラインからどうこうする。vimから起動とか・・

vimから起動する

mitsugeek.net

UbuntuにインストールしたchromeをCUIからどうこうしたくなった。

とりあえずchromeの起動パスを調べる。

パネルに張り付けてあったchromeのアイコンのプロパティをみてみた。

起動コマンドは以下のよう。
/opt/google/chrome/google-chrome %U

google-chromeを調べよう。

google-chromeのman結果

google-chrome(1)                 USER COMMANDS                google-chrome(1)

NAME
       google-chrome - the web browser from Google

SYNOPSIS
       google-chrome [OPTION] [PATH|URL]

DESCRIPTION
       See the Google Chrome help center for help on using the browser.

              <http://www.google.com/support/chrome/>

       This manpage only describes invocation, environment, and arguments.

OPTIONS
       Google  Chrome has hundreds of undocumented command-line flags that are
       added and removed at the whim of the  developers.   Here,  we  document
       relatively stable flags.

       --user-data-dir=DIR
              Specifies  the directory that user data (your "profile") is kept
              in.  Defaults  to  ~/.config/google-chrome/Default  .   Separate
              instances  of Google Chrome must use separate user data directo‐
              ries; repeated invocations of google-chrome will reuse an exist‐
              ing process for a given user data directory.

       --app=URL
              Runs URL in "app mode": with no browser toolbars.

       --proxy-server=host:port
              Specify  the HTTP/HTTPS proxy server.  Overrides any environment
              variables or settings picked via the options dialog.

       --no-proxy-server
              Disables the proxy server.  Overrides any environment  variables
              or settings picked via the options dialog.

       --proxy-auto-detect
              Autodetect proxy configuration.  Overrides any environment vari‐
              ables or settings picked via the options dialog.

       --proxy-pac-url=URL
              Specify proxy autoconfiguration URL.  Overrides any  environment
              variables or settings picked via the options dialog.

       As  a  GTK+ app, Google Chrome also obeys GTK+ command-line flags, such
       as --display.  See the GTK documentation for more:

              <http://library.gnome.org/devel/gtk/stable/gtk-running.html>
              <http://library.gnome.org/devel/gtk/stable/gtk-x11.html>

ENVIRONMENT
       Google Chrome obeys the following environment variables:

       all_proxy
              Shorthand   for   specifying  all  of  http_proxy,  https_proxy,
              ftp_proxy

       http_proxy, https_proxy, ftp_proxy
              The proxy servers used for HTTP, HTTPS, and FTP.  Note:  because
              Gnome/KDE  proxy  settings may propagate into these variables in
              some terminals, this variable  is  ignored  (in  preference  for
              actual  system  proxy settings) when running under Gnome or KDE.
              Use the command-line flags to set these when you want  to  force
              their values.

       auto_proxy
              Specify proxy autoconfiguration.  Defined and empty autodetects;
              otherwise, it should be an autoconfig URL.  But see  above  note
              about Gnome/KDE.

FILES
       ~/.config/google-chrome
              Default directory for configuration data.

       ~/.cache/google-chrome
              Default  directory  for  cache  data.   (Why?  See <http://stan‐
              dards.freedesktop.org/basedir-spec/latest/> .)

BUGS
       Bug tracker:

              http://code.google.com/p/chromium/issues/list

       Be sure to do your search within "All Issues"  before  reporting  bugs,
       and  be  sure  to pick the "Defect on Linux" template when filing a new
       one.

AUTHOR
       The Chromium team - <http://www.chromium.org>

                                                              google-chrome(1)

mac でもコマンドから起動してみた

mitsugeek.net