Skip to content

Commit

Permalink
Use Chrome policy to disable translate
Browse files Browse the repository at this point in the history
old way doesn't work any more
  • Loading branch information
schlomo committed Feb 16, 2019
1 parent 4c4f0c6 commit f45ebcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ release: commit-release deb
changelog=$$(git log $$comparison --oneline --no-merges --reverse); \
github-release schlomo/$(PACKAGE) v$(VERSION) "$$(git rev-parse --abbrev-ref HEAD)" "**Changelog**<br/>$$changelog" 'out/*.deb'; \
git pull
dput ppa:sschapiro/ubuntu/ppa/xenial out/$(PACKAGE)_*_source.changes
dput ppa:sschapiro/ubuntu/ppa/bionic out/$(PACKAGE)_*_source.changes

test:
./runtests.sh
Expand All @@ -36,6 +36,7 @@ install:
install -m 0644 sudoers -D $(DESTDIR)/etc/sudoers.d/$(PACKAGE)
install -m 0644 XOsview -D -t $(DESTDIR)/usr/lib/X11/app-defaults
install -m 0755 xsession.sh -D -t $(DESTDIR)/usr/share/$(PACKAGE)
install -m 0644 kiosk-browser.json -D -t $(DESTDIR)/etc/chromium-browser/policies/recommended

clean:
rm -Rf debian/$(PACKAGE) debian/*debhelper* debian/*substvars debian/files out/*
Expand Down
3 changes: 3 additions & 0 deletions kiosk-browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"TranslateEnabled": false
}
4 changes: 2 additions & 2 deletions xsession.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ done
perl -e '$/ = undef; $d=<>; $d =~ m/.*(lease \{.*?\})$/s ; print $1' $(ps ax | grep dhclient | sed -ne "s/.* \(\/[^ ]\+\.lease[s]\?\).*/\1/p") <<<""
echo
echo "This message will self-destruct in 60 seconds"
} | osd_cat --pos bottom --align left --colour green --outline 2 --font 10x20 --lines 50 --delay 60 &
} | sed -e 's/●/ /g' | osd_cat --offset 10 --indent 10 --colour green --outline 2 --font 10x20 --lines 50 --delay 60 &

disown -a # forget about running osd_cat, it will terminate itself anyway

Expand Down Expand Up @@ -202,7 +202,7 @@ while sleep 5 & wait $!; do
wait $!
xdotool search --class uzbl-$c windowmove --sync $port_x 0
else
$CHROME --user-data-dir=$BROWSER_PROFILE_DIR "${KIOSK_BROWSER_OPTIONS[@]}" --use-fake-ui-for-media-stream --disable-translate --no-first-run --start-fullscreen --app="$URL" &
$CHROME --user-data-dir=$BROWSER_PROFILE_DIR "${KIOSK_BROWSER_OPTIONS[@]}" --use-fake-ui-for-media-stream --no-first-run --start-fullscreen --app="$URL" &
PID=$!

# move new window to the current screen. We identify the window by the --user-data-dir option which appears in the window class name :-)
Expand Down

0 comments on commit f45ebcd

Please sign in to comment.