pax_global_header00006660000000000000000000000064131155441620014514gustar00rootroot0000000000000052 comment=2a66a9e08fc94a9f9b19fe286e36aa50e4bb09b6 surf-display-0.0.5/000077500000000000000000000000001311554416200141405ustar00rootroot00000000000000surf-display-0.0.5/ChangeLog000066400000000000000000000130241311554416200157120ustar00rootroot000000000000002017-06-06 17:21:14 +0200 Mike Gabriel (87cbc61) * release 0.0.5 (HEAD -> master) 2017-06-06 17:19:14 +0200 Mike Gabriel (ef5e7b9) * Makefile: Fix filename of empty-page.html at install target. 2017-06-06 17:15:59 +0200 Mike Gabriel (386f41e) * release 0.0.4 (tag: 0.0.4, origin/master) 2017-06-06 17:15:19 +0200 Mike Gabriel (f33d7e7) * TeX documentation: Fix nasty typo in marco name. 2017-06-06 17:00:36 +0200 Mike Gabriel (46fecde) * release 0.0.3 (tag: 0.0.3) 2017-06-06 16:43:02 +0200 Mike Gabriel (2ef255c) * surf-display: surf does not support filtering natively in the current upstream release. Using a local tinyproxy might be more effective anyway. 2017-06-06 16:38:23 +0200 Benjamin Schlüter (bfa6b59) * Adapt to using surf browser. 2017-06-06 16:10:01 +0200 Mike Gabriel (7cbe2f1) * Update PDF documentation to renamed project. 2017-06-06 16:12:40 +0200 Benjamin Schlüter (44d9d40) * Rename Project to Surf Display (Remove old files.). 2017-06-06 16:08:56 +0200 Benjamin Schlüter (9d4c368) * Rename Project to Surf Display. 2017-05-30 18:31:24 +0200 Benjamin Schlüter (519a6a0) * Midori-Display: Make sure x-server can be restarted with CTRL+ALT+BACKSPACE. 2017-03-24 21:01:56 +0100 Mike Gabriel (bbb96bb) * midori-display.desktop: Fix .desktop file's title= key. 2017-03-24 18:24:55 +0100 Mike Gabriel (5f1b879) * release 0.0.2 (tag: 0.0.2) 2017-03-24 18:22:34 +0100 Mike Gabriel (3bf853e) * {bin,examples}/midori-display{.default}: Set DEFAULT_WWW_URI path to DATADIR/midori-display/midori-display.html. 2017-03-24 18:20:44 +0100 Mike Gabriel (2b90983) * Makefile: Install midori-display.html to DATADIR/midori-display/. 2017-03-24 18:19:16 +0100 Mike Gabriel (0afb54a) * Makefile: Drop PDF data files (impressive-display relict) from install rule. 2017-03-24 18:03:20 +0100 Mike Gabriel (7bed424) * release 0.0.1 (tag: 0.0.1) 2017-03-24 18:14:36 +0100 Mike Gabriel (2684310) * Makefile: Fix clean rule. 2017-03-24 18:12:46 +0100 Mike Gabriel (76c2ffc) * midori-display man page: Various improvements. 2017-03-24 18:01:18 +0100 Mike Gabriel (28a8cc6) * midori-display.html: Add intentionally left blank default Midori Display page. 2017-03-24 17:33:14 +0100 Mike Gabriel (60419db) * midori-display.tex: Various textual fixes. 2017-03-24 17:10:30 +0100 Mike Gabriel (96f102d) * midori-display.default: Be more explanatory about the different URI_BLOCKLIST meanings. 2017-03-24 17:09:34 +0100 Mike Gabriel (1010831) * midori-display.default: Mention default for HTTP_PROXY_URL variable. 2017-03-24 17:00:15 +0100 Mike Gabriel (c9e7381) * midori-display.default: Use same INACTIVITY_INTERVAL in midori-display.defaults as in the script. 2017-03-24 16:58:35 +0100 Mike Gabriel (0da0682) * midori-display.defaults: Move HIDE_IDLE_POINTER down, under POINTER_BUTTON_MAP. 2017-03-24 16:57:47 +0100 Mike Gabriel (c309665) * bin/midori-display: Update comment for POINTER_BUTTON_MAP defaults. 2017-03-24 16:56:59 +0100 Mike Gabriel (fcc4730) * midori-display.default: Add POINTER_BUTTON_MAP to defaults file. 2017-03-24 16:48:42 +0100 Mike Gabriel (ac1a145) * midori-display.default: Mention example for URI_BLOCKLIST. 2017-03-24 16:47:57 +0100 Mike Gabriel (c04643d) * Drop DEBUG_DOWNLOADS, copy+paste artifact while deriving code from impressive-display. 2017-03-24 16:46:37 +0100 Mike Gabriel (0ab9799) * midori-display.default: Adapt the per-display settings (derived from impressive-display.default) to midori-display." 2017-03-24 16:40:30 +0100 Mike Gabriel (a927436) * Makefile: Provide minimal build and install ruleset. 2017-03-24 16:38:30 +0100 Mike Gabriel (8a2296b) * Add VERSION file. 2017-03-23 17:31:39 +0100 Benjamin Schlüter (f39a860) * midori-display.tex: Next batch of adjustments for midori-display. 2017-03-23 14:55:21 +0100 Benjamin Schlüter (940129b) * midori-display: Finished adjusting midor-display.1 (Manual). 2017-03-22 17:02:38 +0100 Benjamin Schlüter (c57f2e6) * Partially wrote/rewrote midori-display.tex based off of *.tex for impressive-display. 2017-03-22 15:54:24 +0100 Benjamin Schlüter (8bbf416) * Added and adjusted config files and added first iteration of midori-display.default file. 2017-03-22 15:52:58 +0100 Benjamin Schlüter (64a1e35) * Added LICENSE-file to midori-display. 2017-03-21 19:40:27 +0100 Mike Gabriel (9653a82) * X11 lock down: Disable the Control keys via xmodmap. 2017-03-21 19:37:19 +0100 Mike Gabriel (2e2c2f9) * midori option: Don't allow JS to access X11 clipboard and print without dialog window (if the user ever gets able to print). 2017-03-21 19:36:16 +0100 Mike Gabriel (dccbae2) * midori-display: Handle situations where the Xserver has died and xprintidle does not produce output. 2017-03-21 19:11:10 +0100 Mike Gabriel (ed600a8) * midori-display: Pointer tweaks... enable scrolling. 2017-03-21 19:07:47 +0100 Mike Gabriel (177a35c) * midori-display: Silence any output from the midori process. 2017-03-21 18:50:33 +0100 Mike Gabriel (bb89bc9) * midori-display: Remove debug code. 2017-03-21 18:49:27 +0100 Mike Gabriel (318bf17) * midori-display: Only hack mouse pointer functionality if (a) xmodmap is installed and (b) POINTER_BUTTON_MAP is a non-empty string. 2017-03-21 17:17:15 +0100 Mike Gabriel (cb6e552) * bin/midori-display: Initial version of the Midori Display x-session-manager script. Derived from impressive-display. surf-display-0.0.5/LICENSE000066400000000000000000000431031311554416200151460ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. surf-display-0.0.5/Makefile000066400000000000000000000026051311554416200156030ustar00rootroot00000000000000PREFIX ?= /usr/local DESTDIR ?= all: build build: pdflatex man pdflatex:: cd data && pdflatex surf-display.tex && pdflatex surf-display.tex gzip -9 -c -n data/surf-display.pdf > data/surf-display.pdf.gz man:: gzip -9 -c -n data/surf-display.1 > data/surf-display.1.gz install: if [ ! -e data/surf-display.pdf.gz ]; then \ echo "Run 'make build' first, before running 'sudo make install'."; \ exit -1; \ fi # script mkdir -p $(DESTDIR)$(PREFIX)/bin/ install -m 0755 bin/surf-display $(DESTDIR)$(PREFIX)/bin/ # LaTeX Beamer PDF: Impressive HowTo mkdir -p $(DESTDIR)$(PREFIX)/share/doc/surf-display/ install -m 0644 data/*.pdf.gz $(DESTDIR)$(PREFIX)/share/doc/surf-display/ # man page mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 install -m 0644 data/*.1.gz $(DESTDIR)$(PREFIX)/share/man/man1/ # man page mkdir -p $(DESTDIR)$(PREFIX)/share/surf-display install -m 0644 data/empty-page.html $(DESTDIR)$(PREFIX)/share/surf-display/ # register as available Xsession mkdir -p $(DESTDIR)$(PREFIX)/share/xsessions/ install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/xsessions/ clean:: -rm data/surf-display.aux \ data/surf-display.log \ data/surf-display.nav \ data/surf-display.out \ data/surf-display.pdf \ data/surf-display.pdf.gz \ data/surf-display.snm \ data/surf-display.toc -rm data/surf-display.1.gz .PHONY: man pdflatex surf-display-0.0.5/VERSION000066400000000000000000000000051311554416200152030ustar00rootroot000000000000000.0.5surf-display-0.0.5/bin/000077500000000000000000000000001311554416200147105ustar00rootroot00000000000000surf-display-0.0.5/bin/surf-display000077500000000000000000000204451311554416200172650ustar00rootroot00000000000000#!/bin/bash # uncomment for very verbose script debugging... #set -x # Copyright (C) 2012-2017 by Debian Edu project, http://wiki.debian.org/DebianEdu # 2012-2017, Mike Gabriel # 2016, Daniel Teichmann # 2017, Benjamin Schlüter # Surf Kiosk Display is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Surf Kiosk Display is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # dependencies: # surf # wmctrl # matchbox-window-manager # pulseaudio-utils # xprintidle # xdotool # xmodmap # x11-xkb-utils # # recommendations: # unclutter # pulseaudio # x11-xserver-utils VERSION="0.0.5" BROWSER=surf # Can be configured at "/etc/default/${BROWSER}-display" DEFAULT_WWW_URI="file:///usr/share/${BROWSER}-display/empty-page.html" DEFAULT_RESOLUTION="" # all displays that need to be changed declare -A DISPLAYS # launch pulseaudio daemon if not already running WITH_PULSEAUDIO="yes" # hide idle mouse pointer HIDE_IDLE_POINTER="yes" # disable right and middle pointer device click in browser sessions while keeping # scrolling wheels' functionality intact... (consider "pointer" subcommand on # xmodmap man page for details). POINTER_BUTTON_MAP="1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" # default screensaver settings SCREENSAVER_SETTINGS="" # don't use an HTTP proxy by default HTTP_PROXY_URL="" # log to stderr, if not set to "yes" in one of the config files... LOG_TO_SYSLOG=no # interval of browser inactivity before the session is reset automatically (in seconds) INACTIVITY_INTERVAL="300" if type -p xrandr 1>/dev/null; then currentOutput=`echo "$(xrandr)" | grep -w 'connected' | sed -r -e 's/connected.*//' | head -n 1` fi if [ -r /etc/default/${BROWSER}-display ] && [ ! -d /etc/default/${BROWSER}-display ]; then . /etc/default/${BROWSER}-display fi if [ -r $HOME/.${BROWSER}-display/config ] && [ ! -d $HOME/.${BROWSER}-display/config ]; then . $HOME/.${BROWSER}-display/config fi if [ "x$LOG_TO_SYSLOG" = "xyes" ]; then OUTPUT="logger -t ${BROWSER}-display" else OUTPUT="echo" fi workdir="$HOME/.${BROWSER}-display" mkdir -p "$workdir" session_lock="$workdir/.session-lock.$$" browser_lock="$workdir/.surf-lock" browser_config_dir=`mktemp -d -p "$workdir" ${BROWSER}-display-profile-XXXXXX` # provide pulseaudio support in the browser session, if not # already available... if ! pacmd stat 1>/dev/null 2>/dev/null; then if [ "x$WITH_PULSEAUDIO" = "xyes" ]; then if which pulseaudio 1>/dev/null; then pulseaudio -D -n \ -L 'module-udev-detect' \ --exit-idle-time=65535 fi fi fi # launch matchbox manager if ! wmctrl -m 1>/dev/null 2>/dev/null; then if which matchbox-window-manager 1>/dev/null; then matchbox-window-manager 1>/dev/null 2>/dev/null& fi fi # use unclutter to hide idle mouse pointers if [ "x$HIDE_IDLE_POINTER" = "xyes" ]; then if which unclutter 1>/dev/null; then unclutter 1>/dev/null 2>/dev/null & fi fi # hack mouse pointer functionality to e.g. disable "right-click" in browser session sanitized_pointer_button_map=$(echo ${POINTER_BUTTON_MAP//[^0-9\ ]/} | sed -e 's/^\s*//' -e 's/\s*$//') count_buttons_pointer_button_map=$(echo -n "${sanitized_pointer_button_map//[0-9]/}"| wc -m) if which xmodmap 1>/dev/null; then if [ -n "$POINTER_BUTTON_MAP" ] && [ "x$POINTER_BUTTON_MAP" = "x$sanitized_pointer_button_map" ] && \ [ $count_buttons_pointer_button_map -lt 32 ]; then xmodmap -e "pointer = $POINTER_BUTTON_MAP" fi else $OUTPUT "WARNING: Cannot strip down mouse/pointer button functionality. Make sure 'xmodmap' is installed." fi if which setxkbmap 1>/dev/null; then setxkbmap -option "terminate:ctrl_alt_bksp" fi # if FAKE_HOSTNAME is not empty, use that string for hostname THIS_HOSTNAME=$(hostname -f) if [ -n "$FAKE_HOSTNAME" ]; then THIS_HOSTNAME="$FAKE_HOSTNAME" fi if `echo ${!DISPLAYS[@]} | grep -q "$THIS_HOSTNAME"`; then $OUTPUT "INFO: $THIS_HOSTNAME has extra properties. loading them.." if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep -q "www_uri="; then WWW_URI=`echo ${DISPLAYS[$THIS_HOSTNAME]} | sed -r -e 's/(^|.*\|)www_uri=([^|]*).*/\2/'` else WWW_URI="$DEFAULT_WWW_URI" fi if echo ${DISPLAYS[$THIS_HOSTNAME]} | grep -q "res="; then RESOLUTION=`echo ${DISPLAYS[$THIS_HOSTNAME]} | sed -r -e 's/(^|.*\|)res=([^|]*).*/\2/'` else RESOLUTION="$DEFAULT_RESOLUTION" fi else WWW_URI="$DEFAULT_WWW_URI" RESOLUTION="$DEFAULT_RESOLUTION" fi if ! echo "$WWW_URI" | grep -q -E "^(file://|http://|https://).*"; then $OUTPUT "ERROR: WWW_URI format not supported: $WWW_URI" $OUTPUT " Use file:///. or http(s):////.." $OUTPUT " Doing nothing." exit -1 fi if [ -n "${RESOLUTION}" ]; then if type -p xrandr 1>/dev/null; then xrandr -d :0 --output "$(echo $currentOutput)" --mode $RESOLUTION fi fi # Set screensaver settings if which xset 1>/dev/null; then xset s ${SCREENSAVER_SETTINGS} fi # set some proxy related env variables, if requested... if [ -n "$HTTP_PROXY_URL" ]; then export http_proxy="$HTTP_PROXY_URL" export https_proxy="$HTTP_PROXY_URL" export ftp_proxy="$HTTP_PROXY_URL" fi function cleanup { if type -p xrandr 1>/dev/null; then $OUTPUT "Info: resetting resolution" xrandr -d :0 --output "$(echo $currentOutput)" --auto fi if [ -r "$browser_lock" ]; then browser_pid=$(cat "$browser_lock" | sed -e 's/[^0-9]*//g') if [ -n "$browser_pid" ]; then kill -0 $browser_pid 2>/dev/null && kill "$browser_pid" fi fi if [ -d "$browser_config_dir" ]; then rm -R "$browser_config_dir" fi for rmfile in $browser_lock \ $session_lock \ ; do if [ -e "$rmfile" ]; then rm "$rmfile" fi done } trap "cleanup" SIGINT SIGTERM ERR EXIT function browser_loop { if [ "x$INACTIVITY_INTERVAL" != "x0" ]; then ( while [ -e "$session_lock" ]; do sleep 1 if [ `xprintidle 2>/dev/null || echo 0` -gt $(($INACTIVITY_INTERVAL*1000)) ]; then echo -n "RESTART" > $browser_lock $OUTPUT "INFO: Triggering browser restart, too much idling around..." # reset X11 idle counter by some harmless key event xdotool key Shift fi done ) & fi } function browser_session { if which "${BROWSER}" 1>/dev/null; then while [ -e "$session_lock" ]; do LANG=C ${BROWSER} \ -a "A" \ -B \ -c "${browser_config_dir}/cookies" \ -D \ -F \ -g \ -I \ -K \ -m \ -n \ -P \ -S \ "${WWW_URI}" 1>/dev/null 2>/dev/null & browser_pid=$! echo -n "$browser_pid" > "$browser_lock" while [ -r "$browser_lock" ] && [ "$(cat $browser_lock)" != "RESTART" ] && [ -e "$session_lock" ]; do sleep 1 if ! kill -0 "$browser_pid" 2>/dev/null; then if [ -e ${session_lock} ]; then rm "${session_lock}" fi if [ -d "${browser_config_dir}" ]; then rm -R "${browser_config_dir}" fi break browser_config_dir=`mktemp -d -p "$workdir" ${BROWSER}-display-profile-XXXXXX` fi done kill -0 "$browser_pid" 2>/dev/null && kill "$browser_pid" $OUTPUT "INFO: The surf application has terminated." done else $OUTPUT "ERROR: The surf application is not installed." fi } function create_lock { touch "$session_lock" } ### MAIN ### $OUTPUT "INFO: Surf Kiosk Display (version $VERSION)" $OUTPUT "INFO: HOSTNAME set to: $THIS_HOSTNAME" if [ -n "$WWW_URI" ]; then $OUTPUT "INFO: WWW_URI is configured. Using content from given URL: $WWW_URI" create_lock browser_loop else $OUTPUT "ERROR: WWW_URI hasn't been configured. Doing nothing." exit 0 fi browser_session exit 0 surf-display-0.0.5/data/000077500000000000000000000000001311554416200150515ustar00rootroot00000000000000surf-display-0.0.5/data/empty-page.html000066400000000000000000000012531311554416200200100ustar00rootroot00000000000000 This page intentionally left blank (default)
Surf Kiosk Display: this test
page has been intentionally left blank
surf-display-0.0.5/data/surf-display.1000066400000000000000000000030131311554416200175520ustar00rootroot00000000000000'\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH surf-display 1 "Jun 2017" "Version 0.0.5" "Surf Kiosk Display" .SH NAME surf-display \- Fullscreen WWW Display Session Manager .SH SYNOPSIS 'nh .fi .ad l \fBsurf-display\fR .SH DESCRIPTION \fBsurf-display\fR is a wrapper around Surf. It can turn a system into a browser based display terminal in KIOSK mode. .PP \fBsurf-display\fR registers itself as an x-session-manager alternative and provides a very minimal X11 session, launching the matchbox-window-manager, pulseaudio (if requested) and unclutter (if requested) before starting the fullscreen browser session. .PP \fBsurf-display\fR locks down mouse pointer right-click behaviour and disables various keyboard shortcuts to hide Surf functionalities from the user. Out goal is to not let users break out of the given entry WWW site's browsing design. .PP You can combine \fBsurf-display\fR with a local \fBtinyproxy\fR setup to configure access to specific sites and configure what sites to block user access from. .PP .SH OPTIONS \fBsurf-display\fR can easily be configured system-wide via /etc/default/surf-display. Overrides can be configure on a per-user basis via $HOME/.surf-display/config. .PP .SH SEE ALSO /etc/default/surf-display .SH AUTHOR This manual has been written by Mike Gabriel and Benjamin Schlüter for the IT-Zukunft-Schule project (https://wiki.it-zukunft-schule.de/). surf-display-0.0.5/data/surf-display.desktop000066400000000000000000000003001311554416200210570ustar00rootroot00000000000000[Desktop Entry] Name=Surf Kiosk Display Comment=Fullscreen browser session Exec=surf-display TryExec=surf-display Icon=x-www-browser Type=Application Keywords=browser;kiosk;fullscreen;display;surf-display-0.0.5/data/surf-display.tex000066400000000000000000000230011311554416200202110ustar00rootroot00000000000000\documentclass[english,smaller,t]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[right]{eurosym} \usepackage{lmodern} \newcommand{\noun}[1]{\textsc{#1}} \usepackage[english]{babel} \usepackage[babel]{csquotes} \MakeAutoQuote{»}{«} \pdfimageresolution150 \def\EUR{\,\euro} %\usepackage{beamerthemesplit} %\usetheme{Warsaw} %\usetheme{Berkeley} %\usetheme{Marburg} %\usetheme{Goettingen} %\usetheme{AnnArbor} \usetheme{PaloAlto} %\usecolortheme{beaver} %\usecolortheme{dolphin} \usecolortheme{wolverine} \beamertemplatenumberedsquaresectiontoc \beamertemplatetransparentcovered \title[Surf Kiosk Display]{Surf Kiosk Display HowTo (v0.0.5)} \institute[Debian Edu]{Debian Edu Dev Team} \author[Debian Edu \\ Dev Team]{Mike Gabriel \\ Daniel Teichmann \\ Benjamin Schlüter \\ and others} \date{Mar 2017} \begin{document} \frame{\titlepage} %\frame{\tableofcontents} \section[About]{About Surf Kiosk Display} \frame[label=about] { \frametitle{About Surf Kiosk Display} \framesubtitle{What can I use Surf Kiosk Display for?} \begin{beamerboxesrounded}[shadow=true]{Setup WWW Presentation Screens or Info Terminals} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemA \textbf{Surf Kiosk Display} can be used to \textbf{provide controlled public internet access} while running in KIOSK mode \textbf{for passerbys and visitors} \itemAt schools for example, it can be used to enable \textbf{students and visitors} to search the school homepage or research something for \textbf{classes} \itemAt theaters or other venues, you can provide access to \textbf{a pre-configured set of websites} to e.g. make the \textbf{schedule for the next show} available \itemSurf Kiosk Display has been \textbf{designed for easy and secure access} to websites and web based information \end{itemize} } \end{beamerboxesrounded} } \frame[label=extend] { \frametitle{About Surf Kiosk Display} \framesubtitle{How can I extend Surf Kiosk Display?} \begin{beamerboxesrounded}[shadow=true]{Combine Surf Kiosk Display with other FLOSS Components} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemCombine Surf Kiosk Display \textbf{with a display manager} (such as NoDM or LightDM) \textbf{that allows passwordless user login} \itemCombine it with a \textbf{PXE booted diskless system} such as LTSP for \textbf{deploying a farm of info displays} at your location \itemCombine with Xephyr (a \textbf{nested Xserver}) \textbf{while testing / preparing your setup} \end{itemize} } \end{beamerboxesrounded} } \frame[label=howitworks] { \frametitle{About Surf Kiosk Display} \framesubtitle{How does it work?} \begin{beamerboxesrounded}[shadow=true]{Surf Kiosk Display runs as an X11 session manager} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \item\textbf{Surf Kiosk Display} registers itself as an available \textbf{X session manager}. Make it the default (or the only session manager installed) \itemOpen it with a \textbf{WWW\_URI} as start page. Combine it with a local \textbf{\texttt{tinyproxy}} to filter specific domains or URLs. \itemSurf Kiosk Display supports \textbf{host-specific configuration parameters}; you can run \textbf{various displays} presenting different WWW content \textbf{based on the same configuration} set \end{itemize} } \end{beamerboxesrounded} } \section[Installation]{Installation} \frame[label=debinstall] { \frametitle{Installation\,\ldots} \framesubtitle{\ldots\,on a standalone Debian-like system.} \begin{beamerboxesrounded}[shadow=true]{Installation: Debian GNU/Linux (and alike)} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \item\textbf{Install a minimal} Debian (or derivative) \textbf{system without X11} / Graphical Login Manager \itemInstall Surf Kiosk Display and NoDM: \\ \small \texttt{apt-get install surf-display nodm} \item\textbf{Edit \texttt{/etc/default/nodm}}, set \texttt{NODM\_ENABLED=true} and \texttt{NODM\_USER=surf-display}. Create this user as a system user. \item\textbf{Check that \texttt{surf-display} is the default X session manager}: \\ \small \texttt{update-alternatives \hbox{-}\hbox{-}config x-session-manager} \item\textbf{Start NoDM}: \small \texttt{sudo invoke-rc.d nodm start} \end{itemize} } \end{beamerboxesrounded} } \frame[label=rpminstall] { \frametitle{Installation\,\ldots} \framesubtitle{\ldots\,on a standalone RPM-based system.} \begin{beamerboxesrounded}[shadow=true]{Installation on Fedora, openSUSE or similar} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemThe \textbf{Surf Kiosk Display} tool \textbf{has not been packaged for the RPM world} \item\textbf{Please} contact distribution maintainers and \textbf{request packaging} \end{itemize} } \end{beamerboxesrounded} } \frame[label=ltspchroot] { \frametitle{Installation\,\ldots} \framesubtitle{\ldots\,in an LTSP chroot.} \begin{beamerboxesrounded}[shadow=true]{Install LTSP based info screen farm running Surf Kiosk Display} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemCreate a \textbf{minimal LTSP chroot}, uninstall or \textbf{disable the LTSP Display Manager} (aka LDM) \item\textbf{Make} the LTSP \textbf{chroot bootable over PXE}: the system should boot into a text-based logon screen \itemAll LTSP \textbf{client systems must have a dedicated hostnames} after PXE boot \itemApply \textbf{installation steps for standalone hosts to} the LTSP \textbf{chroot} \item\textbf{Set host-specific parameters} like standard WWW URI, display resolution, etc. via the \texttt{\$\{DISPLAYS[@]\}} associative array, \textbf{for examples see:} \\ \small \texttt{/etc/default/surf-display} \end{itemize} } \end{beamerboxesrounded} } \section[Configuration]{Configuration} \frame[label=systemconfig] { \frametitle{Configuration\,\ldots} \framesubtitle{\ldots system-wide} \begin{beamerboxesrounded}[shadow=true]{Configure Surf Kiosk Display -- system-wide} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemThe \textbf{system-wide configuration} of Surf Kiosk Display is done \textbf{in \texttt{/etc/default/surf-display}} \itemYou can \textbf{adapt various parameters}: \begin{itemize} \item\textbf{Basic options}:Pulseaudio support, uncluttering of the pointer device, screensaver options, slide transition options, etc. \item\textbf{Default parameters}: Specific WWW URI, display resolution \end{itemize} \end{itemize} } \end{beamerboxesrounded} } \frame[label=userconfig] { \frametitle{Configuration\,\ldots} \framesubtitle{\ldots on a per-user basis} \begin{beamerboxesrounded}[shadow=true]{Configure Surf Kiosk Display -- on a per-user basis} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemThe \textbf{per-user configuration} of Surf Kiosk Display is done \textbf{in \texttt{\$HOME/.surf-display/config}} \itemAll \textbf{system-wide parameters can be overriden by the user} \end{itemize} } \end{beamerboxesrounded} } \section[Testing]{Testing your Setup} \frame[label=testing] { \frametitle{Testing Surf Kiosk Display\,\ldots} \framesubtitle{\ldots using a nested Xserver} \begin{beamerboxesrounded}[shadow=true]{Testing your Setup} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \item\textbf{Install Surf Kiosk Display} locally \textbf{on your PC or notebook}; you can launch Surf Kiosk Display under your normal user account \item\textbf{Use FAKE\_HOSTNAME variable to simulate a specifc display host} when testing infoscreen farm setups \itemDo a \textbf{graphical login with your normal user} account; when logged in, open two Terminal windows \itemTerminal 1: \textbf{Launch} a nested Xserver (like \textbf{Xephyr}): \\ \small \texttt{Xephyr -screen 1024x768 -ac :1} \itemTerminal 2, also under your normal user account: \\ \small \texttt{export DISPLAY=:1 \\ FAKE\_HOSTNAME= surf-display} \end{itemize} } \end{beamerboxesrounded} } \section[Authors]{Authors and Contributors} \frame[label=label] { \frametitle{Authors, Contributors \& Sponsors} \begin{beamerboxesrounded}[shadow=true]{Authors \& Contributors} \parbox[t][2.4in][t]{3.5in}{ \begin{itemize} \itemAuthors (and copyright holders): \\ \ \ \ \ Mike Gabriel \\ \ \ \ \ Daniel Teichmann \\ \ \ \ \ Benjamin Schlüter % \itemOther contributors: \\ none, so far\,\ldots \itemDevelopment sponsored by: \\ \ \ \ \ Katharineum zu Lübeck (Germany) \\ \ \ \ \ Fritz-Reuter-Schule Eckernförde (Germany) \\ \ \ \ \ Ernst-Barlach-Gymnasium Kiel (Germany) \itemUpstream code: \\ \ \ \ \ \scriptsize \url{https://code.it-zukunft-schule.de/cgit/surf-display/} \end{itemize} } \end{beamerboxesrounded} } \end{document} surf-display-0.0.5/examples/000077500000000000000000000000001311554416200157565ustar00rootroot00000000000000surf-display-0.0.5/examples/surf-display.default000066400000000000000000000034671311554416200217600ustar00rootroot00000000000000# Surf Kiosk Display: Wrap around surf browser and turn your # system into a browser screen in KIOSK-mode. # default download URI for all display screens if not configured individually DEFAULT_WWW_URI="file:///usr/share/surf-display/empty-page.html" # Enforce fixed resolution for all displays (default: not set): #DEFAULT_RESOLUTION="1920x1080" #FIXME: Configure individual display screens with host specific parameters: #DISPLAYS['display-host-0']="www_uri=https://www.displayserver.comany.net/display-1/index.html" #DISPLAYS['display-host-1']="www_uri=https://www.displayserver.comany.net/display-2/index.html" #DISPLAYS['display-host-2']="www_uri=https://www.displayserver.comany.net/display-3/index.html|res=1920x1280" #DISPLAYS['display-host-3']="www_uri=https://www.displayserver.comany.net/display-4/index.html"|res=1280x1024" #DISPLAYS['display-host-local-file']="www_uri=file:///usr/share/doc/surf-display/empty-page.html" #### ^^^ use: FAKE_HOSTNAME="display-host-1" surf-display ### to play with other hostnames and their PDF URI / resolution settings... # HTTP proxy URL, if needed (default: not set). #HTTP_PROXY_URL="http://webcache:3128" # Setting for internal inactivity timer to restart surf-display # if the user goes inactive/idle. #INACTIVITY__INTERVAL="300" # log to syslog instead of .xsession-errors #LOG_TO_SYSLOG="no" # Launch pulseaudio daemon if not already running. #WITH_PULSEAUDIO="yes" # screensaver settings, see "man 1 xset" for possible options #SCREENSAVER_SETTINGS="" # disable right and middle pointer device click in browser sessions while keeping # scrolling wheels' functionality intact... (consider "pointer" subcommand on # xmodmap man page for details). #POINTER_BUTTON_MAP="1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" # Hide idle mouse pointer. #HIDE_IDLE_POINTER="yes"