Skip to content

Commit be699fa

Browse files
committed
Merge branch 'dev' into main
2 parents 78018e3 + fee545b commit be699fa

4 files changed

Lines changed: 109 additions & 10 deletions

File tree

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Jake He
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.MD

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Mir Kiosk Chromium
2+
3+
Mir Kiosk Chromium enables to run web based kiosks on Ubuntu Core. This is forked from Gerry Boland's [chromium-mir-kiosk](https://code.launchpad.net/~gerboland/+git/chromium-snap)
4+
5+
## Build
6+
7+
`git clone https://github.com/zhex900/mir-kiosk-chromium`
8+
9+
`cd mir-kiosk-chromium`
10+
11+
`docker run --rm -v $PWD:/project -w /project zhex900/snapcraft:core18 snapcraft`
12+
13+
## Install
14+
15+
This is tested on Ubuntu Core 18 and 20
16+
17+
First install `mir-kiosk`
18+
19+
`sudo snap install mir-kiosk`
20+
21+
Install this snap package
22+
23+
`sudo snap install ./mir-kiosk-chromium_87.0.4280.66_amd64.snap --dangerous --devmode`
24+
25+
## Configuration
26+
27+
To customize the startup url for chromium use:
28+
29+
`sudo snap set chromium-mir-kiosk url="https://yoururl.com"`
30+
31+
Set browser refresh interval. Default is 1hr (60 mins)
32+
33+
`sudo snap set chromium-mir-kiosk resettime=60`
34+
35+
Show nav bar
36+
37+
`sudo snap set chromium-mir-kiosk shownav=true`
38+
39+
Hide cursor (true/false)
40+
41+
`sudo snap set chromium-mir-kiosk hidecursor=true`
42+
43+
Disable kiosk mode (true/false)
44+
45+
`sudo snap set chromium-mir-kiosk disablekiosk=true`
46+
47+
## Screen orientation
48+
49+
`sudo vim /var/snap/mir-kiosk/current/miral-kiosk.display`.
50+
Append this to the end of the file.
51+
```
52+
kiosk:
53+
cards:
54+
- card-id: 0
55+
DisplayPort-1:
56+
orientation: right # left or normal
57+
```
58+
Apply the new kiosk layout
59+
60+
`sudo snap set mir-kiosk display-layout=kiosk`
61+
62+
## Remove chrome profile lock on boot
63+
64+
When the kiosk is ungracefully shutdown, like lost of power. Chromium will display
65+
a white page asking to unlock existing profile. To remove this on reboot. Existing
66+
Chrome profile needs to be removed.
67+
68+
`sudo vim /etc/systemd/system/snap.mir-kiosk-chromium.mir-kiosk-chromium.service`
69+
70+
Add this before `ExecStart`. This will remove the profile lock when chromium crashes or ungracefully reboots.
71+
72+
```yaml
73+
ExecStartPre=/usr/bin/rm -rf /root/snap/mir-kiosk-chromium/current/.config/chromium/SingletonLock
74+
ExecStartPre=/usr/bin/rm -rf /root/snap/mir-kiosk-chromium/current/.config/chromium/SingletonCookie
75+
ExecStartPre=/usr/bin/rm -rf /root/snap/mir-kiosk-chromium/current/.config/chromium/SingletonSocket
76+
```
77+
78+
Change `Restart` to `always`. `Restart=always`
79+
80+
`sudo systemctl daemon-reload`
81+
82+
`sudo snap restart mir-kiosk-chromium`
83+
84+
##Reference:
85+
1. https://discourse.ubuntu.com/t/configuring-mir-kiosk-a-masterclass/8150
86+
1. https://discourse.ubuntu.com/t/install-mir-kiosk-and-chromium-mir-kiosk-under-ubuntu-18-04-server/13108/4

TODO

Lines changed: 0 additions & 8 deletions
This file was deleted.

snap/snapcraft.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ description: |
66
adopt-info: ppa-build
77
confinement: strict
88
grade: stable
9+
base: core18
910

1011
apps:
11-
chromium-mir-kiosk:
12+
mir-kiosk-chromium:
1213
command: desktop-launch xwayland-kiosk-launch chromium-browser.launcher
1314
daemon: simple
1415
desktop: usr/share/applications/chromium.desktop
@@ -132,4 +133,4 @@ parts:
132133
organize:
133134
chromium-browser.launcher: bin/
134135
i3.config: etc/
135-
base: core18
136+

0 commit comments

Comments
 (0)