How to add old or own Chrome extension

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Post Reply
tomas_223
Ronin
Ronin
Posts: 2
Joined: 08 May 2019, 16:22
Distribution: Porteus Kiosk

How to add old or own Chrome extension

Post#1 by tomas_223 » 09 May 2019, 21:40

Hi guys.
This is little tutorial how to add some unsupported, old or your own extension (add-on) to Google Chrome.
I was struggling with this for longer time and couldn't find suitable solution for my use case
when I want to be loaded without any cooperation with user and can kiosk can be restarted.
So maybe it will help to somebody else too.

1)
Prepare your own module that will contain unpacked Chrome extension.
Create directories "home", "guest" and "keyboard_extension" like this

Code: Select all

./home/guest/keyboard_extension

and put your unpacked extension there.

2)
Create file

Code: Select all

./home/guest/on_startup.sh
and put following code in it:

Code: Select all

#!/bin/sh

CHKEYFLAG="--load-extension=/home/guest/keyboard_extension/"

# add chrome startup flag
grep -q load-extension $chflags || echo $CHKEYFLAG >> $chflags
3)
Give it exec rights

Code: Select all

chmod 755 on_startup.sh
4)
Put following code somewhere online.

Code: Select all

// enable adding custom chrome extension
"ExtensionInstallBlacklist": [],
Or feel free to use link to my gitlab:
https://gitlab.com/tomas223/porteus-kio ... licies.txt

5)
Put following lines to your portreus config:

Code: Select all

browser_preferences=https://gitlab.com/tomas223/porteus-kiosk-config/raw/master/chrome-policies.txt
run_command=sh /home/guest/on_startup.sh
6)
Now pack whole "home" directory with mksquash command. For how to check: https://porteus-kiosk.org/modules.html
And finally prepare kiosk ISO file. Check https://porteus-kiosk.org/kiosk-customization.html
Last edited by tomas_223 on 10 May 2019, 17:47, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 5180
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

How to add old or own Chrome extension

Post#2 by fanthom » 10 May 2019, 04:56

Great tutorial tomas,

I'm sure it will be useful to others.

One thing to note, this command:

Code: Select all

grep -q $CHKEYFLAG || echo $CHKEYFLAG >> $chflags
should be:

Code: Select all

grep -q load-extension $chflags || echo $CHKEYFLAG >> $chflags
otherwise your flag will be added to flags file during every session restart.

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

tomas_223
Ronin
Ronin
Posts: 2
Joined: 08 May 2019, 16:22
Distribution: Porteus Kiosk

How to add old or own Chrome extension

Post#3 by tomas_223 » 10 May 2019, 17:47

Thanks fanthom!

I see that little bug there now :)
I will fix my post

Post Reply