Chrome Extension Autolaunch

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#1 by specialised » 13 Aug 2018, 23:33

Hi All,

Info seems to be scarce other than running a chrome extension dated from 2013.

I need to launch an extension in chrome on boot.

Has anyone got any experience with this?

I have successfully modified my policies file to automatically download the extension and it all works fine up to that point.
My default page is set to chrome://apps which is great but that one last step of full automation would be a huge win!

Thanks in advance guys.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome Extension Autolaunch

Post#2 by fanthom » 14 Aug 2018, 07:57

Not sure if this is what you want but I have installed this Chrome app:
https://chrome.google.com/webstore/deta ... ofgeadjhnf

And i'm able to run it during kiosk boot with following parameter (in a loop so it reopens when closed):

Code: Select all

run_command=while true; do su - guest -c "chrome --app-id=jfmhmcdjmeoihgkcnjgjopofgeadjhnf"; done
Please add [Solved] to your thread title if the solution was found.

specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#3 by specialised » 14 Aug 2018, 12:12

Thanks I'll let you know how it goes

specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#4 by specialised » 15 Aug 2018, 05:46

Sorry, this didn't work.

I tried using root as the user, nothing

Steps I performed were
1/ Add the extension ID to the line above
2/ Added it to my config file

It now does not even load Chrome.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome Extension Autolaunch

Post#5 by fanthom » 15 Aug 2018, 07:00

Remember that you are starting with a clean profile and extensions are installed when Chrome is started, not before.

You would have to use 'persistence=full' and at least once start the Chrome or modify the ISO and include your extension in it by default.
Please add [Solved] to your thread title if the solution was found.

specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#6 by specialised » 15 Aug 2018, 14:04

I have full persistence on and am customising a few things with the ISO so I will take a look at that.

specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#7 by specialised » 17 Aug 2018, 04:52

I can confirm once chrome has started I can SSH in and run (not a legit chrome app):

Code: Select all

su - guest -c "chrome --app-id=kjasdhflawnwfnasdfajsdnfkak"
But if I run it as part of "run_command" in the config file it never works.

Reading through the parameters guide it looks like run_command is executed just after the network is active:
Your commands will be executed once the network is established so utilities like rsync, wget and also graphical ones could work
So my guess is that Chrome is not running when the command is fired.

If I put the command in a loop as suggested Chrome never runs.

Is there a way to fire the command after Chrome has launched and the extension has downloaded?
Even if I bundle the extension (still trying to figure this out so hints welcomed) the run_command string will fire before Chrome starts.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome Extension Autolaunch

Post#8 by fanthom » 17 Aug 2018, 06:04

I thought you need to run just the Chrome app and not Chrome + app.

For second case use this:

Code: Select all

run_command=( sleep 20; su - guest -c "chrome --app-id=jfmhmcdjmeoihgkcnjgjopofgeadjhnf"; ) &
If you want to run your app in a loop then:

Code: Select all

run_command=( sleep 20; while true; do su - guest -c "chrome --app-id=jfmhmcdjmeoihgkcnjgjopofgeadjhnf"; done; ) &
Please add [Solved] to your thread title if the solution was found.

specialised
White ninja
White ninja
Posts: 9
Joined: 30 Jun 2018, 06:59
Distribution: 4.7

Chrome Extension Autolaunch

Post#9 by specialised » 17 Aug 2018, 06:43

OK Thanks, that did it.

I was trying to put sleep in there also but I wasn't sure of the formatting. ie 2m, 120s etc

Am I assuming 20 is in seconds? It seemed to boot that quick.

Thanks again for your help, I will be in touch for the other stuff.

For anyone reading this, the following worked for me (obviously you have to download the extension and change its ID below)

Code: Select all

run_command=( sleep 20; su - guest -c "chrome --app-id=gmdgbdlpbnhiogedlhmdiceocbgcbpgi"; ) &

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome Extension Autolaunch

Post#10 by fanthom » 17 Aug 2018, 08:33

Please add [Solved] to your thread title if the solution was found.

Locked