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. -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
