* [meta-browser][PATCH 1/3] chromium_40.0.2214.91: API keys update @ 2016-01-05 21:15 Trevor Woerner 2016-01-05 21:15 ` [meta-browser][PATCH 2/3] chromium: update run script for early run Trevor Woerner 2016-01-05 21:15 ` [meta-browser][PATCH 3/3] chromium: add kiosk-mode PACKAGECONFIG Trevor Woerner 0 siblings, 2 replies; 5+ messages in thread From: Trevor Woerner @ 2016-01-05 21:15 UTC (permalink / raw) To: openembedded-devel; +Cc: Otavio Salvador Add more information to the "disable-api-keys-info-bar" PACKAGECONFIG description regarding another way to disable the "Google API keys are missing" warning. Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- recipes-browser/chromium/chromium_40.0.2214.91.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb index 4694506..6fddcc7 100644 --- a/recipes-browser/chromium/chromium_40.0.2214.91.bb +++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb @@ -45,7 +45,13 @@ SRC_URI = "\ # * disable-api-keys-info-bar: (off by default) # This disables the info bar that warns: "Google API keys are missing". # With some builds, missing API keys are considered OK, so the bar needs -# to go. +# to go. Conversely, if Chromium is compiled with this option off and +# the user wishes to disable the warning, the following lines can be +# added to the "google-chrome" script (see patchset) before the +# chromium binary is called: +# export GOOGLE_API_KEY="no" +# export GOOGLE_DEFAULT_CLIENT_ID="no" +# export GOOGLE_DEFAULT_CLIENT_SECRET="no" # # * component-build: (off by default) # Enables component build mode. By default, all of Chromium (with the -- 2.7.0.rc3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [meta-browser][PATCH 2/3] chromium: update run script for early run 2016-01-05 21:15 [meta-browser][PATCH 1/3] chromium_40.0.2214.91: API keys update Trevor Woerner @ 2016-01-05 21:15 ` Trevor Woerner 2016-01-06 12:07 ` Koen Kooi 2016-01-05 21:15 ` [meta-browser][PATCH 3/3] chromium: add kiosk-mode PACKAGECONFIG Trevor Woerner 1 sibling, 1 reply; 5+ messages in thread From: Trevor Woerner @ 2016-01-05 21:15 UTC (permalink / raw) To: openembedded-devel; +Cc: Otavio Salvador If the chromium run-helper script (google-chrome) is run as part of a (sysvinit) init script, shell variables $USER and $HOME will not be set (leading to unwanted behaviour). Replace the use of $USER with `whoami` and replace the use of $HOME with the OE bitbake variable ROOT_HOME. In this way the chromium run-helper script will work as expected in both instances (as part of an init script and from the cmdline). Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- recipes-browser/chromium/chromium/google-chrome | 4 ++-- recipes-browser/chromium/chromium_40.0.2214.91.bb | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes-browser/chromium/chromium/google-chrome b/recipes-browser/chromium/chromium/google-chrome index b1ec288..b5c2541 100644 --- a/recipes-browser/chromium/chromium/google-chrome +++ b/recipes-browser/chromium/chromium/google-chrome @@ -4,8 +4,8 @@ export CHROME_DEVEL_SANDBOX=/usr/sbin/chrome-devel-sandbox export LD_LIBRARY_PATH=/usr/lib/chromium CHROME_EXTRA_ARGS="" -if [ "${USER}" = "root" ] ; then - CHROME_EXTRA_ARGS="${CHROME_EXTRA_ARGS} --user-data-dir=${HOME}/.chromium/" +if [ "`whoami`" = "root" ] ; then + CHROME_EXTRA_ARGS="${CHROME_EXTRA_ARGS} --user-data-dir=ROOT_HOME/.chromium/" fi /usr/bin/chromium/chrome ${CHROME_EXTRA_ARGS} $@ diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb index 6fddcc7..e138628 100644 --- a/recipes-browser/chromium/chromium_40.0.2214.91.bb +++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb @@ -221,6 +221,9 @@ do_install_append() { # the dummy "CHROME_EXTRA_ARGS" line sed -i "s/^CHROME_EXTRA_ARGS=\"\"/CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"/" ${D}${bindir}/google-chrome + # update ROOT_HOME with the root user's $HOME + sed -i "s#ROOT_HOME#${ROOT_HOME}#" ${D}${bindir}/google-chrome + # Always adding this libdir (not just with component builds), because the # LD_LIBRARY_PATH line in the google-chromium script refers to it install -d ${D}${libdir}/${BPN}/ -- 2.7.0.rc3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [meta-browser][PATCH 2/3] chromium: update run script for early run 2016-01-05 21:15 ` [meta-browser][PATCH 2/3] chromium: update run script for early run Trevor Woerner @ 2016-01-06 12:07 ` Koen Kooi 2016-01-06 14:44 ` Trevor Woerner 0 siblings, 1 reply; 5+ messages in thread From: Koen Kooi @ 2016-01-06 12:07 UTC (permalink / raw) To: openembedded-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Op 05-01-16 om 22:15 schreef Trevor Woerner: > If the chromium run-helper script (google-chrome) is run as part of a > (sysvinit) init script, shell variables $USER and $HOME will not be set > (leading to unwanted behaviour). > > Replace the use of $USER with `whoami` and replace the use of $HOME with > the OE bitbake variable ROOT_HOME. > > In this way the chromium run-helper script will work as expected in both > instances (as part of an init script and from the cmdline). Doesn't this break running chrome as a regular non-root user? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: GPGTools - http://gpgtools.org iD8DBQFWjQOHMkyGM64RGpERAoGFAJ9QCcfdD8qzAo/Orq/cWJFrBBLfrwCggkqR PUswbLTWhJPanSY8u/1kfGM= =4mmY -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-browser][PATCH 2/3] chromium: update run script for early run 2016-01-06 12:07 ` Koen Kooi @ 2016-01-06 14:44 ` Trevor Woerner 0 siblings, 0 replies; 5+ messages in thread From: Trevor Woerner @ 2016-01-06 14:44 UTC (permalink / raw) To: openembedded-devel On 01/06/16 07:07, Koen Kooi wrote: > Op 05-01-16 om 22:15 schreef Trevor Woerner: > > If the chromium run-helper script (google-chrome) is run as part of a > > (sysvinit) init script, shell variables $USER and $HOME will not be set > > (leading to unwanted behaviour). > > > Replace the use of $USER with `whoami` and replace the use of $HOME with > > the OE bitbake variable ROOT_HOME. > > > In this way the chromium run-helper script will work as expected in > both > > instances (as part of an init script and from the cmdline). > > Doesn't this break running chrome as a regular non-root user? I haven't tested that, but on inspection it doesn't. I'm not changing the _behaviour_ of the /usr/bin/google-chrome script, I'm only changing the tools it uses to do what it's already doing. The /bin/sh script has an "if" clause looking to see if the person running it is root, if so it adds an extra parameter (--user-data-dir=...) to the invocation of the actual /usr/bin/chromium/chrome binary. Prior to this patch the script was using $USER and $HOME and I've simply changed those to be `whoami` and at build time changing a placeholder from ROOT_HOME to whatever you've defined in your OE environment to be the root user's home. Basically I'm building a kiosk and I want chrome to start automatically (via a sysvinit script) on startup. When /usr/bin/google-chrome is invoked as part of a sysvinit script I have found that neither $USER nor $HOME are defined, so this clause (which is needed in my case) isn't invoked. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [meta-browser][PATCH 3/3] chromium: add kiosk-mode PACKAGECONFIG 2016-01-05 21:15 [meta-browser][PATCH 1/3] chromium_40.0.2214.91: API keys update Trevor Woerner 2016-01-05 21:15 ` [meta-browser][PATCH 2/3] chromium: update run script for early run Trevor Woerner @ 2016-01-05 21:15 ` Trevor Woerner 1 sibling, 0 replies; 5+ messages in thread From: Trevor Woerner @ 2016-01-05 21:15 UTC (permalink / raw) To: openembedded-devel; +Cc: Otavio Salvador, Gary Thomas, knagabhirava If you are creating a kiosk, then enable this PACKAGECONFIG and the browser will start up fullscreen and without menu bars etc. Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- recipes-browser/chromium/chromium.inc | 1 + recipes-browser/chromium/chromium_40.0.2214.91.bb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/recipes-browser/chromium/chromium.inc b/recipes-browser/chromium/chromium.inc index 716988d..5e8aba6 100644 --- a/recipes-browser/chromium/chromium.inc +++ b/recipes-browser/chromium/chromium.inc @@ -25,6 +25,7 @@ PACKAGECONFIG[disable-api-keys-info-bar] = "" PACKAGECONFIG[ignore-lost-context] = "" PACKAGECONFIG[impl-side-painting] = "" PACKAGECONFIG[use-egl] = "" +PACKAGECONFIG[kiosk-mode] = "" GYP_DEFINES += "${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''" diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb index e138628..dd42903 100644 --- a/recipes-browser/chromium/chromium_40.0.2214.91.bb +++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb @@ -77,6 +77,11 @@ SRC_URI = "\ # development stages, it can improve performance See # http://www.chromium.org/developers/design-documents/impl-side-painting # for more. +# +# * kiosk-mode: (off by default) +# Enable this option if you want your browser to start up full-screen, +# without any menu bars, without any clutter, and without any initial +# start-up indicators. SRC_URI += "\ ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch', '', d)} \ @@ -86,6 +91,7 @@ CHROMIUM_EXTRA_ARGS ?= " \ ${@bb.utils.contains('PACKAGECONFIG', 'use-egl', '--use-gl=egl', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', '--gpu-no-context-lost', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', '--enable-gpu-rasterization --enable-impl-side-painting', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--start-fullscreen --kiosk --no-first-run', '', d)} \ " # Conditionally add ozone-wayland and its patches to the Chromium sources -- 2.7.0.rc3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-06 14:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-05 21:15 [meta-browser][PATCH 1/3] chromium_40.0.2214.91: API keys update Trevor Woerner 2016-01-05 21:15 ` [meta-browser][PATCH 2/3] chromium: update run script for early run Trevor Woerner 2016-01-06 12:07 ` Koen Kooi 2016-01-06 14:44 ` Trevor Woerner 2016-01-05 21:15 ` [meta-browser][PATCH 3/3] chromium: add kiosk-mode PACKAGECONFIG Trevor Woerner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox