Version 1.0.0
This commit is contained in:
parent
bace55a157
commit
5dad865b3a
36
.gitignore
vendored
36
.gitignore
vendored
@ -1,5 +1,31 @@
|
|||||||
.DS_Store
|
# Runtime data
|
||||||
/.idea
|
pids
|
||||||
/.history
|
*.pid
|
||||||
/node_modules
|
*.seed
|
||||||
/package*.json
|
*.pid.lock
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# andere Ordner
|
||||||
|
_old/
|
||||||
|
_intern/
|
||||||
|
|
||||||
|
# ssl
|
||||||
|
.crt
|
||||||
|
.key
|
||||||
|
.pem
|
||||||
|
.cer
|
||||||
|
|||||||
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 Futurice
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
175
LICENSE.md
Normal file
175
LICENSE.md
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
## creative commons
|
||||||
|
|
||||||
|
# Attribution-ShareAlike 4.0 International
|
||||||
|
|
||||||
|
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
||||||
|
|
||||||
|
### Using Creative Commons Public Licenses
|
||||||
|
|
||||||
|
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
||||||
|
|
||||||
|
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
|
||||||
|
|
||||||
|
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
|
||||||
|
|
||||||
|
## Creative Commons Attribution-ShareAlike 4.0 International Public License
|
||||||
|
|
||||||
|
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||||
|
|
||||||
|
### Section 1 – Definitions.
|
||||||
|
|
||||||
|
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||||
|
|
||||||
|
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
c. __BY-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License.
|
||||||
|
|
||||||
|
d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||||
|
|
||||||
|
e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||||
|
|
||||||
|
f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||||
|
|
||||||
|
g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
|
||||||
|
|
||||||
|
h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||||
|
|
||||||
|
i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||||
|
|
||||||
|
j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
|
||||||
|
|
||||||
|
k. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||||
|
|
||||||
|
l. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||||
|
|
||||||
|
m. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||||
|
|
||||||
|
### Section 2 – Scope.
|
||||||
|
|
||||||
|
a. ___License grant.___
|
||||||
|
|
||||||
|
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||||
|
|
||||||
|
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||||
|
|
||||||
|
B. produce, reproduce, and Share Adapted Material.
|
||||||
|
|
||||||
|
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||||
|
|
||||||
|
3. __Term.__ The term of this Public License is specified in Section 6(a).
|
||||||
|
|
||||||
|
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||||
|
|
||||||
|
5. __Downstream recipients.__
|
||||||
|
|
||||||
|
A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
B. __Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
|
||||||
|
|
||||||
|
C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||||
|
|
||||||
|
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||||
|
|
||||||
|
b. ___Other rights.___
|
||||||
|
|
||||||
|
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||||
|
|
||||||
|
2. Patent and trademark rights are not licensed under this Public License.
|
||||||
|
|
||||||
|
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
||||||
|
|
||||||
|
### Section 3 – License Conditions.
|
||||||
|
|
||||||
|
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||||
|
|
||||||
|
a. ___Attribution.___
|
||||||
|
|
||||||
|
1. If You Share the Licensed Material (including in modified form), You must:
|
||||||
|
|
||||||
|
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||||
|
|
||||||
|
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||||
|
|
||||||
|
ii. a copyright notice;
|
||||||
|
|
||||||
|
iii. a notice that refers to this Public License;
|
||||||
|
|
||||||
|
iv. a notice that refers to the disclaimer of warranties;
|
||||||
|
|
||||||
|
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||||
|
|
||||||
|
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||||
|
|
||||||
|
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||||
|
|
||||||
|
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||||
|
|
||||||
|
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||||
|
|
||||||
|
b. ___ShareAlike.___
|
||||||
|
|
||||||
|
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
||||||
|
|
||||||
|
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
|
||||||
|
|
||||||
|
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
||||||
|
|
||||||
|
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
|
||||||
|
|
||||||
|
### Section 4 – Sui Generis Database Rights.
|
||||||
|
|
||||||
|
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||||
|
|
||||||
|
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
|
||||||
|
|
||||||
|
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||||
|
|
||||||
|
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||||
|
|
||||||
|
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||||
|
|
||||||
|
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
|
||||||
|
|
||||||
|
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
|
||||||
|
|
||||||
|
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||||
|
|
||||||
|
### Section 6 – Term and Termination.
|
||||||
|
|
||||||
|
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||||
|
|
||||||
|
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||||
|
|
||||||
|
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||||
|
|
||||||
|
2. upon express reinstatement by the Licensor.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||||
|
|
||||||
|
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||||
|
|
||||||
|
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||||
|
|
||||||
|
### Section 7 – Other Terms and Conditions.
|
||||||
|
|
||||||
|
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||||
|
|
||||||
|
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.t stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
### Section 8 – Interpretation.
|
||||||
|
|
||||||
|
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||||
|
|
||||||
|
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||||
|
|
||||||
|
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||||
|
|
||||||
|
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||||
|
|
||||||
|
```
|
||||||
|
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at creativecommons.org
|
||||||
|
```
|
||||||
@ -1,97 +0,0 @@
|
|||||||
# Welcome to chilipie-kiosk
|
|
||||||
|
|
||||||
**Looks like this is your first boot!**
|
|
||||||
|
|
||||||
This document lists some things you can do to customize your kiosk. You'll need to plug in a keyboard for this initial setup, but after that, it's perfectly fine to leave the kiosk running without any peripherals plugged in.
|
|
||||||
|
|
||||||
## Setting the URL
|
|
||||||
|
|
||||||
Press `F11` to exit the full screen mode, and `Ctrl + L` to focus the location bar. Navigate away! Once done, press `F11` again to re-enter full screen mode.
|
|
||||||
|
|
||||||
Chromium is configured to remember the URL where you left off (and all logins, etc), so this might be all the configuration you need to do!
|
|
||||||
|
|
||||||
## System configuration
|
|
||||||
|
|
||||||
You can access the `raspi-config` utility by pressing `Ctrl + Alt + F2`. With it, you can do things like:
|
|
||||||
|
|
||||||
- Join a WiFi network
|
|
||||||
- Change your keyboard layout
|
|
||||||
- Change the system timezone
|
|
||||||
- Enable SSH access (it's disabled by default for security reasons)
|
|
||||||
- Change the password (see above)
|
|
||||||
|
|
||||||
Pressing `Ctrl + Alt + F1` takes you back to Chromium.
|
|
||||||
|
|
||||||
## Automating things
|
|
||||||
|
|
||||||
There's a few commonly useful snippets already on the crontab, such as:
|
|
||||||
|
|
||||||
- **Rebooting the Pi every night at 3 AM**. If you run resource intensive pages on your dashboard, the Pi can eventually start to slow down. A nightly reboot keeps it rested and refreshed! This is enabled by default.
|
|
||||||
- **Turning the display off for the night**. This helps save energy when there's no-one there to look at your dashboard. Sometimes also useful for reasons of vanity, when bright displays in the middle of a dark office would look ridiculous. Do make sure your display/television comes back on, however: especially older TV's sometimes won't know to automatically turn back on when the HDMI signal comes back on. In those cases, you may have luck with [CEC signals](https://timleland.com/raspberry-pi-turn-tv-onoff-cec/), but also you may not. If nothing else works, you can always just [blank the display](https://askubuntu.com/a/7299).
|
|
||||||
- **Automatically reloading the active page every hour**. If the page you're displaying doesn't automatically update itself, this is effectively the same as hitting `Ctrl + R` every hour. Very crude. Very effective.
|
|
||||||
- **Cycling between open tabs every 5 minutes**. Same as above, but for `Ctrl + Tab`. Note that if you use both at the same time, you can combine them, to send the reload command _just before_ sending the tab cycle command. This causes the pages to reload while they're in the background, so the user never sees it happening.
|
|
||||||
|
|
||||||
Press `Ctrl + Alt + F3` to get to a virtual terminal, use `crontab -e` to check these out, enable the ones you want, or customize them to your heart's content.
|
|
||||||
|
|
||||||
Again, pressing `Ctrl + Alt + F1` takes you back to Chromium.
|
|
||||||
|
|
||||||
## Customizing Chromium
|
|
||||||
|
|
||||||
Because you're running a fully-featured Chromium, you can customize it further by [installing browser extensions](https://chrome.google.com/webstore/category/extensions). For example:
|
|
||||||
|
|
||||||
- **[Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)** can be useful for injecting custom JS or CSS to a page you're displaying.
|
|
||||||
- **[Ignore X-Frame headers](https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe)** can help you if you need to `<iframe>` a site that doesn't want to be framed.
|
|
||||||
|
|
||||||
Finally, further tweaks can be made by changing the [Chromium command line switches](https://peter.sh/experiments/chromium-command-line-switches/) in `~/.xsession`. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
--unsafely-treat-insecure-origin-as-secure=http://shady.example.com,http://another.example.com --user-data-dir=/home/pi/.config/chromium
|
|
||||||
```
|
|
||||||
|
|
||||||
Adding these options will allow you to mix secure (i.e. HTTPS) origins with insecure ones (you need to specifically white-list them). Sometimes you need stuff like this to pull together all the bits and pieces of your dashboard from different origins. We're not saying you should. But you can.
|
|
||||||
|
|
||||||
## Controlling the kiosk remotely
|
|
||||||
|
|
||||||
Sometimes you need to do basic remote adjustments, like changing the URL that's displayed.
|
|
||||||
|
|
||||||
- If you need a lot of flexibility, [you can install VNC](https://github.com/futurice/chilipie-kiosk/issues/38#issuecomment-442031274) to get a full remote desktop
|
|
||||||
- If you just need to set the URL, you can SSH over (not enabled by default; see above), and e.g. [run something like](https://github.com/futurice/chilipie-kiosk/issues/71#issuecomment-522035239): `export DISPLAY=:0; xdotool key F11 sleep 1 key ctrl+l sleep 1 type 'https://google.com'; xdotool sleep 1 key KP_Enter; xdotool key F11`. Very crude. Very effective.
|
|
||||||
|
|
||||||
## Username and password
|
|
||||||
|
|
||||||
If you need to login to a shell, the default username and password are `pi` and `raspberry`, as is tradition for Raspberry Pi. The `pi` user also has `sudo` access.
|
|
||||||
|
|
||||||
## Adjusting your resolution
|
|
||||||
|
|
||||||
If the display auto-detection fails and chooses a funky default resolution for you, [there's a few things you can do](https://www.opentechguides.com/how-to/article/raspberry-pi/28/raspi-display-setting.html) to try and fix that.
|
|
||||||
|
|
||||||
## Rotating your screen
|
|
||||||
|
|
||||||
Press `Ctrl + Alt + F3` to get to a virtual terminal, and use your favorite editor to open `/boot/config.txt` (remember to use `sudo`). Add a line to the end of the file:
|
|
||||||
|
|
||||||
- `display_rotate=0` to disable rotation
|
|
||||||
- `display_rotate=1` to rotate 90° clockwise
|
|
||||||
- `display_rotate=2` to rotate 180°
|
|
||||||
- `display_rotate=3` to rotate 90° counter-clockwise
|
|
||||||
|
|
||||||
Save the file, and `sudo reboot`.
|
|
||||||
|
|
||||||
Note that on the Pi 4, you'll need to disable the `dtoverlay=vc4-fkms-v3d` line in `/boot/config.txt` for this to work. But then that [may cause other issues](https://www.reddit.com/r/raspberry_pi/comments/dw1376/dtoverlayvc4fkmsv3d_causes_display_to_shift_right/). This is hopefully fixed in a future Raspbian release.
|
|
||||||
|
|
||||||
Exotic screens may require a bit more fiddling. See issues [#41](https://github.com/futurice/chilipie-kiosk/issues/41) and [#58](https://github.com/futurice/chilipie-kiosk/issues/58) for ideas.
|
|
||||||
|
|
||||||
## Replacing the boot graphics
|
|
||||||
|
|
||||||
The image that's displayed while the kiosk is starting can be changed by just replacing `~/background.png`.
|
|
||||||
|
|
||||||
To change the default chilipie-kiosk boot graphics to a [nice Windoge one](https://mcdn.wallpapersafari.com/medium/93/77/8xKLeg.png), for example, try `wget -O background.png https://bit.ly/2Q4GF1t`.
|
|
||||||
|
|
||||||
## Increasing boot show delay
|
|
||||||
|
|
||||||
By default, the browser window is hidden for a few seconds after boot, to give the page time to load. You can increase (or decrease) this delay in `~/.xsession`.
|
|
||||||
|
|
||||||
## Using a touch screen
|
|
||||||
|
|
||||||
If your kiosk is interactive, and you're using a touch screen as a display, you may need to calibrate it. Press `Ctrl + Alt + F3` to get to a virtual terminal, and type:
|
|
||||||
|
|
||||||
DISPLAY=:0 xinput_calibrator
|
|
||||||
@ -1,315 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# exit on error; treat unset variables as errors; exit on errors in piped commands
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Ensure we operate from consistent pwd for the rest of the script
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # Figure out the ABSOLUTE PATH of this script without relying on the realpath command, which may not always be available
|
|
||||||
cd "$DIR"
|
|
||||||
|
|
||||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
|
||||||
MOUNTED_BOOT_VOLUME="/media/$(whoami)/boot" # i.e. under which name is the SD card mounted under /media in Linux (Ubuntu)
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
MOUNTED_BOOT_VOLUME="/Volumes/boot" # i.e. under which name is the SD card mounted under /Volumes on macOS
|
|
||||||
else
|
|
||||||
echo "Error: Unsupported platform $OSTYPE, sorry" && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
BOOT_CMDLINE_TXT="$MOUNTED_BOOT_VOLUME/cmdline.txt"
|
|
||||||
BOOT_CONFIG_TXT="$MOUNTED_BOOT_VOLUME/config.txt"
|
|
||||||
SD_SIZE_REAL=2500 # this is in MB
|
|
||||||
SD_SIZE_SAFE=2800 # this is in MB
|
|
||||||
SD_SIZE_ZERO=3200 # this is in MB
|
|
||||||
SSH_PUBKEY="$(cat ~/.ssh/id_rsa.pub)"
|
|
||||||
SSH_CONNECT_TIMEOUT=30
|
|
||||||
LOCALE="en_US.UTF-8 UTF-8" # or e.g. "fi_FI.UTF-8 UTF-8" for Finland
|
|
||||||
LANGUAGE="en_US.UTF-8" # should match above
|
|
||||||
KEYBOARD="us" # or e.g. "fi" for Finnish
|
|
||||||
TIMEZONE="Etc/UTC" # or e.g. "Europe/Helsinki"; see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
||||||
|
|
||||||
function echo-bold {
|
|
||||||
echo -e "$(tput -Txterm-256color bold)$1$(tput -Txterm-256color sgr 0)" # https://unix.stackexchange.com/a/269085; the -T arg accounts for $ENV not being set
|
|
||||||
}
|
|
||||||
function working {
|
|
||||||
echo-bold "\n[WORKING] $1"
|
|
||||||
}
|
|
||||||
function question {
|
|
||||||
echo-bold "\n[QUESTION] $1"
|
|
||||||
}
|
|
||||||
function ssh {
|
|
||||||
/usr/bin/ssh -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout="$SSH_CONNECT_TIMEOUT" "pi@$IP" "$1"
|
|
||||||
}
|
|
||||||
function scp {
|
|
||||||
/usr/bin/scp -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$@" "pi@$IP:/home/pi"
|
|
||||||
}
|
|
||||||
function figureOutSdCard {
|
|
||||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
|
||||||
lsblk --fs
|
|
||||||
DISK="/dev/$(lsblk -l | grep "$MOUNTED_BOOT_VOLUME" | sed 's/[0-9].*//')"
|
|
||||||
DISK_SAMPLE="/dev/sda"
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
diskutil list
|
|
||||||
DISK="$(diskutil list | grep /dev/ | grep external | grep physical | cut -d ' ' -f 1 | head -n 1)"
|
|
||||||
DISK_SAMPLE="/dev/disk2"
|
|
||||||
else
|
|
||||||
echo "Error: Unsupported platform $OSTYPE, sorry" && exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
function unmountSdCard {
|
|
||||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
|
||||||
for part in $(lsblk --list "$DISK" | grep part | sed 's/ .*//'); do
|
|
||||||
udisksctl unmount -b "/dev/$part"
|
|
||||||
done
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
diskutil unmountDisk "$DISK"
|
|
||||||
else
|
|
||||||
echo "Error: Unsupported platform $OSTYPE, sorry" && exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
question "Enter version (e.g. \"1.2.3\") being built"
|
|
||||||
echo "Omit the \"v\" prefix, it'll be added where needed"
|
|
||||||
echo "For alpha/beta builds, use a \"-betaN\" suffic"
|
|
||||||
echo "For RC builds, DO NOT use any suffix, as then the same image can't be promoted to stable without rebuilding"
|
|
||||||
echo "Enter version:"
|
|
||||||
read TAG
|
|
||||||
|
|
||||||
working "Updating version file"
|
|
||||||
echo -e "$TAG\n\nhttps://github.com/futurice/chilipie-kiosk" > ../home/.chilipie-kiosk-version
|
|
||||||
|
|
||||||
working "Generating first-boot.html"
|
|
||||||
if [ ! -d "node_modules" ]; then
|
|
||||||
npm install markdown-styles@3.1.10 html-inline@1.2.0
|
|
||||||
fi
|
|
||||||
rm -rf md-input md-output
|
|
||||||
mkdir md-input md-output
|
|
||||||
cp ../docs/first-boot.md md-input
|
|
||||||
./node_modules/.bin/generate-md --layout github --input md-input/ --output md-output/
|
|
||||||
./node_modules/.bin/html-inline -i md-output/first-boot.html > ../home/first-boot.html
|
|
||||||
rm -rf md-input md-output
|
|
||||||
|
|
||||||
question "Physically mount the SD card to this machine "
|
|
||||||
echo "(press enter when ready)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Figuring out SD card device"
|
|
||||||
figureOutSdCard
|
|
||||||
|
|
||||||
question "Based on the above, SD card determined to be \"$DISK\""
|
|
||||||
echo "Should be e.g. \"$DISK_SAMPLE\""
|
|
||||||
echo "(press enter to confirm)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Safely unmounting the card"
|
|
||||||
unmountSdCard
|
|
||||||
|
|
||||||
working "Writing the card full of zeros"
|
|
||||||
# ...for security and compressibility reasons
|
|
||||||
echo "This may take a long time"
|
|
||||||
echo "You may be prompted for your password by sudo"
|
|
||||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
|
||||||
sudo dd bs=1M count="$SD_SIZE_ZERO" if=/dev/zero of="$DISK" status=progress
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
sudo dd bs=1m count="$SD_SIZE_ZERO" if=/dev/zero of="$DISK"
|
|
||||||
else
|
|
||||||
echo "Error: Unsupported platform $OSTYPE, sorry" && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
question "Prepare baseline Raspberry Pi OS Lite:"
|
|
||||||
echo "* Flash the OS with Raspberry Pi Imager"
|
|
||||||
echo "* Eject the SD card"
|
|
||||||
echo "* Mount the card back"
|
|
||||||
echo "* Wait for your OS to mount it"
|
|
||||||
echo "(press enter when ready)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Backing up original boot files"
|
|
||||||
cp -v "$BOOT_CMDLINE_TXT" "$BOOT_CMDLINE_TXT.backup"
|
|
||||||
cp -v "$BOOT_CONFIG_TXT" "$BOOT_CONFIG_TXT.backup"
|
|
||||||
|
|
||||||
working "Disabling automatic root filesystem expansion"
|
|
||||||
echo "Updating: $BOOT_CMDLINE_TXT"
|
|
||||||
cat "$BOOT_CMDLINE_TXT" | sed "s#init=/usr/lib/raspi-config/init_resize.sh##" > temp
|
|
||||||
mv temp "$BOOT_CMDLINE_TXT"
|
|
||||||
|
|
||||||
working "Enabling SSH for first boot"
|
|
||||||
# https://www.raspberrypi.org/documentation/remote-access/ssh/
|
|
||||||
touch "$MOUNTED_BOOT_VOLUME/ssh"
|
|
||||||
|
|
||||||
working "Safely unmounting the card"
|
|
||||||
unmountSdCard
|
|
||||||
|
|
||||||
question "Do initial Pi setup:"
|
|
||||||
echo "* Eject the card"
|
|
||||||
echo "* Connect your Pi to Ethernet"
|
|
||||||
echo "* Boot the Pi from your card"
|
|
||||||
echo "* Make note of the \"My IP address is\" message at the end of boot"
|
|
||||||
echo "Enter the IP address:"
|
|
||||||
read IP
|
|
||||||
|
|
||||||
working "Installing temporary SSH pubkey"
|
|
||||||
echo -e "Password hint: \"raspberry\""
|
|
||||||
ssh "mkdir .ssh && echo '$SSH_PUBKEY' > .ssh/authorized_keys"
|
|
||||||
|
|
||||||
working "Figuring out partition start"
|
|
||||||
ssh "echo -e 'p\nq\n' | sudo fdisk /dev/mmcblk0 | grep /dev/mmcblk0p2 | tr -s ' ' | cut -d ' ' -f 2" > temp
|
|
||||||
START="$(cat temp)"
|
|
||||||
rm temp
|
|
||||||
|
|
||||||
question "Partition start determined to be \"$START\""
|
|
||||||
echo "Should be e.g. \"98304\""
|
|
||||||
echo "(press enter to confirm)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Resizing the root partition"
|
|
||||||
ssh "echo -e 'd\n2\nn\np\n2\n$START\n+${SD_SIZE_REAL}M\ny\nw\n' | sudo fdisk /dev/mmcblk0"
|
|
||||||
|
|
||||||
working "Setting locale"
|
|
||||||
# We want to do this as early as possible, so perl et al won't complain about misconfigured locales for the rest of the image prep
|
|
||||||
ssh "echo $LOCALE | sudo tee /etc/locale.gen"
|
|
||||||
ssh "sudo locale-gen"
|
|
||||||
ssh "echo -e \"LANGUAGE=$LANGUAGE\nLC_ALL=$LANGUAGE\" | sudo tee /etc/environment"
|
|
||||||
|
|
||||||
working "Setting hostname"
|
|
||||||
# We want to do this right before reboot, so we don't get a lot of unnecessary complaints about "sudo: unable to resolve host chilipie-kiosk" (https://askubuntu.com/a/59517)
|
|
||||||
ssh "sudo hostnamectl set-hostname chilipie-kiosk"
|
|
||||||
ssh "sudo perl -i -p0e 's/raspberrypi/chilipie-kiosk/g' /etc/hosts" # "perl" is more cross-platform than "sed -i"
|
|
||||||
|
|
||||||
# From now on, some ssh commands will exit non-0, which should be fine
|
|
||||||
set +e
|
|
||||||
|
|
||||||
working "Rebooting the Pi"
|
|
||||||
ssh "sudo reboot"
|
|
||||||
|
|
||||||
echo "Waiting for host to come back up..."
|
|
||||||
until SSH_CONNECT_TIMEOUT=5 ssh "echo OK"
|
|
||||||
do
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
working "Finishing the root partition resize"
|
|
||||||
ssh "df -h . && sudo resize2fs /dev/mmcblk0p2 && df -h ."
|
|
||||||
|
|
||||||
# From raspi-config: https://github.com/RPi-Distro/raspi-config/blob/d98686647ced7c0c0490dc123432834735d1c13d/raspi-config#L1313-L1321
|
|
||||||
# See also: https://github.com/futurice/chilipie-kiosk/issues/61#issuecomment-524622522
|
|
||||||
working "Enabling auto-login to CLI"
|
|
||||||
ssh "sudo systemctl set-default multi-user.target"
|
|
||||||
ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service"
|
|
||||||
ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty2.service"
|
|
||||||
ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty3.service"
|
|
||||||
ssh "sudo mkdir -p /etc/systemd/system/getty@tty1.service.d"
|
|
||||||
ssh "sudo mkdir -p /etc/systemd/system/getty@tty2.service.d"
|
|
||||||
ssh "sudo mkdir -p /etc/systemd/system/getty@tty3.service.d"
|
|
||||||
ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty1.service.d/autologin.conf"
|
|
||||||
ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty2.service.d/autologin.conf"
|
|
||||||
ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty3.service.d/autologin.conf"
|
|
||||||
|
|
||||||
working "Setting timezone"
|
|
||||||
ssh "(echo '$TIMEZONE' | sudo tee /etc/timezone) && sudo dpkg-reconfigure --frontend noninteractive tzdata"
|
|
||||||
|
|
||||||
working "Setting keyboard layout"
|
|
||||||
ssh "(echo -e 'XKBMODEL="pc105"\nXKBLAYOUT="$KEYBOARD"\nXKBVARIANT=""\nXKBOPTIONS=""\nBACKSPACE="guess"\n' | sudo tee /etc/default/keyboard) && sudo dpkg-reconfigure --frontend noninteractive keyboard-configuration"
|
|
||||||
|
|
||||||
working "Silencing console logins" # this is to avoid a brief flash of the console login before X comes up
|
|
||||||
ssh "sudo rm /etc/profile.d/sshpwd.sh /etc/profile.d/wifi-check.sh" # remove warnings about default password and WiFi country (https://raspberrypi.stackexchange.com/a/105234)
|
|
||||||
ssh "touch .hushlogin" # https://scribles.net/silent-boot-on-raspbian-stretch-in-console-mode/
|
|
||||||
ssh "sudo perl -i -p0e 's#--autologin pi#--skip-login --noissue --login-options \"-f pi\"#g' /etc/systemd/system/getty@tty1.service.d/autologin.conf" # "perl" is more cross-platform than "sed -i"
|
|
||||||
|
|
||||||
working "Installing packages"
|
|
||||||
ssh "sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y vim matchbox-window-manager unclutter mailutils nitrogen jq chromium-browser xserver-xorg xinit rpd-plym-splash xdotool rng-tools xinput-calibrator cec-utils"
|
|
||||||
# We install mailutils just so that you can check "mail" for cronjob output
|
|
||||||
|
|
||||||
working "Setting home directory default content"
|
|
||||||
ssh "rm -rfv /home/pi/*"
|
|
||||||
scp $(find ../home -type f)
|
|
||||||
|
|
||||||
working "Setting splash screen background"
|
|
||||||
ssh "sudo rm /usr/share/plymouth/themes/pix/splash.png && sudo ln -s /home/pi/background.png /usr/share/plymouth/themes/pix/splash.png"
|
|
||||||
|
|
||||||
working "Installing default crontab"
|
|
||||||
ssh "crontab /home/pi/crontab.example"
|
|
||||||
|
|
||||||
working "Rebooting the Pi"
|
|
||||||
ssh "sudo reboot"
|
|
||||||
|
|
||||||
question "Once the Pi has rebooted into Chromium:"
|
|
||||||
echo "* Tell Chromium we don't want to sign in"
|
|
||||||
echo "* Configure Chromium to start \"where you left off\""
|
|
||||||
echo " * F11 to exit full screen"
|
|
||||||
echo " * Alt + F, then S to go to Settings"
|
|
||||||
echo " * Type \"continue\" to filter the options"
|
|
||||||
echo " * Tab to select \"Continue where you left off\""
|
|
||||||
echo "* Navigate to \"file:///home/pi/first-boot.html\""
|
|
||||||
echo "(press enter when ready)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Figuring out software versions"
|
|
||||||
ssh "hostnamectl | grep 'Operating System:' | tr -s ' ' | cut -d ' ' -f 4-" > temp
|
|
||||||
VERSION_LINUX="$(cat temp)"
|
|
||||||
ssh "hostnamectl | grep 'Kernel:' | tr -s ' ' | cut -d ' ' -f 3-4" > temp
|
|
||||||
VERSION_KERNEL="$(cat temp)"
|
|
||||||
ssh "chromium-browser --version | cut -d ' ' -f 1-2" > temp
|
|
||||||
VERSION_CHROMIUM="$(cat temp)"
|
|
||||||
rm temp
|
|
||||||
|
|
||||||
working "Disabling SSH access & restoring safe defaults & shutting down"
|
|
||||||
tempFile="$(ssh mktemp)" # need to do this via a temp file on the host, otherwise disabling SSH while using SSH ends up being problematic
|
|
||||||
ssh "chmod a+x $tempFile"
|
|
||||||
ssh "echo 'rm -f /etc/ssh/ssh_host_*_key*; systemctl enable regenerate_ssh_host_keys; rm .ssh/authorized_keys; systemctl disable ssh; poweroff' > $tempFile"
|
|
||||||
ssh "sudo nohup $tempFile"
|
|
||||||
|
|
||||||
question "Eject the SD card from the Pi, and mount it back to this computer"
|
|
||||||
echo "(press enter when ready)"
|
|
||||||
read
|
|
||||||
|
|
||||||
# We do this again now just to be safe
|
|
||||||
working "Figuring out SD card device"
|
|
||||||
figureOutSdCard
|
|
||||||
|
|
||||||
question "Based on the above, SD card determined to be \"$DISK\""
|
|
||||||
echo "Should be e.g. \"$DISK_SAMPLE\""
|
|
||||||
echo "(press enter to confirm)"
|
|
||||||
read
|
|
||||||
|
|
||||||
working "Making boot quieter (part 1)" # https://scribles.net/customizing-boot-up-screen-on-raspberry-pi/
|
|
||||||
echo "Updating: $BOOT_CONFIG_TXT"
|
|
||||||
perl -i -p0e "s/#disable_overscan=1/disable_overscan=1/g" "$BOOT_CONFIG_TXT" # "perl" is more cross-platform than "sed -i"
|
|
||||||
echo -e "\ndisable_splash=1" >> "$BOOT_CONFIG_TXT"
|
|
||||||
|
|
||||||
working "Making boot quieter (part 2)" # https://scribles.net/customizing-boot-up-screen-on-raspberry-pi/
|
|
||||||
echo "You may want to revert these changes if you ever need to debug the startup process"
|
|
||||||
echo "Updating: $BOOT_CMDLINE_TXT"
|
|
||||||
cat "$BOOT_CMDLINE_TXT" \
|
|
||||||
| sed 's/console=tty1/console=tty3/' \
|
|
||||||
| sed 's/$/ splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0/' \
|
|
||||||
> temp
|
|
||||||
mv temp "$BOOT_CMDLINE_TXT"
|
|
||||||
|
|
||||||
working "Safely unmounting the card"
|
|
||||||
unmountSdCard
|
|
||||||
|
|
||||||
working "Dumping the image from the card"
|
|
||||||
cd ..
|
|
||||||
echo "This may take a long time"
|
|
||||||
echo "You may be prompted for your password by sudo"
|
|
||||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
|
||||||
sudo dd bs=1M count="$SD_SIZE_ZERO" if="$DISK" of="chilipie-kiosk-$TAG.img" status=progress
|
|
||||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
sudo dd bs=1m count="$SD_SIZE_ZERO" if="$DISK" of="chilipie-kiosk-$TAG.img"
|
|
||||||
else
|
|
||||||
echo "Error: Unsupported platform $OSTYPE, sorry" && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
working "Compressing image"
|
|
||||||
COPYFILE_DISABLE=1 tar -zcvf chilipie-kiosk-$TAG.img.tar.gz chilipie-kiosk-$TAG.img
|
|
||||||
|
|
||||||
working "Listing image sizes"
|
|
||||||
du -hs chilipie-kiosk-$TAG.img*
|
|
||||||
|
|
||||||
working "Calculating image hashes"
|
|
||||||
openssl sha1 chilipie-kiosk-$TAG.img*
|
|
||||||
|
|
||||||
working "Software versions are:"
|
|
||||||
echo "* Linux: \`$VERSION_LINUX\`"
|
|
||||||
echo "* Kernel: \`$VERSION_KERNEL\`"
|
|
||||||
echo "* Chromium: \`$VERSION_CHROMIUM\`"
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 109 KiB |
Binary file not shown.
@ -1,33 +0,0 @@
|
|||||||
# Verified models
|
|
||||||
|
|
||||||
These Raspberry Pi models have been verified to work with each image.
|
|
||||||
|
|
||||||
## v2.1.0
|
|
||||||
|
|
||||||
- ❓ Raspberry Pi Model B Revision 1.0
|
|
||||||
- ✅ Raspberry Pi 2 Model B V1.1 (@jareware 2019-04-10 -> 2019-04-12)
|
|
||||||
- ✅ Raspberry Pi 3 Model B V1.2 (@jareware 2019-04-10 -> 2019-04-12)
|
|
||||||
- ✅ Raspberry Pi 2 Model B V1.1 (@chadrien 2019-04-10 -> 2019-04-24)
|
|
||||||
- ✅ Raspberry Pi 3 Model B V1.2 (@chadrien 2019-04-10 -> 2019-04-24)
|
|
||||||
- ✅ Raspberry Pi 3 Model B+ (@chadrien 2019-04-10 -> 2019-04-24)
|
|
||||||
|
|
||||||
## v2.0.0
|
|
||||||
|
|
||||||
- ✅ Raspberry Pi Model B Revision 1.0
|
|
||||||
- ✅ Raspberry Pi 2 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B+
|
|
||||||
|
|
||||||
## v2.0.0-rc2
|
|
||||||
|
|
||||||
- ✅ Raspberry Pi Model B Revision 1.0
|
|
||||||
- ✅ Raspberry Pi 2 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B+
|
|
||||||
|
|
||||||
## v2.0.0-rc1
|
|
||||||
|
|
||||||
- ❓ Raspberry Pi Model B Revision 1.0
|
|
||||||
- ❌ Raspberry Pi 2 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B
|
|
||||||
- ✅ Raspberry Pi 3 Model B+
|
|
||||||
@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# source the user's bashrc if it exists
|
||||||
|
if [ -f "${HOME}/.bashrc" ] ; then
|
||||||
|
source "${HOME}/.bashrc"
|
||||||
|
fi
|
||||||
|
|
||||||
# If this is a tty, and the one where we want to run X, do so
|
# If this is a tty, and the one where we want to run X, do so
|
||||||
if [ "$(tty)" == "/dev/tty1" ]; then
|
if [ "$(tty)" == "/dev/tty1" ]; then
|
||||||
# Redirect any output so it doesn't briefly appear when starting X
|
# Redirect any output so it doesn't briefly appear when starting X
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
3.0.0
|
|
||||||
|
|
||||||
https://github.com/futurice/chilipie-kiosk
|
|
||||||
@ -17,27 +17,39 @@ sudo nitrogen --set-centered background.png
|
|||||||
# Hide cursor afer 5 seconds of inactivity
|
# Hide cursor afer 5 seconds of inactivity
|
||||||
unclutter -idle 5 -root &
|
unclutter -idle 5 -root &
|
||||||
|
|
||||||
# Make sure Chromium profile is marked clean, even if it crashed
|
#Set CrProfile to the value of your startup profile's config folder
|
||||||
if [ -f .config/chromium/Default/Preferences ]; then
|
CrProfile="Default"
|
||||||
cat .config/chromium/Default/Preferences \
|
|
||||||
| jq '.profile.exit_type = "SessionEnded" | .profile.exited_cleanly = true' \
|
HomeFolder="/home/pi"
|
||||||
> .config/chromium/Default/Preferences-clean
|
|
||||||
mv .config/chromium/Default/Preferences{-clean,}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove notes of previous sessions, if any
|
# Remove notes of previous sessions, if any
|
||||||
find .config/chromium/ -name "Last *" -exec rm {} +
|
find .config/chromium/ -name "Last *" -exec rm {} +
|
||||||
|
|
||||||
|
#Delete SingletonLock
|
||||||
|
rm -f $HomeFolder/.config/chromium/SingletonLock
|
||||||
|
rm -f $HomeFolder/.cache/chromium
|
||||||
|
|
||||||
|
#Clean up the randomly-named file(s)
|
||||||
|
for i in $HomeFolder/.config/chromium/$CrProfile/.org.chromium.Chromium.*; do
|
||||||
|
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $i
|
||||||
|
sed -i 's/"exit_state": "Crashed"/"exit_state": "Normal"/' $i
|
||||||
|
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $i
|
||||||
|
done
|
||||||
|
|
||||||
|
#Clean up Preferences
|
||||||
|
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $HomeFolder/.config/chromium/$CrProfile/Preferences
|
||||||
|
sed -i 's/"exit_state": "Crashed"/"exit_state": "Normal"/' $HomeFolder/.config/chromium/$CrProfile/Preferences
|
||||||
|
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $HomeFolder/.config/chromium/$CrProfile/Preferences
|
||||||
|
|
||||||
|
#Clean up Local State
|
||||||
|
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $HomeFolder/.config/chromium/"Local State"
|
||||||
|
|
||||||
# Get URL from file (if set)
|
# Get URL from file (if set)
|
||||||
URL=""
|
URL="file:///home/pi/LICENSE.html"
|
||||||
if [ -f /boot/chilipie_url.txt ]; then
|
standby_enable=0
|
||||||
URL="$(head -n 1 /boot/chilipie_url.txt)"
|
if [ -f /boot/wachalarm_einstellungen.txt ]; then
|
||||||
elif [ -f /home/pi/chilipie_url.txt ]; then
|
source /boot/wachalarm_einstellungen.txt
|
||||||
URL="$(head -n 1 /home/pi/chilipie_url.txt)"
|
URL=$startup_url
|
||||||
fi
|
|
||||||
if [ -n "$URL" ]; then
|
|
||||||
SERIAL="$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2 | xargs)" # Get serial number
|
|
||||||
URL="$(echo $URL | SERIAL=$SERIAL envsubst '$SERIAL')"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start and detach Chromium
|
# Start and detach Chromium
|
||||||
@ -47,7 +59,7 @@ chromium-browser \
|
|||||||
--start-fullscreen \
|
--start-fullscreen \
|
||||||
--window-position=9000,9000 \
|
--window-position=9000,9000 \
|
||||||
--disable-infobars \
|
--disable-infobars \
|
||||||
--check-for-update-interval=1 --simulate-critical-update \
|
--check-for-update-interval=604800 \
|
||||||
$URL &
|
$URL &
|
||||||
# See https://github.com/futurice/chilipie-kiosk/issues/99#issuecomment-597119842 for the need for the fishy-sounding "--check-for-update-interval=1 --simulate-critical-update" switches; TODO: remove when not needed
|
# See https://github.com/futurice/chilipie-kiosk/issues/99#issuecomment-597119842 for the need for the fishy-sounding "--check-for-update-interval=1 --simulate-critical-update" switches; TODO: remove when not needed
|
||||||
|
|
||||||
|
|||||||
164
home/50unattended-upgrades
Normal file
164
home/50unattended-upgrades
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
// Unattended-Upgrade::Origins-Pattern controls which packages are
|
||||||
|
// upgraded.
|
||||||
|
//
|
||||||
|
// Lines below have the format "keyword=value,...". A
|
||||||
|
// package will be upgraded only if the values in its metadata match
|
||||||
|
// all the supplied keywords in a line. (In other words, omitted
|
||||||
|
// keywords are wild cards.) The keywords originate from the Release
|
||||||
|
// file, but several aliases are accepted. The accepted keywords are:
|
||||||
|
// a,archive,suite (eg, "stable")
|
||||||
|
// c,component (eg, "main", "contrib", "non-free")
|
||||||
|
// l,label (eg, "Debian", "Debian-Security")
|
||||||
|
// o,origin (eg, "Debian", "Unofficial Multimedia Packages")
|
||||||
|
// n,codename (eg, "jessie", "jessie-updates")
|
||||||
|
// site (eg, "http.debian.net")
|
||||||
|
// The available values on the system are printed by the command
|
||||||
|
// "apt-cache policy", and can be debugged by running
|
||||||
|
// "unattended-upgrades -d" and looking at the log file.
|
||||||
|
//
|
||||||
|
// Within lines unattended-upgrades allows 2 macros whose values are
|
||||||
|
// derived from /etc/debian_version:
|
||||||
|
// ${distro_id} Installed origin.
|
||||||
|
// ${distro_codename} Installed codename (eg, "buster")
|
||||||
|
Unattended-Upgrade::Origins-Pattern {
|
||||||
|
// Codename based matching:
|
||||||
|
// This will follow the migration of a release through different
|
||||||
|
// archives (e.g. from testing to stable and later oldstable).
|
||||||
|
// Software will be the latest available for the named release,
|
||||||
|
// but the Debian release itself will not be automatically upgraded.
|
||||||
|
// "origin=Debian,codename=${distro_codename}-updates";
|
||||||
|
// "origin=Debian,codename=${distro_codename}-proposed-updates";
|
||||||
|
"origin=Debian,codename=${distro_codename},label=Debian";
|
||||||
|
"origin=Debian,codename=${distro_codename},label=Debian-Security";
|
||||||
|
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
|
||||||
|
|
||||||
|
// Archive or Suite based matching:
|
||||||
|
// Note that this will silently match a different release after
|
||||||
|
// migration to the specified archive (e.g. testing becomes the
|
||||||
|
// new stable).
|
||||||
|
// "o=Debian,a=stable";
|
||||||
|
// "o=Debian,a=stable-updates";
|
||||||
|
// "o=Debian,a=proposed-updates";
|
||||||
|
// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
|
||||||
|
};
|
||||||
|
|
||||||
|
// Python regular expressions, matching packages to exclude from upgrading
|
||||||
|
Unattended-Upgrade::Package-Blacklist {
|
||||||
|
// The following matches all packages starting with linux-
|
||||||
|
// "linux-";
|
||||||
|
|
||||||
|
// Use $ to explicitely define the end of a package name. Without
|
||||||
|
// the $, "libc6" would match all of them.
|
||||||
|
// "libc6$";
|
||||||
|
// "libc6-dev$";
|
||||||
|
// "libc6-i686$";
|
||||||
|
|
||||||
|
// Special characters need escaping
|
||||||
|
// "libstdc\+\+6$";
|
||||||
|
|
||||||
|
// The following matches packages like xen-system-amd64, xen-utils-4.1,
|
||||||
|
// xenstore-utils and libxenstore3.0
|
||||||
|
// "(lib)?xen(store)?";
|
||||||
|
|
||||||
|
// For more information about Python regular expressions, see
|
||||||
|
// https://docs.python.org/3/howto/regex.html
|
||||||
|
};
|
||||||
|
|
||||||
|
// This option allows you to control if on a unclean dpkg exit
|
||||||
|
// unattended-upgrades will automatically run
|
||||||
|
// dpkg --force-confold --configure -a
|
||||||
|
// The default is true, to ensure updates keep getting installed
|
||||||
|
//Unattended-Upgrade::AutoFixInterruptedDpkg "true";
|
||||||
|
|
||||||
|
// Split the upgrade into the smallest possible chunks so that
|
||||||
|
// they can be interrupted with SIGTERM. This makes the upgrade
|
||||||
|
// a bit slower but it has the benefit that shutdown while a upgrade
|
||||||
|
// is running is possible (with a small delay)
|
||||||
|
//Unattended-Upgrade::MinimalSteps "true";
|
||||||
|
|
||||||
|
// Install all updates when the machine is shutting down
|
||||||
|
// instead of doing it in the background while the machine is running.
|
||||||
|
// This will (obviously) make shutdown slower.
|
||||||
|
// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s.
|
||||||
|
// This allows more time for unattended-upgrades to shut down gracefully
|
||||||
|
// or even install a few packages in InstallOnShutdown mode, but is still a
|
||||||
|
// big step back from the 30 minutes allowed for InstallOnShutdown previously.
|
||||||
|
// Users enabling InstallOnShutdown mode are advised to increase
|
||||||
|
// InhibitDelayMaxSec even further, possibly to 30 minutes.
|
||||||
|
//Unattended-Upgrade::InstallOnShutdown "false";
|
||||||
|
|
||||||
|
// Send email to this address for problems or packages upgrades
|
||||||
|
// If empty or unset then no email is sent, make sure that you
|
||||||
|
// have a working mail setup on your system. A package that provides
|
||||||
|
// 'mailx' must be installed. E.g. "user@example.com"
|
||||||
|
//Unattended-Upgrade::Mail "";
|
||||||
|
|
||||||
|
// Set this value to one of:
|
||||||
|
// "always", "only-on-error" or "on-change"
|
||||||
|
// If this is not set, then any legacy MailOnlyOnError (boolean) value
|
||||||
|
// is used to chose between "only-on-error" and "on-change"
|
||||||
|
//Unattended-Upgrade::MailReport "on-change";
|
||||||
|
|
||||||
|
// Remove unused automatically installed kernel-related packages
|
||||||
|
// (kernel images, kernel headers and kernel version locked tools).
|
||||||
|
//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
|
||||||
|
|
||||||
|
// Do automatic removal of newly unused dependencies after the upgrade
|
||||||
|
//Unattended-Upgrade::Remove-New-Unused-Dependencies "true";
|
||||||
|
|
||||||
|
// Do automatic removal of unused packages after the upgrade
|
||||||
|
// (equivalent to apt-get autoremove)
|
||||||
|
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
|
||||||
|
|
||||||
|
// Automatically reboot *WITHOUT CONFIRMATION* if
|
||||||
|
// the file /var/run/reboot-required is found after the upgrade
|
||||||
|
Unattended-Upgrade::Automatic-Reboot "true";
|
||||||
|
|
||||||
|
// Automatically reboot even if there are users currently logged in
|
||||||
|
// when Unattended-Upgrade::Automatic-Reboot is set to true
|
||||||
|
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
|
||||||
|
|
||||||
|
// If automatic reboot is enabled and needed, reboot at the specific
|
||||||
|
// time instead of immediately
|
||||||
|
// Default: "now"
|
||||||
|
Unattended-Upgrade::Automatic-Reboot-Time "02:00";
|
||||||
|
|
||||||
|
// Use apt bandwidth limit feature, this example limits the download
|
||||||
|
// speed to 70kb/sec
|
||||||
|
//Acquire::http::Dl-Limit "70";
|
||||||
|
|
||||||
|
// Enable logging to syslog. Default is False
|
||||||
|
// Unattended-Upgrade::SyslogEnable "false";
|
||||||
|
|
||||||
|
// Specify syslog facility. Default is daemon
|
||||||
|
// Unattended-Upgrade::SyslogFacility "daemon";
|
||||||
|
|
||||||
|
// Download and install upgrades only on AC power
|
||||||
|
// (i.e. skip or gracefully stop updates on battery)
|
||||||
|
// Unattended-Upgrade::OnlyOnACPower "true";
|
||||||
|
|
||||||
|
// Download and install upgrades only on non-metered connection
|
||||||
|
// (i.e. skip or gracefully stop updates on a metered connection)
|
||||||
|
// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true";
|
||||||
|
|
||||||
|
// Verbose logging
|
||||||
|
// Unattended-Upgrade::Verbose "false";
|
||||||
|
|
||||||
|
// Print debugging information both in unattended-upgrades and
|
||||||
|
// in unattended-upgrade-shutdown
|
||||||
|
// Unattended-Upgrade::Debug "false";
|
||||||
|
|
||||||
|
// Allow package downgrade if Pin-Priority exceeds 1000
|
||||||
|
// Unattended-Upgrade::Allow-downgrade "false";
|
||||||
|
|
||||||
|
// When APT fails to mark a package to be upgraded or installed try adjusting
|
||||||
|
// candidates of related packages to help APT's resolver in finding a solution
|
||||||
|
// where the package can be upgraded or installed.
|
||||||
|
// This is a workaround until APT's resolver is fixed to always find a
|
||||||
|
// solution if it exists. (See Debian bug #711128.)
|
||||||
|
// The fallback is enabled by default, except on Debian's sid release because
|
||||||
|
// uninstallable packages are frequent there.
|
||||||
|
// Disabling the fallback speeds up unattended-upgrades when there are
|
||||||
|
// uninstallable packages at the expense of rarely keeping back packages which
|
||||||
|
// could be upgraded or installed.
|
||||||
|
// Unattended-Upgrade::Allow-APT-Mark-Fallback "true";
|
||||||
120
home/LICENSE.html
Normal file
120
home/LICENSE.html
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<h2 id="creative-commons">creative commons</h2>
|
||||||
|
<h1 id="attribution-sharealike-4.0-international">Attribution-ShareAlike 4.0 International</h1>
|
||||||
|
<p>Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.</p>
|
||||||
|
<h3 id="using-creative-commons-public-licenses">Using Creative Commons Public Licenses</h3>
|
||||||
|
<p>Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.</p>
|
||||||
|
<ul>
|
||||||
|
<li><p><strong>Considerations for licensors:</strong> Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. <a href="http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors">More considerations for licensors</a>.</p></li>
|
||||||
|
<li><p><strong>Considerations for the public:</strong> By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. <a href="http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees">More considerations for the public</a>.</p></li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="creative-commons-attribution-sharealike-4.0-international-public-license">Creative Commons Attribution-ShareAlike 4.0 International Public License</h2>
|
||||||
|
<p>By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License (“Public License”). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.</p>
|
||||||
|
<h3 id="section-1-definitions.">Section 1 – Definitions.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p><strong>Adapted Material</strong> means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.</p></li>
|
||||||
|
<li><p><strong>Adapter’s License</strong> means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.</p></li>
|
||||||
|
<li><p><strong>BY-SA Compatible License</strong> means a license listed at <a href="http://creativecommons.org/compatiblelicenses">creativecommons.org/compatiblelicenses</a>, approved by Creative Commons as essentially the equivalent of this Public License.</p></li>
|
||||||
|
<li><p><strong>Copyright and Similar Rights</strong> means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.</p></li>
|
||||||
|
<li><p><strong>Effective Technological Measures</strong> means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.</p></li>
|
||||||
|
<li><p><strong>Exceptions and Limitations</strong> means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.</p></li>
|
||||||
|
<li><p><strong>License Elements</strong> means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.</p></li>
|
||||||
|
<li><p><strong>Licensed Material</strong> means the artistic or literary work, database, or other material to which the Licensor applied this Public License.</p></li>
|
||||||
|
<li><p><strong>Licensed Rights</strong> means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.</p></li>
|
||||||
|
<li><p><strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public License.</p></li>
|
||||||
|
<li><p><strong>Share</strong> means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.</p></li>
|
||||||
|
<li><p><strong>Sui Generis Database Rights</strong> means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.</p></li>
|
||||||
|
<li><p><strong>You</strong> means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.</p></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-2-scope.">Section 2 – Scope.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p><strong><em>License grant.</em></strong></p>
|
||||||
|
<ol type="1">
|
||||||
|
<li><p>Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:</p>
|
||||||
|
<p>A. reproduce and Share the Licensed Material, in whole or in part; and</p>
|
||||||
|
<p>B. produce, reproduce, and Share Adapted Material.</p></li>
|
||||||
|
<li><p><strong>Exceptions and Limitations.</strong> For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.</p></li>
|
||||||
|
<li><p><strong>Term.</strong> The term of this Public License is specified in Section 6(a).</p></li>
|
||||||
|
<li><p><strong>Media and formats; technical modifications allowed.</strong> The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.</p></li>
|
||||||
|
<li><p><strong>Downstream recipients.</strong></p>
|
||||||
|
<p>A. <strong>Offer from the Licensor – Licensed Material.</strong> Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.</p>
|
||||||
|
<p>B. __Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.</p>
|
||||||
|
<p>C. <strong>No downstream restrictions.</strong> You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.</p></li>
|
||||||
|
<li><p><strong>No endorsement.</strong> Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).</p></li>
|
||||||
|
</ol></li>
|
||||||
|
<li><p><strong><em>Other rights.</em></strong></p>
|
||||||
|
<ol type="1">
|
||||||
|
<li><p>Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.</p></li>
|
||||||
|
<li><p>Patent and trademark rights are not licensed under this Public License.</p></li>
|
||||||
|
<li><p>To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.</p></li>
|
||||||
|
</ol></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-3-license-conditions.">Section 3 – License Conditions.</h3>
|
||||||
|
<p>Your exercise of the Licensed Rights is expressly made subject to the following conditions.</p>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p><strong><em>Attribution.</em></strong></p>
|
||||||
|
<ol type="1">
|
||||||
|
<li><p>If You Share the Licensed Material (including in modified form), You must:</p>
|
||||||
|
<p>A. retain the following if it is supplied by the Licensor with the Licensed Material:</p>
|
||||||
|
<pre><code> i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||||
|
|
||||||
|
ii. a copyright notice;
|
||||||
|
|
||||||
|
iii. a notice that refers to this Public License;
|
||||||
|
|
||||||
|
iv. a notice that refers to the disclaimer of warranties;
|
||||||
|
|
||||||
|
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;</code></pre>
|
||||||
|
<p>B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and</p>
|
||||||
|
<p>C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.</p></li>
|
||||||
|
<li><p>You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.</p></li>
|
||||||
|
<li><p>If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.</p></li>
|
||||||
|
</ol></li>
|
||||||
|
<li><p><strong><em>ShareAlike.</em></strong></p></li>
|
||||||
|
</ol>
|
||||||
|
<p>In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.</p>
|
||||||
|
<ol type="1">
|
||||||
|
<li><p>The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.</p></li>
|
||||||
|
<li><p>You must include the text of, or the URI or hyperlink to, the Adapter’s License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.</p></li>
|
||||||
|
<li><p>You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter’s License You apply.</p></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-4-sui-generis-database-rights.">Section 4 – Sui Generis Database Rights.</h3>
|
||||||
|
<p>Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:</p>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p>for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;</p></li>
|
||||||
|
<li><p>if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and</p></li>
|
||||||
|
<li><p>You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.</p></li>
|
||||||
|
</ol>
|
||||||
|
<p>For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.</p>
|
||||||
|
<h3 id="section-5-disclaimer-of-warranties-and-limitation-of-liability.">Section 5 – Disclaimer of Warranties and Limitation of Liability.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p><strong>Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.</strong></p></li>
|
||||||
|
<li><p><strong>To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.</strong></p></li>
|
||||||
|
<li><p>The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.</p></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-6-term-and-termination.">Section 6 – Term and Termination.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p>This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.</p></li>
|
||||||
|
<li><p>Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:</p>
|
||||||
|
<ol type="1">
|
||||||
|
<li><p>automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or</p></li>
|
||||||
|
<li><p>upon express reinstatement by the Licensor.</p></li>
|
||||||
|
</ol>
|
||||||
|
<p>For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.</p></li>
|
||||||
|
<li><p>For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.</p></li>
|
||||||
|
<li><p>Sections 1, 5, 6, 7, and 8 survive termination of this Public License.</p></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-7-other-terms-and-conditions.">Section 7 – Other Terms and Conditions.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p>The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.</p></li>
|
||||||
|
<li><p>Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.t stated herein are separate from and independent of the terms and conditions of this Public License.</p></li>
|
||||||
|
</ol>
|
||||||
|
<h3 id="section-8-interpretation.">Section 8 – Interpretation.</h3>
|
||||||
|
<ol type="a">
|
||||||
|
<li><p>For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.</p></li>
|
||||||
|
<li><p>To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.</p></li>
|
||||||
|
<li><p>No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.</p></li>
|
||||||
|
<li><p>Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.</p></li>
|
||||||
|
</ol>
|
||||||
|
<pre><code>Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at creativecommons.org</code></pre>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 170 KiB |
@ -10,8 +10,17 @@ DISPLAY=:0.0
|
|||||||
# │ │ │ │ │
|
# │ │ │ │ │
|
||||||
# * * * * * command to execute
|
# * * * * * command to execute
|
||||||
|
|
||||||
|
# Skripte nach dem Start ausfuhren
|
||||||
|
|
||||||
|
@reboot sleep 55 && ~/start_mouse_click.sh >/dev/null 2>&1
|
||||||
|
@reboot sleep 60 && ~/start_waip_standby.sh >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Statusmeldung alle 10 Minuten
|
||||||
|
|
||||||
|
10 * * * * ~/report_system.sh >/dev/null 2>&1
|
||||||
|
|
||||||
# Reboot the Pi every night at 3 AM to ensure smooth operation
|
# Reboot the Pi every night at 3 AM to ensure smooth operation
|
||||||
0 3 * * * sudo reboot
|
# 0 3 * * * sudo reboot
|
||||||
|
|
||||||
# Example: Turn display on weekdays at 7 AM
|
# Example: Turn display on weekdays at 7 AM
|
||||||
# Note: You may exchange "display-on" / "display-off" with "cec-on" / "cec-off" in order to use HDMI CEC
|
# Note: You may exchange "display-on" / "display-off" with "cec-on" / "cec-off" in order to use HDMI CEC
|
||||||
|
|||||||
@ -1,956 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
|
|
||||||
<title>Welcome to chilipie-kiosk</title>
|
|
||||||
<style>@font-face {
|
|
||||||
font-family: octicons-anchor;
|
|
||||||
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: white;
|
|
||||||
max-width: 790px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 30px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body {
|
|
||||||
-ms-text-size-adjust: 100%;
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
color: #333;
|
|
||||||
overflow: hidden;
|
|
||||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.6;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body a {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body a:active,
|
|
||||||
.markdown-body a:hover {
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
margin: 0.67em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body img {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body hr {
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body code,
|
|
||||||
.markdown-body kbd,
|
|
||||||
.markdown-body pre {
|
|
||||||
font-family: monospace, monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body input {
|
|
||||||
color: inherit;
|
|
||||||
font: inherit;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body html input[disabled] {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body input {
|
|
||||||
line-height: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body input[type="checkbox"] {
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body td,
|
|
||||||
.markdown-body th {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body * {
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body input {
|
|
||||||
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body a {
|
|
||||||
color: #4183c4;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body a:hover,
|
|
||||||
.markdown-body a:focus,
|
|
||||||
.markdown-body a:active {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body hr {
|
|
||||||
height: 0;
|
|
||||||
margin: 15px 0;
|
|
||||||
overflow: hidden;
|
|
||||||
background: transparent;
|
|
||||||
border: 0;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body hr:before {
|
|
||||||
display: table;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body hr:after {
|
|
||||||
display: table;
|
|
||||||
clear: both;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1,
|
|
||||||
.markdown-body h2,
|
|
||||||
.markdown-body h3,
|
|
||||||
.markdown-body h4,
|
|
||||||
.markdown-body h5,
|
|
||||||
.markdown-body h6 {
|
|
||||||
margin-top: 15px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
line-height: 1.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1 {
|
|
||||||
font-size: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h2 {
|
|
||||||
font-size: 21px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h3 {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h4 {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h5 {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h6 {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body blockquote {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body ul,
|
|
||||||
.markdown-body ol {
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body ol ol,
|
|
||||||
.markdown-body ul ol {
|
|
||||||
list-style-type: lower-roman;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body ul ul ol,
|
|
||||||
.markdown-body ul ol ol,
|
|
||||||
.markdown-body ol ul ol,
|
|
||||||
.markdown-body ol ol ol {
|
|
||||||
list-style-type: lower-alpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body dd {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body code {
|
|
||||||
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body kbd {
|
|
||||||
background-color: #e7e7e7;
|
|
||||||
background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
|
|
||||||
background-image: linear-gradient(#fefefe, #e7e7e7);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 1px solid #cfcfcf;
|
|
||||||
color: #000;
|
|
||||||
padding: 3px 5px;
|
|
||||||
line-height: 10px;
|
|
||||||
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body>*:first-child {
|
|
||||||
margin-top: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body>*:last-child {
|
|
||||||
margin-bottom: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .anchor {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
display: block;
|
|
||||||
padding-right: 6px;
|
|
||||||
padding-left: 30px;
|
|
||||||
margin-left: -30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .anchor:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1,
|
|
||||||
.markdown-body h2,
|
|
||||||
.markdown-body h3,
|
|
||||||
.markdown-body h4,
|
|
||||||
.markdown-body h5,
|
|
||||||
.markdown-body h6 {
|
|
||||||
position: relative;
|
|
||||||
margin-top: 1em;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1 .octicon-link,
|
|
||||||
.markdown-body h2 .octicon-link,
|
|
||||||
.markdown-body h3 .octicon-link,
|
|
||||||
.markdown-body h4 .octicon-link,
|
|
||||||
.markdown-body h5 .octicon-link,
|
|
||||||
.markdown-body h6 .octicon-link {
|
|
||||||
display: none;
|
|
||||||
color: #000;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1:hover .anchor,
|
|
||||||
.markdown-body h2:hover .anchor,
|
|
||||||
.markdown-body h3:hover .anchor,
|
|
||||||
.markdown-body h4:hover .anchor,
|
|
||||||
.markdown-body h5:hover .anchor,
|
|
||||||
.markdown-body h6:hover .anchor {
|
|
||||||
height: 1em;
|
|
||||||
padding-left: 8px;
|
|
||||||
margin-left: -30px;
|
|
||||||
line-height: 1;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1:hover .anchor .octicon-link,
|
|
||||||
.markdown-body h2:hover .anchor .octicon-link,
|
|
||||||
.markdown-body h3:hover .anchor .octicon-link,
|
|
||||||
.markdown-body h4:hover .anchor .octicon-link,
|
|
||||||
.markdown-body h5:hover .anchor .octicon-link,
|
|
||||||
.markdown-body h6:hover .anchor .octicon-link {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1 {
|
|
||||||
padding-bottom: 0.3em;
|
|
||||||
font-size: 2.25em;
|
|
||||||
line-height: 1.2;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h2 {
|
|
||||||
padding-bottom: 0.3em;
|
|
||||||
font-size: 1.75em;
|
|
||||||
line-height: 1.225;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h3 {
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 1.43;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h4 {
|
|
||||||
font-size: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h5 {
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h6 {
|
|
||||||
font-size: 1em;
|
|
||||||
color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body p,
|
|
||||||
.markdown-body blockquote,
|
|
||||||
.markdown-body ul,
|
|
||||||
.markdown-body ol,
|
|
||||||
.markdown-body dl,
|
|
||||||
.markdown-body table,
|
|
||||||
.markdown-body pre {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body hr {
|
|
||||||
height: 4px;
|
|
||||||
padding: 0;
|
|
||||||
margin: 16px 0;
|
|
||||||
background-color: #e7e7e7;
|
|
||||||
border: 0 none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body ul,
|
|
||||||
.markdown-body ol {
|
|
||||||
padding-left: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body ul ul,
|
|
||||||
.markdown-body ul ol,
|
|
||||||
.markdown-body ol ol,
|
|
||||||
.markdown-body ol ul {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body li>p {
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body dl {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body dl dt {
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 16px;
|
|
||||||
font-size: 1em;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body dl dd {
|
|
||||||
padding: 0 16px;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body blockquote {
|
|
||||||
padding: 0 15px;
|
|
||||||
color: #777;
|
|
||||||
border-left: 4px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body blockquote>:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body blockquote>:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
word-break: normal;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table th {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table th,
|
|
||||||
.markdown-body table td {
|
|
||||||
padding: 6px 13px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table tr {
|
|
||||||
background-color: #fff;
|
|
||||||
border-top: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body table tr:nth-child(2n) {
|
|
||||||
background-color: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body img {
|
|
||||||
max-width: 100%;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body code {
|
|
||||||
padding: 0;
|
|
||||||
padding-top: 0.2em;
|
|
||||||
padding-bottom: 0.2em;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 85%;
|
|
||||||
background-color: rgba(0,0,0,0.04);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body code:before,
|
|
||||||
.markdown-body code:after {
|
|
||||||
letter-spacing: -0.2em;
|
|
||||||
content: "\00a0";
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre>code {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 100%;
|
|
||||||
word-break: normal;
|
|
||||||
white-space: pre;
|
|
||||||
background: transparent;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight pre,
|
|
||||||
.markdown-body pre {
|
|
||||||
padding: 16px;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 85%;
|
|
||||||
line-height: 1.45;
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight pre {
|
|
||||||
margin-bottom: 0;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre {
|
|
||||||
word-wrap: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre code {
|
|
||||||
display: inline;
|
|
||||||
max-width: initial;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
overflow: initial;
|
|
||||||
line-height: inherit;
|
|
||||||
word-wrap: normal;
|
|
||||||
background-color: transparent;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body pre code:before,
|
|
||||||
.markdown-body pre code:after {
|
|
||||||
content: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .mf,
|
|
||||||
.markdown-body .highlight .mh,
|
|
||||||
.markdown-body .highlight .mi,
|
|
||||||
.markdown-body .highlight .mo,
|
|
||||||
.markdown-body .highlight .il,
|
|
||||||
.markdown-body .highlight .m {
|
|
||||||
color: #945277;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .s,
|
|
||||||
.markdown-body .highlight .sb,
|
|
||||||
.markdown-body .highlight .sc,
|
|
||||||
.markdown-body .highlight .sd,
|
|
||||||
.markdown-body .highlight .s2,
|
|
||||||
.markdown-body .highlight .se,
|
|
||||||
.markdown-body .highlight .sh,
|
|
||||||
.markdown-body .highlight .si,
|
|
||||||
.markdown-body .highlight .sx,
|
|
||||||
.markdown-body .highlight .s1 {
|
|
||||||
color: #df5000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .kc,
|
|
||||||
.markdown-body .highlight .kd,
|
|
||||||
.markdown-body .highlight .kn,
|
|
||||||
.markdown-body .highlight .kp,
|
|
||||||
.markdown-body .highlight .kr,
|
|
||||||
.markdown-body .highlight .kt,
|
|
||||||
.markdown-body .highlight .k,
|
|
||||||
.markdown-body .highlight .o {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .kt {
|
|
||||||
color: #458;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .c,
|
|
||||||
.markdown-body .highlight .cm,
|
|
||||||
.markdown-body .highlight .c1 {
|
|
||||||
color: #998;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .cp,
|
|
||||||
.markdown-body .highlight .cs {
|
|
||||||
color: #999;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .cs {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .n {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .na,
|
|
||||||
.markdown-body .highlight .nv,
|
|
||||||
.markdown-body .highlight .vc,
|
|
||||||
.markdown-body .highlight .vg,
|
|
||||||
.markdown-body .highlight .vi {
|
|
||||||
color: #008080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .nb {
|
|
||||||
color: #0086B3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .nc {
|
|
||||||
color: #458;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .no {
|
|
||||||
color: #094e99;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .ni {
|
|
||||||
color: #800080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .ne {
|
|
||||||
color: #990000;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .nf {
|
|
||||||
color: #945277;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .nn {
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .nt {
|
|
||||||
color: #000080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .err {
|
|
||||||
color: #a61717;
|
|
||||||
background-color: #e3d2d2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gd {
|
|
||||||
color: #000;
|
|
||||||
background-color: #fdd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gd .x {
|
|
||||||
color: #000;
|
|
||||||
background-color: #faa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .ge {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gr {
|
|
||||||
color: #aa0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gh {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gi {
|
|
||||||
color: #000;
|
|
||||||
background-color: #dfd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gi .x {
|
|
||||||
color: #000;
|
|
||||||
background-color: #afa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .go {
|
|
||||||
color: #888;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gp {
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gs {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gu {
|
|
||||||
color: #800080;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gt {
|
|
||||||
color: #aa0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .ow {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .w {
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .sr {
|
|
||||||
color: #017936;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .ss {
|
|
||||||
color: #8b467f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .bp {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .highlight .gc {
|
|
||||||
color: #999;
|
|
||||||
background-color: #EAF2F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .octicon {
|
|
||||||
font: normal normal 16px octicons-anchor;
|
|
||||||
line-height: 1;
|
|
||||||
display: inline-block;
|
|
||||||
text-decoration: none;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .octicon-link:before {
|
|
||||||
content: '\f05c';
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .task-list-item {
|
|
||||||
list-style-type: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .task-list-item+.task-list-item {
|
|
||||||
margin-top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .task-list-item input {
|
|
||||||
float: left;
|
|
||||||
margin: 0.3em 0 0.25em -1.6em;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 43.75em) {
|
|
||||||
body {
|
|
||||||
padding: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style>/* needed because the container has overflow: hidden, but the pilcrows overflow */
|
|
||||||
.markdown-body {
|
|
||||||
padding-left: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1,
|
|
||||||
.markdown-body h2,
|
|
||||||
.markdown-body h3,
|
|
||||||
.markdown-body h4,
|
|
||||||
.markdown-body h5,
|
|
||||||
.markdown-body h6 {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1:hover .header-link:before,
|
|
||||||
.markdown-body h2:hover .header-link:before,
|
|
||||||
.markdown-body h3:hover .header-link:before,
|
|
||||||
.markdown-body h4:hover .header-link:before,
|
|
||||||
.markdown-body h5:hover .header-link:before,
|
|
||||||
.markdown-body h6:hover .header-link:before {
|
|
||||||
content: "\00B6";/* pilcrow */
|
|
||||||
color: #888;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .header-link {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: -0.7em;
|
|
||||||
display: block;
|
|
||||||
padding-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body h1:hover .header-link,
|
|
||||||
.markdown-body h2:hover .header-link,
|
|
||||||
.markdown-body h3:hover .header-link,
|
|
||||||
.markdown-body h4:hover .header-link,
|
|
||||||
.markdown-body h5:hover .header-link,
|
|
||||||
.markdown-body h6:hover .header-link {
|
|
||||||
display: inline-block;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style>/*
|
|
||||||
|
|
||||||
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
display: block;
|
|
||||||
overflow-x: auto;
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #333;
|
|
||||||
background: #f8f8f8;
|
|
||||||
-webkit-text-size-adjust: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-comment,
|
|
||||||
.diff .hljs-header,
|
|
||||||
.hljs-javadoc {
|
|
||||||
color: #998;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.css .rule .hljs-keyword,
|
|
||||||
.hljs-winutils,
|
|
||||||
.nginx .hljs-title,
|
|
||||||
.hljs-subst,
|
|
||||||
.hljs-request,
|
|
||||||
.hljs-status {
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-number,
|
|
||||||
.hljs-hexcolor,
|
|
||||||
.ruby .hljs-constant {
|
|
||||||
color: #008080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-tag .hljs-value,
|
|
||||||
.hljs-phpdoc,
|
|
||||||
.hljs-dartdoc,
|
|
||||||
.tex .hljs-formula {
|
|
||||||
color: #d14;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-title,
|
|
||||||
.hljs-id,
|
|
||||||
.scss .hljs-preprocessor {
|
|
||||||
color: #900;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-list .hljs-keyword,
|
|
||||||
.hljs-subst {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-class .hljs-title,
|
|
||||||
.hljs-type,
|
|
||||||
.vhdl .hljs-literal,
|
|
||||||
.tex .hljs-command {
|
|
||||||
color: #458;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-tag,
|
|
||||||
.hljs-tag .hljs-title,
|
|
||||||
.hljs-rules .hljs-property,
|
|
||||||
.django .hljs-tag .hljs-keyword {
|
|
||||||
color: #000080;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-attribute,
|
|
||||||
.hljs-variable,
|
|
||||||
.lisp .hljs-body {
|
|
||||||
color: #008080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-regexp {
|
|
||||||
color: #009926;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-symbol,
|
|
||||||
.ruby .hljs-symbol .hljs-string,
|
|
||||||
.lisp .hljs-keyword,
|
|
||||||
.clojure .hljs-keyword,
|
|
||||||
.scheme .hljs-keyword,
|
|
||||||
.tex .hljs-special,
|
|
||||||
.hljs-prompt {
|
|
||||||
color: #990073;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-built_in {
|
|
||||||
color: #0086b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-preprocessor,
|
|
||||||
.hljs-pragma,
|
|
||||||
.hljs-pi,
|
|
||||||
.hljs-doctype,
|
|
||||||
.hljs-shebang,
|
|
||||||
.hljs-cdata {
|
|
||||||
color: #999;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
background: #fdd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
background: #dfd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff .hljs-change {
|
|
||||||
background: #0086b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-chunk {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<article class="markdown-body"><h1 id="welcome-to-chilipie-kiosk"><a class="header-link" href="#welcome-to-chilipie-kiosk"></a>Welcome to chilipie-kiosk</h1>
|
|
||||||
<p><strong>Looks like this is your first boot!</strong></p>
|
|
||||||
<p>This document lists some things you can do to customize your kiosk. You'll need to plug in a keyboard for this initial setup, but after that, it's perfectly fine to leave the kiosk running without any peripherals plugged in.</p>
|
|
||||||
<h2 id="setting-the-url"><a class="header-link" href="#setting-the-url"></a>Setting the URL</h2>
|
|
||||||
<p>Press <code>F11</code> to exit the full screen mode, and <code>Ctrl + L</code> to focus the location bar. Navigate away! Once done, press <code>F11</code> again to re-enter full screen mode.</p>
|
|
||||||
<p>Chromium is configured to remember the URL where you left off (and all logins, etc), so this might be all the configuration you need to do!</p>
|
|
||||||
<h2 id="system-configuration"><a class="header-link" href="#system-configuration"></a>System configuration</h2>
|
|
||||||
<p>You can access the <code>raspi-config</code> utility by pressing <code>Ctrl + Alt + F2</code>. With it, you can do things like:</p>
|
|
||||||
<ul class="list">
|
|
||||||
<li>Join a WiFi network</li>
|
|
||||||
<li>Change your keyboard layout</li>
|
|
||||||
<li>Change the system timezone</li>
|
|
||||||
<li>Enable SSH access (it's disabled by default for security reasons)</li>
|
|
||||||
<li>Change the password (see above)</li>
|
|
||||||
</ul>
|
|
||||||
<p>Pressing <code>Ctrl + Alt + F1</code> takes you back to Chromium.</p>
|
|
||||||
<h2 id="automating-things"><a class="header-link" href="#automating-things"></a>Automating things</h2>
|
|
||||||
<p>There's a few commonly useful snippets already on the crontab, such as:</p>
|
|
||||||
<ul class="list">
|
|
||||||
<li><strong>Rebooting the Pi every night at 3 AM</strong>. If you run resource intensive pages on your dashboard, the Pi can eventually start to slow down. A nightly reboot keeps it rested and refreshed! This is enabled by default.</li>
|
|
||||||
<li><strong>Turning the display off for the night</strong>. This helps save energy when there's no-one there to look at your dashboard. Sometimes also useful for reasons of vanity, when bright displays in the middle of a dark office would look ridiculous. Do make sure your display/television comes back on, however: especially older TV's sometimes won't know to automatically turn back on when the HDMI signal comes back on. In those cases, you may have luck with <a href="https://timleland.com/raspberry-pi-turn-tv-onoff-cec/">CEC signals</a>, but also you may not. If nothing else works, you can always just <a href="https://askubuntu.com/a/7299">blank the display</a>.</li>
|
|
||||||
<li><strong>Automatically reloading the active page every hour</strong>. If the page you're displaying doesn't automatically update itself, this is effectively the same as hitting <code>Ctrl + R</code> every hour. Very crude. Very effective.</li>
|
|
||||||
<li><strong>Cycling between open tabs every 5 minutes</strong>. Same as above, but for <code>Ctrl + Tab</code>. Note that if you use both at the same time, you can combine them, to send the reload command <em>just before</em> sending the tab cycle command. This causes the pages to reload while they're in the background, so the user never sees it happening.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Press <code>Ctrl + Alt + F3</code> to get to a virtual terminal, use <code>crontab -e</code> to check these out, enable the ones you want, or customize them to your heart's content.</p>
|
|
||||||
<p>Again, pressing <code>Ctrl + Alt + F1</code> takes you back to Chromium.</p>
|
|
||||||
<h2 id="customizing-chromium"><a class="header-link" href="#customizing-chromium"></a>Customizing Chromium</h2>
|
|
||||||
<p>Because you're running a fully-featured Chromium, you can customize it further by <a href="https://chrome.google.com/webstore/category/extensions">installing browser extensions</a>. For example:</p>
|
|
||||||
<ul class="list">
|
|
||||||
<li><strong><a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Tampermonkey</a></strong> can be useful for injecting custom JS or CSS to a page you're displaying.</li>
|
|
||||||
<li><strong><a href="https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe">Ignore X-Frame headers</a></strong> can help you if you need to <code><iframe></code> a site that doesn't want to be framed.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Finally, further tweaks can be made by changing the <a href="https://peter.sh/experiments/chromium-command-line-switches/">Chromium command line switches</a> in <code>~/.xsession</code>. For example:</p>
|
|
||||||
<pre class="hljs"><code>--unsafely-treat-insecure-origin-as-secure=http:<span class="hljs-regexp">//</span>shady.example.com,http:<span class="hljs-regexp">//</span>another.example.com --user-data-dir=<span class="hljs-regexp">/home/</span>pi<span class="hljs-regexp">/.config/</span>chromium</code></pre><p>Adding these options will allow you to mix secure (i.e. HTTPS) origins with insecure ones (you need to specifically white-list them). Sometimes you need stuff like this to pull together all the bits and pieces of your dashboard from different origins. We're not saying you should. But you can.</p>
|
|
||||||
<h2 id="controlling-the-kiosk-remotely"><a class="header-link" href="#controlling-the-kiosk-remotely"></a>Controlling the kiosk remotely</h2>
|
|
||||||
<p>Sometimes you need to do basic remote adjustments, like changing the URL that's displayed.</p>
|
|
||||||
<ul class="list">
|
|
||||||
<li>If you need a lot of flexibility, <a href="https://github.com/futurice/chilipie-kiosk/issues/38#issuecomment-442031274">you can install VNC</a> to get a full remote desktop</li>
|
|
||||||
<li>If you just need to set the URL, you can SSH over (not enabled by default; see above), and e.g. <a href="https://github.com/futurice/chilipie-kiosk/issues/71#issuecomment-522035239">run something like</a>: <code>export DISPLAY=:0; xdotool key F11 sleep 1 key ctrl+l sleep 1 type 'https://google.com'; xdotool sleep 1 key KP_Enter; xdotool key F11</code>. Very crude. Very effective.</li>
|
|
||||||
</ul>
|
|
||||||
<h2 id="username-and-password"><a class="header-link" href="#username-and-password"></a>Username and password</h2>
|
|
||||||
<p>If you need to login to a shell, the default username and password are <code>pi</code> and <code>raspberry</code>, as is tradition for Raspberry Pi. The <code>pi</code> user also has <code>sudo</code> access.</p>
|
|
||||||
<h2 id="adjusting-your-resolution"><a class="header-link" href="#adjusting-your-resolution"></a>Adjusting your resolution</h2>
|
|
||||||
<p>If the display auto-detection fails and chooses a funky default resolution for you, <a href="https://www.opentechguides.com/how-to/article/raspberry-pi/28/raspi-display-setting.html">there's a few things you can do</a> to try and fix that.</p>
|
|
||||||
<h2 id="rotating-your-screen"><a class="header-link" href="#rotating-your-screen"></a>Rotating your screen</h2>
|
|
||||||
<p>Press <code>Ctrl + Alt + F3</code> to get to a virtual terminal, and use your favorite editor to open <code>/boot/config.txt</code> (remember to use <code>sudo</code>). Add a line to the end of the file:</p>
|
|
||||||
<ul class="list">
|
|
||||||
<li><code>display_rotate=0</code> to disable rotation</li>
|
|
||||||
<li><code>display_rotate=1</code> to rotate 90° clockwise</li>
|
|
||||||
<li><code>display_rotate=2</code> to rotate 180°</li>
|
|
||||||
<li><code>display_rotate=3</code> to rotate 90° counter-clockwise</li>
|
|
||||||
</ul>
|
|
||||||
<p>Save the file, and <code>sudo reboot</code>.</p>
|
|
||||||
<p>Note that on the Pi 4, you'll need to disable the <code>dtoverlay=vc4-fkms-v3d</code> line in <code>/boot/config.txt</code> for this to work. But then that <a href="https://www.reddit.com/r/raspberry_pi/comments/dw1376/dtoverlayvc4fkmsv3d_causes_display_to_shift_right/">may cause other issues</a>. This is hopefully fixed in a future Raspbian release.</p>
|
|
||||||
<p>Exotic screens may require a bit more fiddling. See issues <a href="https://github.com/futurice/chilipie-kiosk/issues/41">#41</a> and <a href="https://github.com/futurice/chilipie-kiosk/issues/58">#58</a> for ideas.</p>
|
|
||||||
<h2 id="replacing-the-boot-graphics"><a class="header-link" href="#replacing-the-boot-graphics"></a>Replacing the boot graphics</h2>
|
|
||||||
<p>The image that's displayed while the kiosk is starting can be changed by just replacing <code>~/background.png</code>.</p>
|
|
||||||
<p>To change the default chilipie-kiosk boot graphics to a <a href="https://mcdn.wallpapersafari.com/medium/93/77/8xKLeg.png">nice Windoge one</a>, for example, try <code>wget -O background.png https://bit.ly/2Q4GF1t</code>.</p>
|
|
||||||
<h2 id="increasing-boot-show-delay"><a class="header-link" href="#increasing-boot-show-delay"></a>Increasing boot show delay</h2>
|
|
||||||
<p>By default, the browser window is hidden for a few seconds after boot, to give the page time to load. You can increase (or decrease) this delay in <code>~/.xsession</code>.</p>
|
|
||||||
<h2 id="using-a-touch-screen"><a class="header-link" href="#using-a-touch-screen"></a>Using a touch screen</h2>
|
|
||||||
<p>If your kiosk is interactive, and you're using a touch screen as a display, you may need to calibrate it. Press <code>Ctrl + Alt + F3</code> to get to a virtual terminal, and type:</p>
|
|
||||||
<pre class="hljs"><code><span class="hljs-attr">DISPLAY</span>=:<span class="hljs-number">0</span> xinput_calibrator</code></pre> </article>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
25
home/hosts.allow
Normal file
25
home/hosts.allow
Normal file
File diff suppressed because one or more lines are too long
19
home/hosts.deny
Normal file
19
home/hosts.deny
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
|
||||||
|
# See the manual pages hosts_access(5) and hosts_options(5).
|
||||||
|
#
|
||||||
|
# Example: ALL: some.host.name, .some.domain
|
||||||
|
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
|
||||||
|
#
|
||||||
|
# If you're going to protect the portmapper use the name "rpcbind" for the
|
||||||
|
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
|
||||||
|
#
|
||||||
|
# The PARANOID wildcard matches any host whose name does not match its
|
||||||
|
# address.
|
||||||
|
#
|
||||||
|
# You may wish to enable this to ensure any programs that don't
|
||||||
|
# validate looked up hostnames still leave understandable logs. In past
|
||||||
|
# versions of Debian this has been the default.
|
||||||
|
# ALL: PARANOID
|
||||||
|
|
||||||
|
vncserver-x11-c: ALL
|
||||||
|
sshd: ALL
|
||||||
11
home/package.json
Normal file
11
home/package.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "waip_standby_websocket",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"start": "node waip_standby_websocket.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"socket.io-client": "2.5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
12
home/report_status.sh
Normal file
12
home/report_status.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f /boot/wachalarm_einstellungen.txt ]; then
|
||||||
|
source /boot/wachalarm_einstellungen.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Standby-Script ausfuehren
|
||||||
|
if [[ "$report_enable" == *"1"* ]]; then
|
||||||
|
xmldata=$(sudo lshw -xml)
|
||||||
|
curl -H "Content-Type: application/xml" -H "Accept: application/xml" -d "$xmldata" -X POST $report_url
|
||||||
|
fi
|
||||||
|
|
||||||
20
home/start_mouse_click.sh
Normal file
20
home/start_mouse_click.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export DISPLAY=:0.0
|
||||||
|
|
||||||
|
# Click on web page to activate webaudio auto-play
|
||||||
|
monitor_x="$(fbset -s | awk '$1 == "geometry" { print $2 }')"
|
||||||
|
sub_x=100
|
||||||
|
monitor_y="$(fbset -s | awk '$1 == "geometry" { print $3 }')"
|
||||||
|
sub_y=50
|
||||||
|
buttom_x=$(expr $monitor_x - $sub_x)
|
||||||
|
buttom_y=$(expr $monitor_y - $sub_y)
|
||||||
|
xdotool mousemove $buttom_x $buttom_y
|
||||||
|
sleep 1
|
||||||
|
xdotool click 1
|
||||||
|
sleep 1
|
||||||
|
xdotool mousemove 200 200
|
||||||
|
sleep 1
|
||||||
|
xdotool click 1
|
||||||
|
sleep 1
|
||||||
|
unclutter -idle 1 -root
|
||||||
16
home/start_waip_standby.sh
Normal file
16
home/start_waip_standby.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export DISPLAY=:0.0
|
||||||
|
|
||||||
|
# Einstellungen einlesen
|
||||||
|
|
||||||
|
if [ -f /boot/wachalarm_einstellungen.txt ]; then
|
||||||
|
source /boot/wachalarm_einstellungen.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Standby-Script ausfuehren
|
||||||
|
if [[ "$standby_enable" == *"1"* ]]; then
|
||||||
|
xmessage -center -timeout 9 "ACHTUNG: Monitor geht gleich in Standby, sofern kein Einsatz anliegt."
|
||||||
|
sleep 1
|
||||||
|
(cd /home/pi && npm run start --waipurl=$standby_waipurl --wachennr=$standby_wachennr &)
|
||||||
|
fi
|
||||||
5
home/vncserver-x11
Normal file
5
home/vncserver-x11
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
_AnlLastConnTime=int64:0000000000000000
|
||||||
|
_LastUpdateCheckSuccessTime=int64:01d91081b40850e0
|
||||||
|
_LastUpdateCheckTime=int64:01d91081b40850e0
|
||||||
|
Authentication=VncAuth
|
||||||
|
Password=309882a3011525908f3218ec294ea459
|
||||||
12
home/wachalarm_einstellungen.txt
Normal file
12
home/wachalarm_einstellungen.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Web-Adresse, die beim Start geoeffnet werden soll, z.B. https://wachalarm.leitstelle-lausitz.de/waip/520101
|
||||||
|
startup_url=https://wachalarm.leitstelle-lausitz.de/waip/0
|
||||||
|
# Ausschalten des Bildschrims bei Standby aktivieren, 1 == an, 0 == aus
|
||||||
|
standby_enable=1
|
||||||
|
# wenn Standby aktiv: URL zur auswahl der Alarmmonitore, z.B. https://wachalarm.leitstelle-lausitz.de/waip/
|
||||||
|
standby_waipurl=https://wachalarm.leitstelle-lausitz.de/waip
|
||||||
|
# wenn Standby aktiv: Nummer der Wache, für die bei Alarmen der Monitor angeschaltet werden soll, z.B. 520101 für CB FW Cottbus
|
||||||
|
standby_wachennr=0
|
||||||
|
# Senden von System-Statusmeldungen aktivieren, 1 == an, 0 == aus
|
||||||
|
report_enable=1
|
||||||
|
# wenn System-Statusmeldungen aktiv, dann an folgende URL senden
|
||||||
|
report_url=https://wachalarm.leitstelle-lausitz.de/client_statusmessage
|
||||||
46
home/waip_standby_websocket.js
Normal file
46
home/waip_standby_websocket.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const waipurl = process.env.npm_config_waipurl;
|
||||||
|
const wachennr = process.env.npm_config_wachennr;
|
||||||
|
|
||||||
|
if (!waipurl || !wachennr) {
|
||||||
|
process.exit(1);
|
||||||
|
};
|
||||||
|
|
||||||
|
const io = require('socket.io-client');
|
||||||
|
const { exec } = require('child_process');
|
||||||
|
|
||||||
|
console.log('start', waipurl, wachennr);
|
||||||
|
|
||||||
|
const socket = io(waipurl);
|
||||||
|
|
||||||
|
socket.on('connect', function () {
|
||||||
|
console.log('connect', wachennr);
|
||||||
|
socket.emit('WAIP', wachennr);
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on('connect_error', (err) => {
|
||||||
|
console.log('Socket.IO-Fehler', err.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on('io.new_waip', function () {
|
||||||
|
console.log('AN - Display einschalten');
|
||||||
|
var yourscript = exec('~/cec-on.sh', (error, stdout, stderr) => {
|
||||||
|
console.log(stdout);
|
||||||
|
console.log(stderr);
|
||||||
|
if (error !== null) {
|
||||||
|
console.log(`exec error: ${error}`);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on('io.standby', function () {
|
||||||
|
console.log('AUS - Display ausschalten');
|
||||||
|
var yourscript = exec('~/cec-off.sh', (error, stdout, stderr) => {
|
||||||
|
console.log(stdout);
|
||||||
|
console.log(stderr);
|
||||||
|
if (error !== null) {
|
||||||
|
console.log(`exec error: ${error}`);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
12
home/x11vnc.service
Normal file
12
home/x11vnc.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Start X11VNC
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/x11vnc -forever -display :0 -auth guess -passwd wachalarm -loop -noxdamage -repeat -shared
|
||||||
|
ExecStop=/usr/bin/killall x11vnc
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
222
image-setup.sh
Normal file
222
image-setup.sh
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Original: https://github.com/jareware/chilipie-kiosk/blob/master/docs/image-setup.sh
|
||||||
|
# Anpassung: Robert Richter, 12/2022
|
||||||
|
|
||||||
|
# exit on error; treat unset variables as errors; exit on errors in piped commands
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Ensure we operate from consistent pwd for the rest of the script
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # Figure out the ABSOLUTE PATH of this script without relying on the realpath command, which may not always be available
|
||||||
|
cd "$DIR"
|
||||||
|
|
||||||
|
SSH_CONNECT_TIMEOUT=30
|
||||||
|
|
||||||
|
# Funktionen fuer das Skript
|
||||||
|
function echo-bold {
|
||||||
|
echo -e "$(tput -Txterm-256color bold)$1$(tput -Txterm-256color sgr 0)" # https://unix.stackexchange.com/a/269085; the -T arg accounts for $ENV not being set
|
||||||
|
}
|
||||||
|
function working {
|
||||||
|
echo-bold "\n[WORKING] $1"
|
||||||
|
}
|
||||||
|
function question {
|
||||||
|
echo-bold "\n[QUESTION] $1"
|
||||||
|
}
|
||||||
|
function ssh {
|
||||||
|
/usr/bin/ssh -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout="$SSH_CONNECT_TIMEOUT" "pi@$IP" "$1"
|
||||||
|
}
|
||||||
|
function scp {
|
||||||
|
/usr/bin/scp -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$@" "pi@$IP:/home/pi"
|
||||||
|
}
|
||||||
|
|
||||||
|
question "Skript zum erstellen eines aktuellen Raspberry-Images fuer einen Wachalarm-Monitor"
|
||||||
|
echo "Benoetigt:"
|
||||||
|
echo "* einen Raspberry Pi oder Linux-Debian-System auf dem dieses Skript ausgefuehrt wird"
|
||||||
|
echo "* einen weiteren Raspberry Pi mit SD-Karte und Internet-Zugriff (selbes Netzwerk)"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
question "Vorbereiten der SD-Karte"
|
||||||
|
echo "* Nutzen Sie die Software \"Raspberry Pi Imager\" z.B. unter Windows"
|
||||||
|
echo "* waehlen Sie das aktuelle Betriebssystem \"Raspberry Pi OS Lite\" fuer die SD-Karte"
|
||||||
|
echo "* setzen Sie vor dem Beschreiben der SD-Karte folgende Einstellungen:"
|
||||||
|
echo "*** hostname (z.B. \"wachalarm.local\""
|
||||||
|
echo "*** SSH aktivieren, Passwort zur Authentifizierung verwendung"
|
||||||
|
echo "*** Benutzer und Kennwort festlegen (z.B. \"pi\" / \"wachalarm\")"
|
||||||
|
echo "*** Zeitzone auf Berlin festlegen"
|
||||||
|
echo "* SD-Karte schreiben"
|
||||||
|
echo "* nach Fertigstellung die SD-Karte unter diesem Linux-System einbinden und mounten:"
|
||||||
|
echo "*** z.B. mit: sudo mount /dev/sda1 /media/sdkarte"
|
||||||
|
echo "* Pfad der eingbunden SD-Karte merken (z.B. \"/media/sdkarte\")"
|
||||||
|
echo "(Bereit? dann weiter mit ENTER)"
|
||||||
|
read
|
||||||
|
|
||||||
|
question "Mount-Verzeichnis der SD-Karte"
|
||||||
|
echo "geben Sie den Pfad zur SD-Karte an (z.B. \"/media/sdkarte\")"
|
||||||
|
read mount_path
|
||||||
|
|
||||||
|
# Variablen
|
||||||
|
MOUNTED_BOOT_VOLUME="$mount_path"
|
||||||
|
BOOT_CMDLINE_TXT="$MOUNTED_BOOT_VOLUME/cmdline.txt"
|
||||||
|
BOOT_CONFIG_TXT="$MOUNTED_BOOT_VOLUME/config.txt"
|
||||||
|
|
||||||
|
#LOCALE="en_US.UTF-8 UTF-8" # or e.g. "fi_FI.UTF-8 UTF-8" for Finland
|
||||||
|
LOCALE="de_DE.UTF-8 UTF-8"
|
||||||
|
#LANGUAGE="en_US.UTF-8" # should match above
|
||||||
|
LANGUAGE="de_DE.UTF-8"
|
||||||
|
#KEYBOARD="us" # or e.g. "fi" for Finnish
|
||||||
|
KEYBOARD="de"
|
||||||
|
#TIMEZONE="Etc/UTC" # or e.g. "Europe/Helsinki"; see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
|
TIMEZONE="Europe/Berlin"
|
||||||
|
|
||||||
|
working "Backup der Original Boot-Dateien erstellen"
|
||||||
|
cp -v "$BOOT_CMDLINE_TXT" "$BOOT_CMDLINE_TXT.backup"
|
||||||
|
cp -v "$BOOT_CONFIG_TXT" "$BOOT_CONFIG_TXT.backup"
|
||||||
|
|
||||||
|
working "Wachalarm-Einstellungsdatei hinterlegen"
|
||||||
|
cp -v "homefolder_content/wachalarm_einstellungen.txt" "$MOUNTED_BOOT_VOLUME/wachalarm_einstellungen.txt"
|
||||||
|
|
||||||
|
working "Automatische Expansion der root-Partition deaktivieren"
|
||||||
|
echo "Updating: $BOOT_CMDLINE_TXT"
|
||||||
|
cat "$BOOT_CMDLINE_TXT" | sed "s#init=/usr/lib/raspi-config/init_resize.sh##" > temp
|
||||||
|
mv temp "$BOOT_CMDLINE_TXT"
|
||||||
|
|
||||||
|
working "SSH aktivieren"
|
||||||
|
# https://www.raspberrypi.org/documentation/remote-access/ssh/
|
||||||
|
touch "$MOUNTED_BOOT_VOLUME/ssh"
|
||||||
|
|
||||||
|
working "Making boot quieter (part 1)" # https://scribles.net/customizing-boot-up-screen-on-raspberry-pi/
|
||||||
|
echo "Updating: $BOOT_CONFIG_TXT"
|
||||||
|
perl -i -p0e "s/#disable_overscan=1/disable_overscan=1/g" "$BOOT_CONFIG_TXT" # "perl" is more cross-platform than "sed -i"
|
||||||
|
echo -e "\ndisable_splash=1" >> "$BOOT_CONFIG_TXT"
|
||||||
|
|
||||||
|
working "Sound auf HDMI aktiveren (klappt nicht immer)"
|
||||||
|
perl -i -p0e "s/dtparam=audio=on/#dtparam=audio=on/g" "$BOOT_CONFIG_TXT"
|
||||||
|
|
||||||
|
#working "Making boot quieter (part 2)" # https://scribles.net/customizing-boot-up-screen-on-raspberry-pi/
|
||||||
|
#echo "You may want to revert these changes if you ever need to debug the startup process"
|
||||||
|
#echo "Updating: $BOOT_CMDLINE_TXT"
|
||||||
|
#cat "$BOOT_CMDLINE_TXT" \
|
||||||
|
# | sed 's/console=tty1/console=tty3/' \
|
||||||
|
# | sed 's/$/ splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0/' \
|
||||||
|
# > temp
|
||||||
|
#mv temp "$BOOT_CMDLINE_TXT"
|
||||||
|
|
||||||
|
working "SD-Karte wird ausgeworfen"
|
||||||
|
sudo umount "$mount_path"
|
||||||
|
|
||||||
|
|
||||||
|
question "Raspberry Pi starten:"
|
||||||
|
echo "* SD-Karte auswerfen & in Pi einsetzen (ggf. zuvor \"umount /media/sdkarte\""
|
||||||
|
echo "* Raspberry Pi mit Netzwerk verbinden"
|
||||||
|
echo "* Pi booten / starten"
|
||||||
|
echo "* es folgen viele Password-Abfragen fuer den SSH-Zugriff auf den Raspberry"
|
||||||
|
echo "IP-Adresse eingeben:"
|
||||||
|
read IP
|
||||||
|
|
||||||
|
#working "Setting locale"
|
||||||
|
# We want to do this as early as possible, so perl et al won't complain about misconfigured locales for the rest of the image prep
|
||||||
|
ssh "echo $LOCALE | sudo tee /etc/locale.gen"
|
||||||
|
ssh "sudo locale-gen"
|
||||||
|
ssh "echo -e \"LANGUAGE=$LANGUAGE\nLC_ALL=$LANGUAGE\" | sudo tee /etc/environment"
|
||||||
|
|
||||||
|
#working "hostname festlegen"
|
||||||
|
# We want to do this right before reboot, so we don't get a lot of unnecessary complaints about "sudo: unable to resolve host chilipie-kiosk" (https://askubuntu.com/a/59517)
|
||||||
|
ssh "sudo hostnamectl set-hostname wachalarm"
|
||||||
|
ssh "sudo perl -i -p0e 's/raspberrypi/wachalarm/g' /etc/hosts" # "perl" is more cross-platform than "sed -i"
|
||||||
|
|
||||||
|
# From now on, some ssh commands will exit non-0, which should be fine
|
||||||
|
set +e
|
||||||
|
|
||||||
|
# From raspi-config: https://github.com/RPi-Distro/raspi-config/blob/d98686647ced7c0c0490dc123432834735d1c13d/raspi-config#L1313-L1321
|
||||||
|
# See also: https://github.com/futurice/chilipie-kiosk/issues/61#issuecomment-524622522
|
||||||
|
working "auto-login aktiverento CLI"
|
||||||
|
ssh "sudo systemctl set-default multi-user.target"
|
||||||
|
ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service"
|
||||||
|
ssh "sudo mkdir -p /etc/systemd/system/getty@tty1.service.d"
|
||||||
|
ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty1.service.d/autologin.conf"
|
||||||
|
|
||||||
|
#working "Setting timezone"
|
||||||
|
ssh "(echo '$TIMEZONE' | sudo tee /etc/timezone) && sudo dpkg-reconfigure --frontend noninteractive tzdata"
|
||||||
|
|
||||||
|
#working "Setting keyboard layout"
|
||||||
|
#ssh "(echo -e 'XKBMODEL="pc105"\nXKBLAYOUT="$KEYBOARD"\nXKBVARIANT=""\nXKBOPTIONS=""\nBACKSPACE="guess"\n' | sudo tee /etc/default/keyboard) && sudo dpkg-reconfigure --frontend noninteractive keyboard-configuration"
|
||||||
|
|
||||||
|
working "Silencing console logins" # this is to avoid a brief flash of the console login before X comes up
|
||||||
|
ssh "sudo rm /etc/profile.d/sshpwd.sh /etc/profile.d/wifi-check.sh" # remove warnings about default password and WiFi country (https://raspberrypi.stackexchange.com/a/105234)
|
||||||
|
ssh "touch .hushlogin" # https://scribles.net/silent-boot-on-raspbian-stretch-in-console-mode/
|
||||||
|
ssh "sudo perl -i -p0e 's#--autologin pi#--skip-login --noissue --login-options \"-f pi\"#g' /etc/systemd/system/getty@tty1.service.d/autologin.conf" # "perl" is more cross-platform than "sed -i"
|
||||||
|
|
||||||
|
working "Installing packages"
|
||||||
|
ssh "sudo apt-get update && sudo apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y vim matchbox-window-manager unclutter mailutils nitrogen jq chromium-browser xserver-xorg xinit rpd-plym-splash xdotool rng-tools xinput-calibrator cec-utils realvnc-vnc-server unattended-upgrades npm nodejs lshw"
|
||||||
|
# We install mailutils just so that you can check "mail" for cronjob output
|
||||||
|
|
||||||
|
working "Setting home directory default content"
|
||||||
|
ssh "rm -rfv /home/pi/*"
|
||||||
|
scp $(find home -type f)
|
||||||
|
|
||||||
|
working "Skripts ausfuehrbar machen"
|
||||||
|
ssh "chmod +x display-off.sh && chmod +x display-on.sh && chmod +x cec-off.sh && chmod +x cec-on.sh && chmod +x .xsession && chmod +x start_waip_standby.sh && chmod +x start_mouse_click.sh && chmod +x report_status.sh"
|
||||||
|
|
||||||
|
working "Setting splash screen background"
|
||||||
|
ssh "sudo rm /usr/share/plymouth/themes/pix/splash.png && sudo ln -s /home/pi/background.png /usr/share/plymouth/themes/pix/splash.png"
|
||||||
|
|
||||||
|
working "Installing default crontab"
|
||||||
|
ssh "crontab /home/pi/crontab.example"
|
||||||
|
|
||||||
|
working "VNC-Service einrichten (Kennwort \"wachalarm\")"
|
||||||
|
ssh "sudo cp /home/pi/vncserver-x11 /root/.vnc/config.d/vncserver-x11"
|
||||||
|
ssh "sudo systemctl enable vncserver-x11-serviced.service && sudo systemctl start vncserver-x11-serviced.service"
|
||||||
|
|
||||||
|
working "Zeiteinstellungen fuer NTP setzen"
|
||||||
|
ssh "sudo timedatectl set-ntp 1 && sudo timedatectl set-local-rtc 0"
|
||||||
|
#ssh "sudo systemctl restart systemd-timesyncd.service"
|
||||||
|
|
||||||
|
working "Automatische Sicherheitsupdates einrichten"
|
||||||
|
ssh "sudo dpkg-reconfigure -pmedium unattended-upgrades"
|
||||||
|
ssh "sudo cp /home/pi/50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades"
|
||||||
|
|
||||||
|
working "VNC- und SSH-Zugang einschraenken"
|
||||||
|
ssh "sudo cp /home/pi/hosts.deny /etc/hosts.deny && sudo cp /home/pi/hosts.allow /etc/hosts.allow"
|
||||||
|
#ssh "sudo service sshd restart"
|
||||||
|
|
||||||
|
working "Waip-Standby-Skript installieren"
|
||||||
|
ssh "(cd /home/pi && npm install)"
|
||||||
|
|
||||||
|
working "Rebooting the Pi"
|
||||||
|
ssh "sudo reboot"
|
||||||
|
|
||||||
|
echo "Waiting for host to come back up..."
|
||||||
|
until SSH_CONNECT_TIMEOUT=5 ssh "echo OK"
|
||||||
|
do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
question "Sobald der Pi mit Chromium neugestartet hat:"
|
||||||
|
echo "* Tell Chromium we don't want to sign in"
|
||||||
|
echo "* Configure Chromium to start \"where you left off\""
|
||||||
|
echo " * F11 to exit full screen"
|
||||||
|
echo " * Alt + F, then S to go to Settings"
|
||||||
|
echo " * Type \"continue\" to filter the options"
|
||||||
|
echo " * Tab to select \"Continue where you left off\""
|
||||||
|
echo "(press enter when ready)"
|
||||||
|
read
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# weitere Einstellungen
|
||||||
|
|
||||||
|
# sudo raspi-config -> System -> Audio auf HDMI ändern
|
||||||
|
# vnc-fenster schließen
|
||||||
|
# image shrink
|
||||||
|
|
||||||
|
# TV
|
||||||
|
# Einrichutng -> "Mute" 1 1 9 "Enter"
|
||||||
|
# Menu OSD -> Menu Display -> off
|
||||||
|
|
||||||
|
# Raspberry an TV HDMI 1
|
||||||
|
# Raspberry HDMI 0 (Neben USB-C-Stromanschluss)
|
||||||
|
# lautsprecher tv auf 25
|
||||||
|
|
||||||
|
# Konfiguration direkt auf SD-Karte
|
||||||
|
# ip per einstellungen txt setzen
|
||||||
|
# wlan per wpa_supplicant
|
||||||
1
optional_boot_config/cmdline.txt_eth0
Normal file
1
optional_boot_config/cmdline.txt_eth0
Normal file
@ -0,0 +1 @@
|
|||||||
|
console=serial0,115200 console=tty1 root=PARTUUID=74bfbfa1-02 rootfstype=ext4 fsck.repair=yes rootwait ip=192.168.2.20::192.168.2.1:255.255.255.0:wachalarm:eth0:off:192.168.2.1
|
||||||
1
optional_boot_config/cmdline.txt_wlan0
Normal file
1
optional_boot_config/cmdline.txt_wlan0
Normal file
@ -0,0 +1 @@
|
|||||||
|
console=serial0,115200 console=tty1 root=PARTUUID=74bfbfa1-02 rootfstype=ext4 fsck.repair=yes rootwait ip=192.168.2.20::192.168.2.1:255.255.255.0:wachalarm:wlan0:off:192.168.2.1
|
||||||
8
optional_boot_config/wpa_supplicant.conf
Normal file
8
optional_boot_config/wpa_supplicant.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
country=DE
|
||||||
|
update_config=1
|
||||||
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
|
network={
|
||||||
|
key_mgmt=WPA-PSK
|
||||||
|
ssid="Name-des-WLANs"
|
||||||
|
psk="ganz-geheimes-kennwort"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user