├── .functions.sh ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── bootstrap.sh ├── config ├── answer.sh ├── files_black ├── keyrings ├── packages_black ├── packages_build ├── packages_extra └── packages_white ├── makeimage.sh ├── makestick.sh ├── mountimage.sh ├── packaging ├── makeall.sh ├── makearch.sh ├── makeconfig.sh ├── makecontrol.sh ├── makecore.sh ├── makekernel.sh └── makemisc.sh ├── repo ├── ScreenInvaderRepoKey.gpg ├── conf │ ├── distributions │ └── override.latest └── makerepo.sh ├── runimage.sh ├── src ├── amd64 │ ├── etc │ │ └── modules │ └── lounge │ │ ├── .config │ │ └── mpv │ │ │ └── mpv.conf │ │ └── lounge.json ├── armhf │ ├── etc │ │ ├── X11 │ │ │ └── xorg.conf │ │ ├── modules │ │ └── udev │ │ │ └── rules.d │ │ │ └── 50-mali.rules │ └── lounge │ │ ├── .asoundrc │ │ ├── .config │ │ └── mpv │ │ │ └── mpv.conf │ │ └── lounge.json ├── etc │ ├── environment │ ├── fstab │ ├── init.d │ │ ├── fcgiwrap │ │ ├── janosh │ │ ├── janosh-lounge │ │ ├── janosh-root │ │ ├── nginx │ │ ├── screeninvader-lounge │ │ ├── screeninvader-root │ │ └── xserver │ ├── network │ │ └── interfaces │ ├── nginx │ │ ├── fastcgi_params │ │ ├── fcgiwrap.conf │ │ ├── koi-utf │ │ ├── koi-win │ │ ├── mime.types │ │ ├── naxsi-ui.conf.1.4.1 │ │ ├── naxsi.rules │ │ ├── naxsi_core.rules │ │ ├── nginx.conf │ │ ├── proxy_params │ │ ├── scgi_params │ │ ├── sites-available │ │ │ └── default │ │ ├── sites-enabled │ │ │ └── default │ │ ├── uwsgi_params │ │ └── win-utf │ ├── profile │ ├── rc.local │ ├── sudoers │ ├── sysctl.conf │ ├── systemd │ │ └── system │ │ │ ├── autologin@.service │ │ │ └── getty@tty1.service │ ├── udev │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── uwsgi │ │ ├── apps-available │ │ │ └── searx.ini │ │ └── apps-enabled │ │ │ └── searx.ini │ ├── wpa_supplicant │ │ └── wpa_supplicant.conf │ └── xdg │ │ ├── awesome │ │ └── rc.lua │ │ └── midori │ │ └── config ├── lounge │ ├── .bash_logout │ ├── .bashrc │ ├── .janosh │ │ └── janosh.json │ ├── .profile │ ├── .vimrc │ ├── .xpdfrc │ ├── bin │ │ ├── gainroot │ │ ├── getip │ │ ├── locate │ │ │ ├── find.screeninvader │ │ │ ├── functions.sh │ │ │ ├── updatedb.screeninvader │ │ │ ├── updateimage │ │ │ ├── updatemovie │ │ │ └── updatemusic │ │ ├── notify │ │ ├── player │ │ └── showip │ ├── logo.png │ ├── lounge-firstboot.cnf │ ├── lua │ │ ├── background.lua │ │ ├── browser.lua │ │ ├── helpers.lua │ │ ├── history.lua │ │ ├── ip_osd.lua │ │ ├── keyboard.lua │ │ ├── midori.lua │ │ ├── monitor.lua │ │ ├── mouse.lua │ │ ├── mpv.lua │ │ ├── mupdf.lua │ │ ├── notify.lua │ │ ├── pdf.lua │ │ ├── player.lua │ │ ├── playlist.lua │ │ ├── shairport.lua │ │ ├── show.lua │ │ ├── sound.lua │ │ ├── util.lua │ │ └── websocket.lua │ ├── makefirstboot.sh │ ├── www │ │ ├── blank.html │ │ ├── cgi-bin │ │ │ ├── get │ │ │ ├── getlogs │ │ │ ├── initcgi │ │ │ ├── makeImageView │ │ │ ├── set │ │ │ ├── show │ │ │ ├── trigger │ │ │ └── uploadstream │ │ ├── close.html │ │ ├── favicon.ico │ │ ├── robots.txt │ │ └── upload.html │ └── xsession.sh ├── root │ ├── .janosh │ │ └── janosh.json │ ├── .vimrc │ ├── .xbindkeysrc │ ├── lua │ │ ├── display.lua │ │ ├── network.lua │ │ ├── searx.lua │ │ └── system.lua │ ├── root.json │ └── shell │ │ ├── display │ │ ├── network │ │ └── system ├── setup │ ├── askconfig.sh │ ├── firstboot.sh │ └── template-firstboot.cnf └── usr │ └── share │ ├── awesome │ └── themes │ │ └── default │ │ └── theme.lua │ ├── fonts │ ├── X11 │ │ ├── encodings │ │ │ ├── adobe-dingbats.enc.gz │ │ │ ├── adobe-standard.enc.gz │ │ │ ├── adobe-symbol.enc.gz │ │ │ ├── armscii-8.enc.gz │ │ │ ├── ascii-0.enc.gz │ │ │ ├── dec-special.enc.gz │ │ │ ├── encodings.dir │ │ │ ├── ibm-cp437.enc.gz │ │ │ ├── ibm-cp850.enc.gz │ │ │ ├── ibm-cp852.enc.gz │ │ │ ├── ibm-cp866.enc.gz │ │ │ ├── iso8859-11.enc.gz │ │ │ ├── iso8859-13.enc.gz │ │ │ ├── iso8859-16.enc.gz │ │ │ ├── iso8859-6.16.enc.gz │ │ │ ├── iso8859-6.8x.enc.gz │ │ │ ├── large │ │ │ │ ├── big5.eten-0.enc.gz │ │ │ │ ├── big5hkscs-0.enc.gz │ │ │ │ ├── cns11643-1.enc.gz │ │ │ │ ├── cns11643-2.enc.gz │ │ │ │ ├── cns11643-3.enc.gz │ │ │ │ ├── encodings.dir │ │ │ │ ├── gb18030-0.enc.gz │ │ │ │ ├── gb18030.2000-0.enc.gz │ │ │ │ ├── gb18030.2000-1.enc.gz │ │ │ │ ├── gb2312.1980-0.enc.gz │ │ │ │ ├── gbk-0.enc.gz │ │ │ │ ├── jisx0201.1976-0.enc.gz │ │ │ │ ├── jisx0208.1990-0.enc.gz │ │ │ │ ├── jisx0212.1990-0.enc.gz │ │ │ │ ├── ksc5601.1987-0.enc.gz │ │ │ │ ├── ksc5601.1992-3.enc.gz │ │ │ │ └── sun.unicode.india-0.enc.gz │ │ │ ├── microsoft-cp1250.enc.gz │ │ │ ├── microsoft-cp1251.enc.gz │ │ │ ├── microsoft-cp1252.enc.gz │ │ │ ├── microsoft-cp1253.enc.gz │ │ │ ├── microsoft-cp1254.enc.gz │ │ │ ├── microsoft-cp1255.enc.gz │ │ │ ├── microsoft-cp1256.enc.gz │ │ │ ├── microsoft-cp1257.enc.gz │ │ │ ├── microsoft-cp1258.enc.gz │ │ │ ├── microsoft-win3.1.enc.gz │ │ │ ├── mulearabic-0.enc.gz │ │ │ ├── mulearabic-1.enc.gz │ │ │ ├── mulearabic-2.enc.gz │ │ │ ├── mulelao-1.enc.gz │ │ │ ├── suneu-greek.enc.gz │ │ │ ├── tcvn-0.enc.gz │ │ │ ├── tis620-2.enc.gz │ │ │ └── viscii1.1-1.enc.gz │ │ ├── fonts.dir │ │ ├── fonts.scale │ │ ├── misc │ │ │ ├── fonts.dir │ │ │ ├── fonts.scale │ │ │ └── topaz.ttf │ │ └── util │ │ │ ├── map-ISO8859-1 │ │ │ ├── map-ISO8859-10 │ │ │ ├── map-ISO8859-11 │ │ │ ├── map-ISO8859-13 │ │ │ ├── map-ISO8859-14 │ │ │ ├── map-ISO8859-15 │ │ │ ├── map-ISO8859-16 │ │ │ ├── map-ISO8859-2 │ │ │ ├── map-ISO8859-3 │ │ │ ├── map-ISO8859-4 │ │ │ ├── map-ISO8859-5 │ │ │ ├── map-ISO8859-6 │ │ │ ├── map-ISO8859-7 │ │ │ ├── map-ISO8859-8 │ │ │ ├── map-ISO8859-9 │ │ │ ├── map-JISX0201.1976-0 │ │ │ └── map-KOI8-R │ └── truetype │ │ └── ttf-dejavu │ │ ├── DejaVuSans.ttf │ │ ├── DejaVuSansMono.ttf │ │ └── DejaVuSerif.ttf │ └── uwsgi │ └── conf │ └── default.ini ├── templates ├── 00aptcacher ├── policy-rc_d ├── sources_list └── syslinux_cfg ├── test.sh ├── third ├── build_dri2.sh ├── build_janosh.sh ├── build_kernel.sh ├── build_lanes.sh ├── build_libvdpau-sunxi.sh ├── build_luajitrocks.sh ├── build_mpv.sh ├── build_outta_space.sh ├── build_searx.sh ├── build_shairport.sh ├── build_simpleosd.sh ├── build_sunxi-mali.sh ├── build_sunxi-tools.sh ├── build_uboot-cfg.sh ├── build_ump.sh ├── build_xf86-video-fbturbo.sh ├── clone_dri2.sh ├── clone_janosh.sh ├── clone_kernel.sh ├── clone_lanes.sh ├── clone_libvdpau-sunxi.sh ├── clone_luajitrocks.sh ├── clone_mpv.sh ├── clone_outta_space.sh ├── clone_searx.sh ├── clone_shairport.sh ├── clone_simpleosd.sh ├── clone_sunxi-mali.sh ├── clone_sunxi-tools.sh ├── clone_uboot-cfg.sh ├── clone_ump.sh └── clone_xf86-video-fbturbo.sh └── umountimage.sh /.functions.sh: -------------------------------------------------------------------------------- 1 | # 2 | # ScreenInvader - A shared media experience. Instant and seamless. 3 | # Copyright (C) 2012 Amir Hassan 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | # 19 | 20 | #!/bin/bash 21 | function black { echo -ne "\033[0;30m$1\033[0m"; tput sgr0; } 22 | function blue { echo -ne "\033[0;34m$1\033[0m"; tput sgr0; } 23 | function green { echo -ne "\033[0;32m$1\033[0m"; tput sgr0; } 24 | function cyan { echo -ne "\033[0;36m$1\033[0m"; tput sgr0; } 25 | function red { echo -ne "\033[1;31m$1\033[0m"; tput sgr0; } 26 | function purple { echo -ne "\033[0;35m$1\033[0m"; tput sgr0; } 27 | function brown { echo -ne "\033[0;33m$1\033[0m"; tput sgr0; } 28 | function lightgray { echo -ne "\033[0;37m$1\033[0m"; tput sgr0; } 29 | function lightgreen { echo -ne "\033[1;32m$1\033[0m"; tput sgr0; } 30 | function lightcyan { echo -ne "\033[1;36m$1\033[0m"; tput sgr0; } 31 | function lightred { echo -ne "\033[0;31m$1\033[0m"; tput sgr0; } 32 | function lightpurple { echo -ne "\033[1;35m$1\033[0m"; tput sgr0; } 33 | function yellow { echo -ne "\033[1;33m$1\033[0m"; tput sgr0; } 34 | function white { echo -ne "\033[1;37m$1\033[0m"; tput sgr0; } 35 | function warn { red "$1\n"; } 36 | function ok { green "ok\n"; } 37 | function failed { red "failed\n"; } 38 | function verbose { [ ! -z $VERBOSE ] && echo "$@ " 1>&2; } 39 | function verboseexec { verbose $@; bash -c "$@"; } 40 | function error { 41 | msg=$1; 42 | errcode=$2; 43 | [ -z "$errcode" ] && errcode=1; 44 | [ -z "$msg" ] && failed || red "$msg\n"; 45 | exit $errcode; 46 | } 47 | 48 | function try { 49 | fatal=true 50 | targetfd=2 51 | OPTIND=0 52 | while getopts 'no:' c 53 | do 54 | case $c in 55 | n)fatal="false";; 56 | o)targetfd="$OPTARG";; 57 | \?)echo "Invalid option: -$OPTARG" >&2;; 58 | esac 59 | done 60 | shift $((OPTIND-1)); 61 | errcode=0; 62 | msg="$1" 63 | echo -en "$msg: " 1>&2; 64 | shift; 65 | 66 | verbose $@; 67 | 68 | bash -c "$@ 2>&1 1>&$targetfd" 69 | errcode=$?; 70 | if [ $errcode != 0 ]; then 71 | [ "$fatal" != "true" ] && failed 1>&2 || error 1>&2; 72 | else 73 | ok 1>&2; 74 | fi 75 | return $errcode; 76 | } 77 | 78 | function check { 79 | log="&1" 80 | if [ -n "$BOOTSTRAP_LOG" ]; then 81 | echo "### $1" >> "$BOOTSTRAP_LOG" 82 | try -o "1" "$1" "$2" >>"$BOOTSTRAP_LOG" 83 | else 84 | try "$1" "$2" 85 | fi 86 | 87 | [ $? -ne 0 ] && exit $? 88 | } 89 | 90 | function checkcat { 91 | try -n -o "1" "$1" "echo; $2" 92 | } 93 | 94 | 95 | function trycat { 96 | try -o "1" "$1" "$2" 97 | } 98 | 99 | function absDir() { 100 | dir="`dirname $1`" 101 | absdir="`cd $dir; pwd`" 102 | echo $absdir 103 | } 104 | 105 | function absPath() { 106 | dir="`dirname $1`" 107 | base="`basename $1`" 108 | absdir="`cd $dir; pwd`" 109 | echo $absdir/$base 110 | } 111 | 112 | export -f check try error ok failed red green yellow verbose 113 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | u-boot-sunxi/ 2 | extra/ 3 | tmp/ 4 | amd64-fs/ 5 | armhf-fs/ 6 | packaging/screeninvader-* 7 | repo/db/ 8 | repo/dists/ 9 | repo/pool/ 10 | *.log 11 | third/*/ 12 | *.dd-amd64.tar.bz2 13 | *.dd-armhf.tar.bz2 14 | *.dd-amd64 15 | *.dd-armhf 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET := $(shell git log -1 --pretty=%H).dd 2 | ARCH := armhf 3 | CACHER_PORT := 3142 4 | OPTS := -x 5 | FS_DIR := armhf-fs 6 | IMAGE_SIZE := 6000 7 | MKIMG_OPTS := -u -z 8 | 9 | .PHONY: all image release debug deploy clean test-release test-debug 10 | 11 | all: release 12 | 13 | screeninvader.dd.tmp: 14 | ./makeimage.sh -s ${IMAGE_SIZE} ${MKIMG_OPTS} screeninvader.dd.tmp 15 | 16 | debug: ARCH := amd64 17 | debug: OPTS += -k 18 | debug: FS_DIR := amd64-fs 19 | debug: MKIMG_OPTS := -x -z 20 | debug: TARGET := ${TARGET}-${ARCH} 21 | debug: ${TARGET} 22 | 23 | release: TARGET := ${TARGET}-${ARCH} 24 | release: OPTS += -k 25 | release: ${TARGET} 26 | 27 | ${FS_DIR}: 28 | ./bootstrap.sh -c src/setup/template-firstboot.cnf -a ${ARCH} ${OPTS} ${FS_DIR} 29 | 30 | ${TARGET}: screeninvader.dd.tmp ${FS_DIR} 31 | ./mountimage.sh screeninvader.dd.tmp tmp 32 | cp -a ${FS_DIR}/boot/* tmp/p1/ 33 | cp -a ${FS_DIR}/* tmp/p2/ 34 | ./umountimage.sh screeninvader.dd.tmp tmp 35 | mv screeninvader.dd.tmp ${TARGET} 36 | tar -cjf ${TARGET}.tar.bz2 ${TARGET} 37 | 38 | clean: 39 | rm -f screeninvader.dd.tmp 40 | rm -f *.dd-amd64 41 | rm -f *.dd-armhf 42 | rm -fr amd64-fs 43 | rm -fr armhf-fs 44 | rm -f src/setup/answer.sh 45 | 46 | test-debug: 47 | ./test.sh amd64 ${TARGET}-amd64 48 | 49 | test-release: 50 | ./test.sh armhf ${TARGET}-armhf 51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![The mighty ScreenInvader](http://metalab.github.com/ScreenInvader/images/logo.png) 2 | 3 | # ScreenInvader 4 | ## A Social TV 5 | 6 | Ever wished you could play media content from your laptop or smart phone on a TV set, screen or projector in just an instant? 7 | This is what ScreenInvader helps you do: browse the web, watch videos or flip through images together with your friends on a big screen with just a few simple clicks. 8 | 9 | #### Get it! ##### 10 | 11 | Please checkout the documentation in the [wiki](https://github.com/screeninvader/ScreenInvader/wiki/) and especially the [getting started](https://github.com/screeninvader/ScreenInvader/wiki/Getting-Started) guide. 12 | 13 | #### Contribute! ##### 14 | 15 | You can find a guide on how to build images and hack custom features [Here](https://github.com/screeninvader/ScreenInvader/wiki/Hacking) 16 | 17 | ------- 18 | 19 | License: AGPL V3 or later 20 | 21 | #### Contributors List ##### 22 | [Here](https://github.com/screeninvader/ScreenInvader/graphs/contributors) 23 | -------------------------------------------------------------------------------- /config/answer.sh: -------------------------------------------------------------------------------- 1 | # 2 | # ScreenInvader - A shared media experience. Instant and seamless. 3 | # Copyright (C) 2012 Amir Hassan 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | # 19 | 20 | function askHowNet() { 21 | echo "dhcp" 22 | # echo "manual" 23 | } 24 | 25 | function askNetConnection() { 26 | # echo "Wifi" 27 | echo "Ethernet" 28 | } 29 | 30 | function askWifiSSID() { 31 | echo "" 32 | } 33 | 34 | function askWifiEncryption() { 35 | # echo "WPA-PSK" 36 | # echo "WEP" 37 | echo "NONE" 38 | } 39 | 40 | function askWifiPassphrase() { 41 | echo "" 42 | } 43 | 44 | function askHostname() { 45 | echo "screeninvader" 46 | } 47 | 48 | function askManualNetwork() { 49 | echo "" # address 50 | echo "" # netmask 51 | echo "" # gateway 52 | echo "" # nameserver 53 | } 54 | 55 | function askDoReboot() { 56 | return 0 # no need to modify ;) 57 | } 58 | -------------------------------------------------------------------------------- /config/files_black: -------------------------------------------------------------------------------- 1 | /var/cache/apt/pkgcache.bin 2 | /var/cache/apt/srcpkgcache.bin 3 | /usr/share/man/* 4 | /usr/share/locale/* 5 | /usr/share/doc/* 6 | /usr/share/zoneinfo/* 7 | /usr/share/icons/* 8 | /root/.bash_history 9 | /var/cache/debconf* 10 | /usr/share/doc-base/* 11 | /usr/share/fonts/* 12 | /usr/share/info/* 13 | /usr/share/sounds/alsa/* 14 | /usr/share/pixmaps/debian-logo.png 15 | /var/lib/apt/lists/* 16 | -------------------------------------------------------------------------------- /config/keyrings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/config/keyrings -------------------------------------------------------------------------------- /config/packages_black: -------------------------------------------------------------------------------- 1 | info 2 | manpages 3 | rsyslog 4 | tasksel 5 | tasksel-data 6 | aptitude 7 | locales 8 | man-db 9 | whiptail 10 | iptables 11 | traceroute 12 | netcat-traditional 13 | iputils-ping 14 | dmidecode 15 | libcwidget3 16 | libnewt0.52 17 | libnfnetlink0 18 | libsigc++-2.0-0c2a 19 | xserver-xorg-input-all 20 | xserver-xorg-input-synaptics 21 | xserver-xorg-input-wacom 22 | libnewt0.52 23 | 24 | -------------------------------------------------------------------------------- /config/packages_build: -------------------------------------------------------------------------------- 1 | libgl1-mesa-dev 2 | yasm 3 | libfontconfig1-dev 4 | libfribidi-dev 5 | pkg-config 6 | dh-autoreconf 7 | build-essential 8 | libx11-dev 9 | libxext-dev 10 | libdrm-dev 11 | x11proto-dri2-dev 12 | libxfixes-dev 13 | git-core 14 | autoconf 15 | xutils-dev 16 | libtool 17 | pkg-config 18 | libusb-1.0-0-dev 19 | automake 20 | x11proto-randr-dev 21 | libxrandr-dev 22 | xserver-xorg-dev 23 | libvdpau-dev 24 | libzmq3-dev 25 | cmake 26 | cmake-data 27 | libboost1.55-dev 28 | libgtk2.0-dev 29 | libxosd-dev 30 | libkyotocabinet-dev 31 | libboost-thread1.55-dev 32 | libboost-system1.55-dev 33 | libboost-filesystem1.55-dev 34 | libboost-serialization1.55-dev 35 | libboost-program-options1.55-dev 36 | libluajit-5.1-dev 37 | unzip 38 | binutils-dev 39 | libasound2-dev 40 | lua-posix-dev 41 | libxdo-dev 42 | u-boot-tools 43 | libssl-dev 44 | libavahi-client-dev 45 | libasound2-dev 46 | libxslt-dev 47 | python-dev 48 | zlib1g-dev 49 | libffi-dev 50 | npm 51 | libdw-dev 52 | libxss-dev 53 | -------------------------------------------------------------------------------- /config/packages_extra: -------------------------------------------------------------------------------- 1 | openssh-client 2 | vim 3 | rsync 4 | less 5 | 6 | -------------------------------------------------------------------------------- /config/packages_white: -------------------------------------------------------------------------------- 1 | keyboard-configuration 2 | wget 3 | sudo 4 | dialog 5 | alsa-utils 6 | psmisc 7 | awesome 8 | dos2unix 9 | curl 10 | dropbear 11 | xinit 12 | cifs-utils 13 | mingetty 14 | locate 15 | kbd 16 | wireless-tools 17 | mupdf 18 | wpasupplicant 19 | debconf 20 | apache2-utils 21 | feh 22 | xbindkeys 23 | bash 24 | libxosd2 25 | firmware-linux-free 26 | firmware-linux-nonfree 27 | ntp 28 | libfribidi0 29 | libxv1 30 | libvdpau1 31 | vdpauinfo 32 | libxxf86dga1 33 | libboost-program-options1.55.0 34 | dpkg 35 | libc6 36 | libstdc++6 37 | multiarch-support 38 | midori 39 | fcgiwrap 40 | nginx 41 | dpkg-sig 42 | ca-certificates 43 | net-tools 44 | ifupdown 45 | isc-dhcp-client 46 | libnotify-bin 47 | dunst 48 | avahi-daemon 49 | wmctrl 50 | libxv1 51 | libasound2 52 | libvpx1 53 | libx264-142 54 | libxvidcore4 55 | libdv4 56 | libopus0 57 | libmpeg2-4 58 | libmpg123-0 59 | libtheora0 60 | libvorbis0a 61 | libtwolame0 62 | lua-posix 63 | socat 64 | unclutter 65 | libssl1.0.0 66 | libavahi-client3 67 | fuse 68 | xserver-xorg 69 | xserver-xorg-input-kbd 70 | xserver-xorg-input-mouse 71 | x11-xserver-utils 72 | libkyotocabinet16 73 | youtube-dl 74 | libzmq3 75 | libluajit-5.1-2 76 | xdotool 77 | libfaac0 78 | python-virtualenv 79 | python-pybabel 80 | python-pip 81 | uwsgi 82 | uwsgi-plugin-python 83 | cron 84 | zip 85 | 86 | -------------------------------------------------------------------------------- /makeimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | trap 'rm /dev/mapper/`basename $LOOPBACK_DEVICE`; kpartx -d $LOOPBACK_DEVICE; losetup -d $LOOPBACK_DEVICE' EXIT 21 | 22 | dir="`dirname $0`" 23 | MAKEIMAGE_DIR="`cd $dir; pwd`" 24 | 25 | export BOOTSTRAP_LOG="makeimage.log" 26 | 27 | source "$MAKEIMAGE_DIR/.functions.sh" 28 | 29 | function absDir() { 30 | dir="`dirname $1`" 31 | absdir="`cd $dir; pwd`" 32 | echo $absdir 33 | } 34 | 35 | function absPath() { 36 | dir="`dirname $1`" 37 | base="`basename $1`" 38 | absdir="`cd $dir; pwd`" 39 | echo $absdir/$base 40 | } 41 | 42 | function printUsage() { 43 | cat 1>&2 <][-s ] 47 | the target location for the disk image 48 | 49 | Options: 50 | -z write zeroes to the device before creating the partition 51 | -s overwrite the default (= 500MB) disk image size. 52 | -x Install extlinux 53 | -u Install u-boot-sunxi 54 | EOUSAGE 55 | exit 1 56 | } 57 | 58 | WRITE_ZEROES= 59 | IMAGE_SIZE=2000 60 | IMAGE_FILE= 61 | CHROOT_DIR= 62 | 63 | while getopts 'zxus:' c 64 | do 65 | case $c in 66 | z) WRITE_ZEROES="YES";; 67 | s) IMAGE_SIZE="$OPTARG";; 68 | x) MAKE_SYSLINUX="YES";; 69 | u) MAKE_UBOOT="YES";; 70 | \?) printUsage;; 71 | esac 72 | done 73 | 74 | shift $(($OPTIND - 1)) 75 | 76 | [ $# -ne 1 ] && printUsage 77 | 78 | IMAGE_FILE="`absPath $1`" 79 | LOOPBACK_DEVICE="`losetup -f`" 80 | MAKESTICK_OPTS="-s $IMAGE_SIZE" 81 | [ -n "$WRITE_ZEROES" ] && MAKESTICK_OPTS="$MAKESTICK_OPTS -z" 82 | [ -n "$MAKE_SYSLINUX" ] && MAKESTICK_OPTS="$MAKESTICK_OPTS -x" 83 | [ -n "$MAKE_UBOOT" ] && MAKESTICK_OPTS="$MAKESTICK_OPTS -u" 84 | 85 | 86 | [ -n "$CHROOT_DIR" ] && check "Mountpoint $CHROOT_DIR is unused" \ 87 | "! mountpoint -q $CHROOT_DIR" 88 | 89 | check "Creating disk image file $IMAGE_FILE of size $IMAGE_SIZE MB" \ 90 | "dd if=/dev/zero of=$IMAGE_FILE bs=1M count=1 seek=$[ $IMAGE_SIZE - 1 ] > /dev/null" 91 | 92 | check "Setting up disk image file on loopback device $LOOPBACK_DEVICE" \ 93 | "losetup $LOOPBACK_DEVICE $IMAGE_FILE" 94 | 95 | check "Symlinking $LOOPBACK_DEVICE into /dev/mapper" \ 96 | "ln -s $LOOPBACK_DEVICE /dev/mapper/`basename $LOOPBACK_DEVICE`" 97 | 98 | ./makestick.sh $MAKESTICK_OPTS "/dev/mapper/`basename $LOOPBACK_DEVICE`" 99 | err=$? 100 | check "Run makestick.sh $MAKESTICK_OPTS /dev/mapper/`basename $LOOPBACK_DEVICE`" \ 101 | "[ $err -eq 0 ] || false" 102 | 103 | check "Sync" \ 104 | "sync" 105 | 106 | check "Remove symlink" \ 107 | "rm /dev/mapper/`basename $LOOPBACK_DEVICE`" 108 | 109 | exit 0 110 | 111 | -------------------------------------------------------------------------------- /makestick.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | trap 'kpartx -dv $DEVICE' EXIT 22 | 23 | dir="`dirname $0`" 24 | MAKEPARTITION_DIR="`cd $dir; pwd`" 25 | 26 | function printUsage() { 27 | cat 1>&2 <] 31 | 32 | a block special device. 33 | Options: 34 | -s overwrite the default (= 500MB) file system size. 35 | -z write zeroes to the device before creating the partition 36 | -x install extlinux 37 | -u install uboot-sunxi 38 | EOUSAGE 39 | exit 1 40 | } 41 | 42 | function makeSyslinuxConf() { 43 | uuid="`blkid $DEVICE*2 | cut -d '"' -f2`" 44 | templates/syslinux_cfg "$uuid" > "$1/boot/syslinux/syslinux.cfg" 45 | } 46 | 47 | function doCheckPreCond() { 48 | check "'sfdisk' installed" \ 49 | "which sfdisk" 50 | check "'mkfs.vfat' installed" \ 51 | "which mkfs.vfat" 52 | check "'mkfs.ext4' installed" \ 53 | "which mkfs.ext4" 54 | check "'kpartx' installed" \ 55 | "which kpartx" 56 | check "'blkid' installed" \ 57 | "which blkid" 58 | check "'extlinux' installed" \ 59 | "which extlinux" 60 | 61 | } 62 | 63 | export BOOTSTRAP_LOG="makestick.log" 64 | source "$MAKEPARTITION_DIR/.functions.sh" 65 | 66 | WRITE_ZEROES= 67 | SIZE=2000 68 | 69 | while getopts 'zxus:' c 70 | do 71 | case $c in 72 | z) WRITE_ZEROES="YES";; 73 | s) SIZE="$OPTARG";; 74 | x) MAKE_SYSLINUX="YES";; 75 | u) MAKE_UBOOT="YES";; 76 | \?) printUsage;; 77 | esac 78 | done 79 | 80 | shift $(($OPTIND - 1)) 81 | 82 | DEVICE="$1" 83 | 84 | [ $# -ne 1 ] && printUsage; 85 | [ ! -b "$DEVICE" ] && error "Not a block device: $DEVICE"; 86 | [ printf "%d" $SIZE &> /dev/null -o $SIZE -lt 100 ] && error "Invalid size: $SIZE" 87 | 88 | doCheckPreCond 89 | 90 | if [ -n "$WRITE_ZEROES" ]; then 91 | check "Write zeros to device" \ 92 | "dd if=/dev/zero of=$DEVICE bs=1M count=$SIZE" 93 | fi 94 | 95 | check "Re-read partition table" \ 96 | "sfdisk -R $DEVICE" 97 | 98 | cat <> $BOOTSTRAP_LOG 99 | 1,32,c 100 | ,,L 101 | EOT 102 | err=$? 103 | 104 | check "Make partition layout" \ 105 | "[ $err -eq 0 ] || false" 106 | 107 | if [ ! -f "$DEVICE*1" ]; then 108 | DEVICE="`kpartx -asv "$DEVICE" | head -n1 | cut -d" " -f8 2>> $BOOTSTRAP_LOG`" 109 | err=$? 110 | check "Map partion devices" \ 111 | "[ $err -eq 0 ] || false" 112 | fi 113 | 114 | check "Make boot filesystem" \ 115 | "mkfs.vfat $DEVICE*1" 116 | 117 | check "Make root filesystem" \ 118 | "mkfs.ext4 $DEVICE*2" 119 | 120 | check "Enable writeback mode" \ 121 | "tune2fs -o journal_data_writeback $DEVICE*2" 122 | 123 | check "Disable journaling" \ 124 | "tune2fs -O ^has_journal $DEVICE*2" 125 | 126 | tmpdir=`mktemp -d` 127 | check "Make temporary mount dir" \ 128 | "[ $? -eq 0 ]" 129 | 130 | check "Mount file system" \ 131 | "mount $DEVICE*2 $tmpdir" 132 | 133 | if [ -n "$MAKE_SYSLINUX" ]; then 134 | check "Prune syslinux dir" \ 135 | "mkdir -p $tmpdir/boot/syslinux/" 136 | 137 | check "Install extlinux" \ 138 | "extlinux --install $tmpdir/boot/syslinux" 139 | 140 | makeSyslinuxConf "$tmpdir" 141 | check "Make syslinux.cfg" \ 142 | "[ $? -eq 0 ]" 143 | fi 144 | 145 | if [ -n "$MAKE_UBOOT" ]; then 146 | if [ -d "./u-boot-sunxi" ]; then 147 | check "Update u-boot-sunxi" \ 148 | "cd u-boot-sunxi; git pull" 149 | else 150 | check "Clone u-boot-sunxi" \ 151 | "git clone https://github.com/screeninvader/u-boot-sunxi.git" 152 | fi 153 | 154 | check "Make uboot config" \ 155 | "cd u-boot-sunxi; make CROSS_COMPILE=arm-none-eabi- Bananapi_config" 156 | 157 | check "Build uboot" \ 158 | "cd u-boot-sunxi; make CROSS_COMPILE=arm-none-eabi-" 159 | 160 | check "Install uboot" \ 161 | "cd u-boot-sunxi; dd if=u-boot-sunxi-with-spl.bin of=$DEVICE bs=1024 seek=8" 162 | fi 163 | 164 | check "Umount file system" \ 165 | "umount $DEVICE*2" 166 | 167 | check "Remove temporary mount dir" \ 168 | "rmdir $tmpdir" 169 | 170 | check "Check boot system" \ 171 | "fsck.vfat -fa $DEVICE*1" 172 | 173 | check "Check root system" \ 174 | "fsck.ext4 -fa $DEVICE*2" 175 | 176 | 177 | exit 0 178 | 179 | -------------------------------------------------------------------------------- /mountimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | INFO="`kpartx -asv "$1"`" 4 | PART1="`echo "$INFO" | sed 2d | cut -d" " -f3`" 5 | PART2="`echo "$INFO" | sed 1d | cut -d" " -f3`" 6 | 7 | mkdir -p "$2/p1" 8 | mkdir -p "$2/p2" 9 | umount "$2/p1" 10 | umount "$2/p2" 11 | 12 | mount /dev/mapper/$PART1 "$2/p1" 13 | mount /dev/mapper/$PART2 "$2/p2" 14 | 15 | -------------------------------------------------------------------------------- /packaging/makeall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makeall.sh " 5 | fi 6 | echo "$1" "$2" 7 | rm -r screeninvader-* 8 | ./makekernel.sh $1 $2 9 | ./makeconfig.sh $1 $2 10 | ./makecore.sh $1 $2 11 | ./makemisc.sh $1 $2 12 | ./makearch.sh $1 $2 13 | 14 | 15 | -------------------------------------------------------------------------------- /packaging/makearch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makearch.sh " 5 | fi 6 | set -x 7 | mkdir -p screeninvader-arch/DEBIAN 8 | chmod -R 0755 screeninvader-arch 9 | ./makecontrol.sh arch $1 > screeninvader-arch/DEBIAN/control 10 | rm -rf screeninvader-arch/lounge screeninvader-arch/etc 11 | cp -a ../src/$2/lounge screeninvader-arch/ 12 | cp -a ../src/$2/etc screeninvader-arch/ 13 | 14 | dpkg-deb -b screeninvader-arch/ screeninvader-arch-all.deb 15 | dpkg-sig --sign builder screeninvader-arch-all.deb 16 | 17 | -------------------------------------------------------------------------------- /packaging/makeconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makeconfig.sh " 5 | fi 6 | 7 | mkdir -p screeninvader-config/DEBIAN 8 | chmod -R 0755 screeninvader-config 9 | ./makecontrol.sh config $1 > screeninvader-config/DEBIAN/control 10 | rm -rf screeninvader-config/etc 11 | cp -a ../src/etc screeninvader-config/ 12 | chown root:root screeninvader-config/etc/sudoers 13 | chown root:root screeninvader-config/etc/passwd 14 | chmod 0440 screeninvader-config/etc/sudoers 15 | dpkg-deb -b screeninvader-config/ screeninvader-config-all.deb 16 | dpkg-sig --sign builder screeninvader-config-all.deb 17 | -------------------------------------------------------------------------------- /packaging/makecontrol.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makecontrol.sh " 5 | fi 6 | 7 | 8 | cat < 13 | Installed-Size: 1099 14 | Section: misc 15 | Priority: optional 16 | Homepage: http://screeninvader.com 17 | Description: ScreenInvader $1 files 18 | EOCONTROL 19 | 20 | -------------------------------------------------------------------------------- /packaging/makecore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makecore.sh " 5 | fi 6 | 7 | mkdir -p screeninvader-core/DEBIAN 8 | chmod -R 0755 screeninvader-core 9 | ./makecontrol.sh core $1 > screeninvader-core/DEBIAN/control 10 | rm -fr screeninvader-core/root screeninvader-core/lounge screeninvader-core/setup 11 | cp -a ../src/setup ../src/lounge ../src/root screeninvader-core/ 12 | chown -R root:root screeninvader-core/root 13 | chown -R 1000:1000 screeninvader-core/lounge 14 | dpkg-deb -b screeninvader-core/ screeninvader-core-all.deb 15 | dpkg-sig --sign builder screeninvader-core-all.deb 16 | -------------------------------------------------------------------------------- /packaging/makekernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makekernel.sh " 5 | fi 6 | 7 | mkdir -p screeninvader-kernel/DEBIAN 8 | chmod -R 0755 screeninvader-kernel 9 | ./makecontrol.sh kernel $1 > screeninvader-kernel/DEBIAN/control 10 | rm -fr screeninvader-kernel/boot screeninvader-kernel/lib 11 | cp -a ../src/boot ../src/lib screeninvader-kernel/ 12 | dpkg-deb -b screeninvader-kernel/ screeninvader-kernel-all.deb 13 | dpkg-sig --sign builder screeninvader-kernel-all.deb 14 | -------------------------------------------------------------------------------- /packaging/makemisc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 2 ]; then 4 | echo "Usage: makemisc.sh " 5 | fi 6 | 7 | mkdir -p screeninvader-misc/DEBIAN 8 | chmod -R 0755 screeninvader-misc 9 | ./makecontrol.sh misc $1 > screeninvader-misc/DEBIAN/control 10 | rm -rf screeninvader-misc/usr 11 | cp -a ../src/usr screeninvader-misc/ 12 | dpkg-deb -b screeninvader-misc/ screeninvader-misc-all.deb 13 | dpkg-sig --sign builder screeninvader-misc-all.deb 14 | -------------------------------------------------------------------------------- /repo/ScreenInvaderRepoKey.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v2.0.22 (GNU/Linux) 3 | 4 | mQINBFIj1poBEADBFfavXfxsFmeW3txA7DA7Uw0wzxbfAHKs12UM6CSAAJWcbasc 5 | QCd883L40dWd3FBzS+2jD9eHz0byn7zR8xxNHL0TSS+LVV6+R90A/pQNUP1IOJ8F 6 | ju+2nMkAIj6yj6Xxal5nq0EtM5BGWxxIfoWglk7Hc7We+oyhvvCDNXCTsYZkI3fd 7 | n89skXMHfubApaqbMDeSMxbLoHjKZMcGyyy1I5f0R0/Wt4jWOk70Med50KzRtHdv 8 | 3+AaCd77baG/rF2ywYdYk0/5FXZtsG9gjfrgOUBSQmb4tFOz2NqwGBjky5+ckD7H 9 | FlKQjD5veSlfgwgg2oyPAQKhkQcTraGlobpPQ802e7rBQHcnfJU6NBVpTMMWCeaO 10 | Wph9WAmeRraD7GrwxTph/cIH8OLKCdgrh9yopqin0Te9n8vBI3K9shVhxR9jsMjw 11 | Jrd9ztuwali+T56DH5nHZvbbIxATR/E2vDZgXlOAZmyW0OKWwcTWiP1w5HpfMj1e 12 | MJ+WXP1BZ2bBsRktMSXJCihtbkP8w17HZlaBpsfWrh1VfQ7eyWGeSR9mxElpQCx9 13 | 0lF+b+yAzBlkTPpx1tUj7uwZ1Doj0WjJ0fix8sYz8HOjXe7ybaH5Qaln97FkywdA 14 | QvtwcHWwLdQh48MtXPYIrrB3wQQvyzfu/7VR0wZUN/VmJoGddX1wpiSBWQARAQAB 15 | tB5BbWlyIEhhc3NhbiA8YW1pckB2aWVsLXp1Lm9yZz6JAjkEEwECACMFAlIj1poC 16 | GwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRCRBzwIPYAg+xnjD/4/0oiE 17 | /We+YguQfKQywabIZRruLPYeOvcV8dwX+KmT53U7ciZkskmsi0j68nmiWy61/vwl 18 | fCV2Xky/3dSfDcJujQsX4xIBKJ1JNS9n0MGcr2es6253AhAfSHsuitsb640gqLcv 19 | Z0OIBlw71phkA5ozVPr20X83ccdgPdUU78M39IhaxNOvp8pws4XGmJHpjLMMPcLr 20 | HKxcBOR16NQ6r1ECyDaShFqJWeQ0jpVijt2IHd6jbG5oQfndNE/6NByykaZE/+PF 21 | fcgsykx82mJqzLPBSi8EBeEsyxhpLGA9cxRCWz+/OaTIEeJVH2/rsMdelA0fSomv 22 | Fw3UZTvkGDbD5DrjPRjDjENawZzaCzbAVRY2YelqICsRF5PCf62Kk58eFneF9wUj 23 | bxaeQl+5sFdmEvxGBfG5kh/qGnkJZylkUDZ2WiJQQ4A/vHmraJM3sS5TPP4qf8da 24 | /GvADqILXTDz64ZstFcstXMMBHGWs5PN/rVq78J/9F1bkWsNCbYoCBJj8/ZFBUC0 25 | E95BC3LQM53ramhgs/MYh2FoSMBi/7wagXw+7mQ0CuWKu1kb2dsNxv2Q9QKaWQ7s 26 | z/uJBe7GSr9HBR+RJY07Fwi79j23BsebsbIAbQBaVJf4yBXdF20/czKhIKKyyeNX 27 | nGdWHwNZo6Odmw4AC+NSDvX8nGPTrcEDLOkMzrkCDQRSI9aaARAAlmUX2CHMChrZ 28 | +4WQQqZMaU4fhme0STknZZvKs9vK9bVrwom0hwQY/xASmV4wCJwPteygfOcCrln8 29 | fodH0GY+tIVyzJi6iRF0TvwpYFVf2URcAOQFY2aZWTu4dMIaACH1UlwL3/loUTAw 30 | 0XJk++4FmyZcAxJtDz7h5EIauBzX9hT5v3FSdugeB6/A6/nvtgmZQ1rdorRdmkzp 31 | e+JNpXRZQcNVImH6VOPbq53f9xYTjp0OD5zY8XcpPf2rvaOUDlvCrO6ZQf+7WO+/ 32 | b7DlLiBM+lffsZIgGrTv4/dLFcEel5p22s8nNNfM45HczORoUlBxgaFBE063ySL3 33 | 0PUrD/2QsDoS3LgNlxLMkoLGLltHwzSUC36N9L6KMmJXpZU9I6rQVhZYvmmTP2Or 34 | D5aS6y953zgmWHeXfgvI3lqxVdyWJwgKhEs6pv6UXplzgg7PxLJ7i09B+lRKToXw 35 | UA7dGF5uYTSOsmQ/EBttIfI4M2tYkvrsP3rU6d3tLXNwvxKS2Y53600LdiTBH1Ju 36 | dN23RkZWDMWeU+u4qlQ5EvsCUXZYaHICjuh2DwMNrJAwKj9uzV5Oi0r5Lc+djFBJ 37 | UGt9TkjYua4VRRqdzVUxcpp5EWajm6WBU1YqIN2cE+L3pc63ALc0QW/WPZI6jUUS 38 | yr5d25tBr/YB191rNidU5suFMcL7UacAEQEAAYkCHwQYAQIACQUCUiPWmgIbDAAK 39 | CRCRBzwIPYAg+4L5EACgz4YaxYhTczeXbnbsME+OwqEMaQHHr0FjZhoKTcwm3C+d 40 | M7lOIBSarUeDkXmUl3R6azuHNzgxoi545jzGFYtk27r+O/joIQYnocX9vxkhdmtY 41 | KX/RpkAYW5jsyrWg19k0ax7Ct7bQsnALZJeNIWRnWgN1EhfUczsAARZzkO4dRs8k 42 | kC8lU/Z9baMi7tkaW/KyQ9ucxwiS0zB+MJD7jlgzTAoc4hgjQqETl4HK2PaJma3j 43 | Q79DNSkKtC0tTMEi8O9EKSvwA8PPEB/+T5Ztt5YUfjE4Xgm6D7FaIz44WIFxBjkE 44 | Wxz/chFEm/E7QMzCZZ2HhMIf0EkvH2B0czzThSbLZCbF3iMqMGtYOcuGOcFwHNPq 45 | 6V9lpWqj52t+N+lrTgMnPFqWyMN6Wwtgpj6kdSY/DueWf3cZ0ejqO0onBw9uG5Fx 46 | 9qG4Q51kbdE0hoS6MhH2NeYINNI5Ib20y7AXH/4jj6Gyqaydl+WTyQASCj4X2O7o 47 | OVkc6AhBKMz8gE35yRjPVwS8j8QwPBdv4r/NeCp5ibLuXM5kJJb3RdWDdkQSoiTY 48 | 2P2SvPKQHlauzyZTLNAsKAsrIhCqHc9nZaNeqUX8ZDtasfqV4ogr+H2fA6QO/Ws1 49 | R+guNGLJ3l/KTOTdxOryRqnGR4UiCidlB6y7zIWmJjPYNV2lgPhodNupcao0cA== 50 | =gfLZ 51 | -----END PGP PUBLIC KEY BLOCK----- 52 | -------------------------------------------------------------------------------- /repo/conf/distributions: -------------------------------------------------------------------------------- 1 | Origin: viel-zu.org 2 | Label: screeninader 3 | Suite: stable 4 | Codename: latest 5 | Version: 3.0 6 | Architectures: i386 source 7 | Components: main 8 | UDebComponents: main 9 | Description: ScreenInvader packages 10 | SignWith: yes 11 | 12 | -------------------------------------------------------------------------------- /repo/conf/override.latest: -------------------------------------------------------------------------------- 1 | screeninvader-binary Priority optional 2 | screeninvader-binary Section net 3 | screeninvader-config Priority optional 4 | screeninvader-config Section net 5 | screeninvader-core Priority optional 6 | screeninvader-core Section net 7 | screeninvader-misc Priority optional 8 | screeninvader-misc Section net 9 | 10 | 11 | -------------------------------------------------------------------------------- /repo/makerepo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | reprepro -Vb . includedeb latest ../packaging/screeninvader-core-all.deb 4 | reprepro -Vb . includedeb latest ../packaging/screeninvader-config-all.deb 5 | reprepro -Vb . includedeb latest ../packaging/screeninvader-misc-all.deb 6 | reprepro -Vb . includedeb latest ../packaging/screeninvader-binaries-all.deb 7 | -------------------------------------------------------------------------------- /runimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dir="`dirname $0`" 3 | TEST_DIR="`cd $dir; pwd`" 4 | 5 | export BOOTSTRAP_LOG="test.log" 6 | echo "" > $BOOTSTRAP_LOG 7 | source "$TEST_DIR/.functions.sh" 8 | 9 | trap 'kill $(jobs -p); kpartx -dv "$image"' EXIT 10 | 11 | function printUsage() { 12 | cat 1>&2 < [-n] 16 | the target location for the disk image 17 | 18 | Options: 19 | -a either amd64 or armhf 20 | -n run headless 21 | EOUSAGE 22 | exit 1 23 | } 24 | 25 | #### main #### 26 | 27 | ARCH=armhf 28 | HEADLESS= 29 | 30 | while getopts 'a:n' c 31 | do 32 | case $c in 33 | a) ARCH="$OPTARG";; 34 | n) HEADLESS="YES";; 35 | \?) printUsage;; 36 | esac 37 | done 38 | 39 | shift $(($OPTIND - 1)) 40 | 41 | [ $# -ne 1 ] && printUsage 42 | image="$1" 43 | 44 | if [ "$ARCH" == "amd64" ]; then 45 | 46 | sudo id 47 | DEVICE="`sudo kpartx -asv "$image" | tail -n1 | cut -d" " -f3`" 48 | sleep 3 49 | sudo chmod a+rw "/dev/mapper/`basename $DEVICE`" 50 | 51 | if [ -n "$HEADLESS" ]; then 52 | qemu-system-x86_64 -m 4G -smp cores=4,threads=1,sockets=1 -vnc :0,websocket=8085 -enable-kvm -drive format=raw,file="/dev/mapper/`basename $DEVICE`" -net user,hostfwd=tcp::8000-:80,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:8080 -net nic -m 2048 || exit 1 53 | else 54 | qemu-system-x86_64 -m 4G -smp cores=4,threads=1,sockets=1 -vga cirrus -sdl -soundhw ac97 -enable-kvm -drive format=raw,file="/dev/mapper/`basename $DEVICE`" -net user,hostfwd=tcp::8000-:80,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:8080 -net nic -m 2048 || exit 1 55 | fi 56 | elif [ "$ARCH" == "armhf" ]; then 57 | wget -q -c https://mirrors.romanrm.net/sunxi/qemu/initrd.img-3.2.0-4-vexpress 58 | wget -q -c https://mirrors.romanrm.net/sunxi/qemu/vmlinuz-3.2.0-4-vexpress 59 | 60 | if [ -n "$HEADLESS" ]; then 61 | qemu-system-arm -m 1024 -vnc :0,websocket=8085 -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -append root=/dev/mmcblk0p2 -drive format=raw,if=sd,cache=unsafe,file="$image" -net user,hostfwd=tcp::8000-:80,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:8080 -net nic || exit 1 62 | else 63 | qemu-system-arm -m 1024 -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -append root=/dev/mmcblk0p2 -drive format=raw,if=sd,cache=unsafe,file="$image" -sdl -net user,hostfwd=tcp::8000-:80,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:8080 -net nic || exit 1 64 | fi 65 | else 66 | error "Unknown architecture: $ARCH" 67 | fi 68 | 69 | exit 0 70 | -------------------------------------------------------------------------------- /src/amd64/etc/modules: -------------------------------------------------------------------------------- 1 | fuse 2 | -------------------------------------------------------------------------------- /src/amd64/lounge/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | wid=0 2 | ao=alsa 3 | no-ytdl 4 | -------------------------------------------------------------------------------- /src/amd64/lounge/lounge.json: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "active":"false", 4 | "category":" ", 5 | "url":" " } 6 | , 7 | "browser": { 8 | "active":"false", 9 | "category":"", 10 | "url":"" } 11 | , 12 | "display": { 13 | "blank":"false", 14 | "resolution":"1024x768" } 15 | , 16 | "image": { 17 | "active":"false", 18 | "category":"", 19 | "url":"" } 20 | , 21 | "pdf": { 22 | "active":"false", 23 | "category":"", 24 | "url":"" } 25 | , 26 | "player": { 27 | "active":"false", 28 | "category":"", 29 | "url":"" } 30 | , 31 | "playlist": { 32 | "index":"0", 33 | "items": [ ], 34 | "queue":"true" 35 | }, 36 | "radio": { 37 | "active":"false", 38 | "category":"", 39 | "url":"" } 40 | , 41 | "sound": { 42 | "device":"hw:0", 43 | "mute":"false", 44 | "volume":"95" } 45 | , 46 | "shairport": { 47 | "active":"false"} 48 | , 49 | "show": { 50 | "url":""} 51 | } 52 | -------------------------------------------------------------------------------- /src/armhf/etc/X11/xorg.conf: -------------------------------------------------------------------------------- 1 | Section "Screen" 2 | Identifier "fbturboscr" 3 | Device "fbturbodev" 4 | Monitor "fbturbomon" 5 | EndSection 6 | 7 | Section "Device" 8 | Identifier "fbturbodev" 9 | Driver "fbturbo" 10 | Option "fbdev" "/dev/fb0" 11 | Option "SwapbuffersWait" "false" 12 | EndSection 13 | 14 | Section "Monitor" 15 | Identifier "fbturbomon" 16 | Option "DPMS" "false" 17 | EndSection 18 | -------------------------------------------------------------------------------- /src/armhf/etc/modules: -------------------------------------------------------------------------------- 1 | ump 2 | mali 3 | sunxi_cedar_mod 4 | sunxi_gmac 5 | fuse 6 | 7 | -------------------------------------------------------------------------------- /src/armhf/etc/udev/rules.d/50-mali.rules: -------------------------------------------------------------------------------- 1 | KERNEL=="mali", MODE="0660", GROUP="video" 2 | KERNEL=="ump", MODE="0660", GROUP="video" 3 | KERNEL=="cedar_dev", MODE="0777", GROUP="video" 4 | KERNEL=="disp", MODE="0777", GROUP="video" 5 | KERNEL=="g2d", MODE="0777", GROUP="video" 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/armhf/lounge/.asoundrc: -------------------------------------------------------------------------------- 1 | pcm.dmixer { 2 | type dmix 3 | ipc_key 1024 4 | ipc_key_add_uid false 5 | ipc_perm 0660 6 | slave { 7 | pcm "hw:1,0" 8 | rate 48000 9 | channels 2 10 | period_time 0 11 | period_size 2048 12 | buffer_time 0 13 | buffer_size 8096 14 | } 15 | } 16 | 17 | pcm.softvol { 18 | type softvol 19 | slave.pcm "dmixer" 20 | control.name "Softmaster" 21 | control.card 1 22 | } 23 | 24 | pcm.!hdmi-remap { 25 | type asym 26 | playback.pcm { 27 | type plug 28 | slave.pcm "remap-surround71" 29 | } 30 | } 31 | 32 | pcm.!remap-surround71 { 33 | type route 34 | slave.pcm "hw:1,0" 35 | ttable { 36 | 0.0= 1 37 | 1.1= 1 38 | 2.4= 1 39 | 3.5= 1 40 | 4.2= 1 41 | 5.3= 1 42 | 6.6= 1 43 | 7.7= 1 44 | } 45 | } 46 | 47 | ctl.softvol { 48 | type hw 49 | card 1 50 | } 51 | 52 | pcm.!default { 53 | type plug 54 | slave.pcm "softvol" 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/armhf/lounge/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | wid=0 2 | vo=vdpau,x11 3 | ao=alsa 4 | hwdec=vdpau 5 | hwdec-codecs=all 6 | no-ytdl 7 | 8 | -------------------------------------------------------------------------------- /src/armhf/lounge/lounge.json: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "active":"false", 4 | "category":" ", 5 | "url":" " } 6 | , 7 | "browser": { 8 | "active":"false", 9 | "category":"", 10 | "url":"" } 11 | , 12 | "display": { 13 | "blank":"false", 14 | "resolution":"1024x768" } 15 | , 16 | "image": { 17 | "active":"false", 18 | "category":"", 19 | "url":"" } 20 | , 21 | "pdf": { 22 | "active":"false", 23 | "category":"", 24 | "url":"" } 25 | , 26 | "player": { 27 | "active":"false", 28 | "category":"", 29 | "url":"" } 30 | , 31 | "playlist": { 32 | "index":"0", 33 | "items": [ ], 34 | "queue":"true" 35 | }, 36 | "radio": { 37 | "active":"false", 38 | "category":"", 39 | "url":"" } 40 | , 41 | "sound": { 42 | "device":"softvol", 43 | "mute":"false", 44 | "volume":"95" } 45 | , 46 | "shairport": { 47 | "active":"false"} 48 | , 49 | "show": { 50 | "url":""} 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/etc/environment: -------------------------------------------------------------------------------- 1 | LUA_PATH="/usr/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?.lua;./?.lua" 2 | LUA_CPATH="/usr/lib/arm-linux-gnueabihf/lua/5.1/?.so;/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so" 3 | 4 | -------------------------------------------------------------------------------- /src/etc/fstab: -------------------------------------------------------------------------------- 1 | rootfs / rootfs defaults,noatime,nodiratime 0 1 2 | none /var/log/ tmpfs rw,noatime 0 0 3 | none /tmp/ tmpfs rw,noatime 0 0 4 | /dev/sda1 /media vfat defaults,users,gid=100,uid=1000,auto,nofail 0 0 5 | 6 | -------------------------------------------------------------------------------- /src/etc/init.d/fcgiwrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: fcgiwrap 4 | # Required-Start: $remote_fs 5 | # Required-Stop: $remote_fs 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: FastCGI wrapper 11 | # Description: Simple server for running CGI applications over FastCGI 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | 16 | SPAWN_FCGI="/usr/bin/spawn-fcgi" 17 | DAEMON="/usr/sbin/fcgiwrap" 18 | NAME="fcgiwrap" 19 | DESC="FastCGI wrapper" 20 | 21 | PIDFILE="/var/run/$NAME.pids" 22 | 23 | test -x $SPAWN_FCGI || exit 0 24 | test -x $DAEMON || exit 0 25 | 26 | # FCGI_APP Variables 27 | FCGI_CHILDREN="1" 28 | FCGI_SOCKET="/var/run/$NAME.socket" 29 | FCGI_USER="lounge" 30 | FCGI_GROUP="users" 31 | # Socket owner/group (will default to FCGI_USER/FCGI_GROUP if not defined) 32 | FCGI_SOCKET_OWNER="lounge" 33 | FCGI_SOCKET_GROUP="users" 34 | 35 | . /lib/lsb/init-functions 36 | 37 | # Default options, these can be overriden by the information 38 | # at /etc/default/$NAME 39 | #DAEMON_OPTS="" # Additional options given to the server 40 | 41 | DIETIME=10 # Time to wait for the server to die, in seconds 42 | # If this value is set too low you might not 43 | # let some servers to die gracefully and 44 | # 'restart' will not work 45 | QDIETIME=0.5 # The same as DIETIME, but a lot shorter for the 46 | # stop case. 47 | 48 | #STARTTIME=2 # Time to wait for the server to start, in seconds 49 | # If this value is set each time the server is 50 | # started (on start or restart) the script will 51 | # stall to try to determine if it is running 52 | # If it is not set and the server takes time 53 | # to setup a pid file the log message might 54 | # be a false positive (says it did not start 55 | # when it actually did) 56 | 57 | # Include defaults if available 58 | if [ -f /etc/default/$NAME ] ; then 59 | . /etc/default/$NAME 60 | fi 61 | 62 | DAEMONUSER="$FCGI_USER" 63 | 64 | # Check that the user exists (if we set a user) 65 | # Does the user exist? 66 | if [ -n "$DAEMONUSER" ] ; then 67 | if getent passwd | grep -q "^$DAEMONUSER:"; then 68 | # Obtain the uid and gid 69 | DAEMONUID=$(getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}') 70 | DAEMONGID=$(getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}') 71 | else 72 | log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." 73 | exit 1 74 | fi 75 | fi 76 | 77 | set -e 78 | 79 | running_pid() { 80 | # Check if a given process pid's cmdline matches a given name 81 | pid=$1 82 | name=$2 83 | [ -z "$pid" ] && return 1 84 | [ ! -d /proc/$pid ] && return 1 85 | cmd="$(cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1)" 86 | # Is this the expected server 87 | [ "$cmd" != "$name" ] && return 1 88 | return 0 89 | } 90 | 91 | running() { 92 | # Check if the process is running looking at /proc 93 | # (works for all users) 94 | # No pidfile, probably no daemon present 95 | [ ! -f "$PIDFILE" ] && return 1 96 | PIDS="$(cat "$PIDFILE")" 97 | for pid in $PIDS; do 98 | if [ -n "$pid" ]; then 99 | running_pid $pid $DAEMON && return 0 || true 100 | fi 101 | done 102 | return 1 103 | } 104 | 105 | start_server() { 106 | ARGS="-P $PIDFILE" 107 | # Adjust NUMBER of processes 108 | if [ -n "$FCGI_CHILDREN" ]; then 109 | ARGS="$ARGS -F '$FCGI_CHILDREN'" 110 | fi 111 | # Adjust SOCKET or PORT and ADDR 112 | if [ -n "$FCGI_SOCKET" ]; then 113 | ARGS="$ARGS -s '$FCGI_SOCKET'" 114 | elif [ -n "$FCGI_PORT" ]; then 115 | if [ -n "$FCGI_ADDR" ]; then 116 | ARGS="$ARGS -a '$FCGI_ADDR'" 117 | fi 118 | ARGS="$ARGS -p '$FCGI_PORT'" 119 | fi 120 | # Adjust user 121 | if [ -n "$FCGI_USER" ]; then 122 | ARGS="$ARGS -u '$FCGI_USER'" 123 | if [ -n "$FCGI_SOCKET" ]; then 124 | if [ -n "$FCGI_SOCKET_OWNER" ]; then 125 | ARGS="$ARGS -U '$FCGI_SOCKET_OWNER'" 126 | else 127 | ARGS="$ARGS -U '$FCGI_USER'" 128 | fi 129 | fi 130 | fi 131 | # Adjust group 132 | if [ -n "$FCGI_GROUP" ]; then 133 | ARGS="$ARGS -g '$FCGI_GROUP'" 134 | if [ -n "$FCGI_SOCKET" ]; then 135 | if [ -n "$FCGI_SOCKET_GROUP" ]; then 136 | ARGS="$ARGS -G '$FCGI_SOCKET_GROUP'" 137 | else 138 | ARGS="$ARGS -G '$FCGI_GROUP'" 139 | fi 140 | fi 141 | fi 142 | eval $(echo $SPAWN_FCGI $ARGS -- $DAEMON $DAEMON_OPTS) > /dev/null 143 | errcode="$?" 144 | return $errcode 145 | } 146 | 147 | stop_server() { 148 | # Force the process to die killing it manually 149 | [ ! -e "$PIDFILE" ] && return 150 | PIDS="$(cat "$PIDFILE")" 151 | for pid in $PIDS; do 152 | if running_pid $pid $DAEMON; then 153 | kill -15 $pid 154 | # Is it really dead? 155 | sleep "$QDIETIME"s 156 | if running_pid $pid $DAEMON; then 157 | kill -9 $pid 158 | sleep "$QDIETIME"s 159 | if running_pid $pid $DAEMON; then 160 | echo "Cannot kill $NAME (pid=$pid)!" 161 | exit 1 162 | fi 163 | fi 164 | fi 165 | done 166 | rm -f "$PIDFILE" 167 | if [ -n "$FCGI_SOCKET" ]; then 168 | rm -f "$FCGI_SOCKET" 169 | fi 170 | } 171 | 172 | case "$1" in 173 | start) 174 | log_daemon_msg "Starting $DESC" "$NAME" 175 | # Check if it's running first 176 | if running ; then 177 | log_progress_msg "apparently already running" 178 | log_end_msg 0 179 | exit 0 180 | fi 181 | if start_server ; then 182 | # NOTE: Some servers might die some time after they start, 183 | # this code will detect this issue if STARTTIME is set 184 | # to a reasonable value 185 | [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time 186 | if running ; then 187 | # It's ok, the server started and is running 188 | log_end_msg 0 189 | else 190 | # It is not running after we did start 191 | log_end_msg 1 192 | fi 193 | else 194 | # Either we could not start it 195 | log_end_msg 1 196 | fi 197 | ;; 198 | stop|force-stop) 199 | log_daemon_msg "Stopping $DESC" "$NAME" 200 | if running ; then 201 | # Only stop the server if we see it running 202 | errcode=0 203 | stop_server || errcode=$? 204 | log_end_msg $errcode 205 | else 206 | # If it's not running don't do anything 207 | log_progress_msg "apparently not running" 208 | log_end_msg 0 209 | exit 0 210 | fi 211 | ;; 212 | restart|force-reload) 213 | log_daemon_msg "Restarting $DESC" "$NAME" 214 | errcode=0 215 | stop_server || errcode=$? 216 | # Wait some sensible amount, some server need this 217 | [ -n "$DIETIME" ] && sleep $DIETIME 218 | start_server || errcode=$? 219 | [ -n "$STARTTIME" ] && sleep $STARTTIME 220 | running || errcode=$? 221 | log_end_msg $errcode 222 | ;; 223 | status) 224 | 225 | log_daemon_msg "Checking status of $DESC" "$NAME" 226 | if running ; then 227 | log_progress_msg "running" 228 | log_end_msg 0 229 | else 230 | log_progress_msg "apparently not running" 231 | log_end_msg 1 232 | exit 1 233 | fi 234 | ;; 235 | # Use this if the daemon cannot reload 236 | reload) 237 | log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" 238 | log_warning_msg "cannot re-read the config file (use restart)." 239 | ;; 240 | *) 241 | N=/etc/init.d/$NAME 242 | echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 243 | exit 1 244 | ;; 245 | esac 246 | 247 | exit 0 248 | -------------------------------------------------------------------------------- /src/etc/init.d/janosh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: janosh 4 | # Required-Start: 5 | # Required-Stop: 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Starts the root and lounge janosh instances 11 | # Description: 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON="/lounge/bin/janosh" 16 | LOG_LOUNGE="/var/log/janosh-lounge.log" 17 | LOG_ROOT="/var/log/janosh-root.log" 18 | OPTS="-dvpm" 19 | DESC="janosh" 20 | NAME="janosh" 21 | 22 | test -x $DAEMON || exit 1 23 | 24 | set -e 25 | 26 | . /lib/lsb/init-functions 27 | 28 | case "$1" in 29 | start) 30 | log_daemon_msg "Starting $DAEMON lounge" 31 | start-stop-daemon --start --background --pidfile /var/run/janosh-lounge.pid --make-pidfile --user lounge --chuid lounge --startas /bin/bash -- -c "export HOME=/lounge/; export USER=lounge; exec $DAEMON $OPTS &> /var/log/janosh-lounge.log" 32 | log_end_msg $? 33 | log_daemon_msg "Starting $DAEMON root" 34 | start-stop-daemon --start --background --pidfile /var/run/janosh-root.pid --make-pidfile --user root --chuid root --startas /bin/bash -- -c "export HOME=/root/; export USER=root; exec $DAEMON $OPTS &> /var/log/janosh-root.log" 35 | log_end_msg $? 36 | ;; 37 | 38 | stop) 39 | log_daemon_msg "Stopping $DAEMON lounge" 40 | start-stop-daemon --stop --pidfile /var/run/janosh-lounge.pid --retry 10 41 | log_end_msg $? 42 | 43 | log_daemon_msg "Stopping $DAEMON root" 44 | start-stop-daemon --stop --pidfile /var/run/janosh-root.pid --retry 10 45 | log_end_msg $? 46 | ;; 47 | 48 | restart) 49 | $0 stop 50 | $0 start 51 | ;; 52 | 53 | *) 54 | N=/etc/init.d/$NAME 55 | echo "Usage: $N {start|stop|restart}" >&2 56 | exit 1 57 | ;; 58 | esac 59 | 60 | exit 0 61 | -------------------------------------------------------------------------------- /src/etc/init.d/janosh-lounge: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: janosh-lounge 4 | # Required-Start: 5 | # Required-Stop: 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Starts the root and lounge janosh instances 11 | # Description: 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON="/lounge/bin/janosh" 16 | LOG_ROOT="/var/log/janosh-root.log" 17 | OPTS="-dvpm" 18 | DESC="janosh" 19 | NAME="janosh" 20 | 21 | test -x $DAEMON || exit 1 22 | 23 | set -e 24 | 25 | . /lib/lsb/init-functions 26 | 27 | case "$1" in 28 | start) 29 | log_daemon_msg "Starting $DESC lounge" 30 | start-stop-daemon --start --background --pidfile /var/run/janosh-lounge.pid --make-pidfile --user lounge --startas /bin/bash -- -c "export HOME=/lounge/; export USER=lounge; exec sudo -u lounge $DAEMON $OPTS &> /var/log/janosh-lounge.log" 31 | 32 | export HOME=/lounge/; 33 | export USER=lounge; 34 | while ! /lounge/bin/janosh dump; do 35 | echo "Waiting for connection" 36 | sleep 1 37 | done 38 | log_end_msg $? 39 | ;; 40 | 41 | stop) 42 | log_daemon_msg "Stopping $DESC lounge" 43 | start-stop-daemon --stop --pidfile /var/run/janosh-lounge.pid --retry 10 44 | log_end_msg $? 45 | ;; 46 | 47 | restart) 48 | $0 stop 49 | $0 start 50 | ;; 51 | 52 | *) 53 | N=/etc/init.d/$NAME 54 | echo "Usage: $N {start|stop|restart}" >&2 55 | exit 1 56 | ;; 57 | esac 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /src/etc/init.d/janosh-root: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: janosh-root 4 | # Required-Start: 5 | # Required-Stop: 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Starts the root and lounge janosh instances 11 | # Description: 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON="/lounge/bin/janosh" 16 | LOG_ROOT="/var/log/janosh-root.log" 17 | OPTS="-dvpm" 18 | DESC="janosh" 19 | NAME="janosh" 20 | 21 | test -x $DAEMON || exit 1 22 | 23 | set -e 24 | 25 | . /lib/lsb/init-functions 26 | 27 | case "$1" in 28 | start) 29 | log_daemon_msg "Starting $DAEMON root" 30 | start-stop-daemon --start --background --pidfile /var/run/janosh-root.pid --make-pidfile --user root --chuid root --startas /bin/bash -- -c "export HOME=/root/; export USER=root; exec $DAEMON $OPTS &> /var/log/janosh-root.log" 31 | export HOME=/root/; 32 | export USER=root; 33 | while ! /lounge/bin/janosh dump; do 34 | echo "Waiting for connection" 35 | sleep 1 36 | done 37 | 38 | log_end_msg $? 39 | ;; 40 | 41 | stop) 42 | log_daemon_msg "Stopping $DAEMON root" 43 | start-stop-daemon --stop --pidfile /var/run/janosh-root.pid --retry 10 44 | log_end_msg $? 45 | ;; 46 | 47 | restart) 48 | $0 stop 49 | $0 start 50 | ;; 51 | 52 | *) 53 | N=/etc/init.d/$NAME 54 | echo "Usage: $N {start|stop|restart}" >&2 55 | exit 1 56 | ;; 57 | esac 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /src/etc/init.d/nginx: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### BEGIN INIT INFO 4 | # Provides: nginx 5 | # Required-Start: $local_fs $remote_fs $network $syslog 6 | # Required-Stop: $local_fs $remote_fs $network $syslog 7 | # Default-Start: 2 3 4 5 8 | # Default-Stop: 0 1 6 9 | # Short-Description: starts the nginx web server 10 | # Description: starts nginx using start-stop-daemon 11 | ### END INIT INFO 12 | 13 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 14 | DAEMON=/usr/sbin/nginx 15 | NAME=nginx 16 | DESC=nginx 17 | 18 | mkdir -p /var/log/nginx/ 19 | 20 | # Include nginx defaults if available 21 | if [ -f /etc/default/nginx ]; then 22 | . /etc/default/nginx 23 | fi 24 | 25 | test -x $DAEMON || exit 0 26 | 27 | set -e 28 | 29 | . /lib/lsb/init-functions 30 | 31 | test_nginx_config() { 32 | if $DAEMON -t $DAEMON_OPTS >/dev/null 2>&1; then 33 | return 0 34 | else 35 | $DAEMON -t $DAEMON_OPTS 36 | return $? 37 | fi 38 | } 39 | 40 | case "$1" in 41 | start) 42 | echo -n "Starting $DESC: " 43 | test_nginx_config 44 | # Check if the ULIMIT is set in /etc/default/nginx 45 | if [ -n "$ULIMIT" ]; then 46 | # Set the ulimits 47 | ulimit $ULIMIT 48 | fi 49 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ 50 | --exec $DAEMON -- $DAEMON_OPTS || true 51 | echo "$NAME." 52 | ;; 53 | 54 | stop) 55 | echo -n "Stopping $DESC: " 56 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ 57 | --exec $DAEMON || true 58 | echo "$NAME." 59 | ;; 60 | 61 | restart|force-reload) 62 | echo -n "Restarting $DESC: " 63 | start-stop-daemon --stop --quiet --pidfile \ 64 | /var/run/$NAME.pid --exec $DAEMON || true 65 | sleep 1 66 | test_nginx_config 67 | # Check if the ULIMIT is set in /etc/default/nginx 68 | if [ -n "$ULIMIT" ]; then 69 | # Set the ulimits 70 | ulimit $ULIMIT 71 | fi 72 | start-stop-daemon --start --quiet --pidfile \ 73 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true 74 | echo "$NAME." 75 | ;; 76 | 77 | reload) 78 | echo -n "Reloading $DESC configuration: " 79 | test_nginx_config 80 | start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/$NAME.pid \ 81 | --exec $DAEMON || true 82 | echo "$NAME." 83 | ;; 84 | 85 | configtest|testconfig) 86 | echo -n "Testing $DESC configuration: " 87 | if test_nginx_config; then 88 | echo "$NAME." 89 | else 90 | exit $? 91 | fi 92 | ;; 93 | 94 | status) 95 | status_of_proc -p /var/run/$NAME.pid "$DAEMON" nginx && exit 0 || exit $? 96 | ;; 97 | *) 98 | echo "Usage: $NAME {start|stop|restart|reload|force-reload|status|configtest}" >&2 99 | exit 1 100 | ;; 101 | esac 102 | 103 | exit 0 104 | -------------------------------------------------------------------------------- /src/etc/init.d/screeninvader-lounge: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: screeninvader-lounge 4 | # Required-Start: xserver janosh-lounge 5 | # Required-Stop: 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Starts the screeninvader components 11 | # Description: 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | COMPONENTS="notify ip_osd background cache playlist player shairport browser pdf sound show history mouse keyboard websocket" 16 | 17 | set -e 18 | 19 | . /lib/lsb/init-functions 20 | export DISPLAY=:0 21 | 22 | case "$1" in 23 | start) 24 | for comp in $COMPONENTS; do 25 | log_daemon_msg "Starting $comp" 26 | start-stop-daemon --start --background --pidfile /var/run/$comp.lua.pid --make-pidfile -d /lounge/lua/ --startas /bin/bash -- -l -c "export HOME=/lounge; export USER=lounge;cd /lounge/lua; exec sudo -u lounge /lounge/bin/janosh -vf /lounge/lua/$comp.lua &> /var/log/$comp.log" 27 | log_end_msg $? 28 | done 29 | ;; 30 | 31 | stop) 32 | 33 | for comp in $COMPONENTS; do 34 | log_daemon_msg "Stopping $comp" 35 | start-stop-daemon -s TERM --stop --oknodo --pidfile /var/run/$comp.lua.pid --retry 10 36 | log_end_msg $? 37 | done 38 | ;; 39 | 40 | restart) 41 | $0 stop 42 | $0 start 43 | ;; 44 | 45 | *) 46 | N=/etc/init.d/$NAME 47 | echo "Usage: $N {start|stop|restart}" >&2 48 | exit 1 49 | ;; 50 | esac 51 | 52 | exit 0 53 | -------------------------------------------------------------------------------- /src/etc/init.d/screeninvader-root: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: screeninvader-root 4 | # Required-Start: janosh-root 5 | # Required-Stop: janosh-root 6 | # Should-Start: 7 | # Should-Stop: 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Starts the screeinvader root components 11 | # Description: 12 | ### END INIT INFO 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | COMPONENTS="network display system searx" 16 | 17 | set -e 18 | 19 | . /lib/lsb/init-functions 20 | 21 | case "$1" in 22 | start) 23 | for comp in $COMPONENTS; do 24 | log_daemon_msg "Starting $comp" 25 | start-stop-daemon --start --background --pidfile /var/run/$comp.lua.pid --make-pidfile --user root --chuid root -d /root/lua/ --startas /bin/bash -- -l -c "export HOME=/root; export USER=root;cd /root/lua; exec /lounge/bin/janosh -vf /root/lua/$comp.lua &> /var/log/$comp.log" 26 | log_end_msg $? 27 | done 28 | ;; 29 | 30 | stop) 31 | 32 | for comp in $COMPONENTS; do 33 | log_daemon_msg "Stopping $comp" 34 | start-stop-daemon -s TERM --stop --oknodo --pidfile /var/run/$comp.lua.pid --retry 10 35 | log_end_msg $? 36 | done 37 | ;; 38 | 39 | restart) 40 | $0 stop 41 | $0 start 42 | ;; 43 | 44 | *) 45 | N=/etc/init.d/$NAME 46 | echo "Usage: $N {start|stop|restart}" >&2 47 | exit 1 48 | ;; 49 | esac 50 | 51 | exit 0 52 | -------------------------------------------------------------------------------- /src/etc/init.d/xserver: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### BEGIN INIT INFO 4 | # Provides: xserver 5 | # Required-Start: nginx dbus 6 | # Required-Stop: nginx dbus 7 | # Should-Start: 8 | # Should-Stop: 9 | # Default-Start: 2 3 4 5 10 | # Default-Stop: 0 1 6 11 | # Short-Description: Starts the xserver without display manager 12 | # Description: 13 | ### END INIT INFO 14 | 15 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 16 | DAEMON="/usr/bin/xinit" 17 | XINITRC="/lounge/xsession.sh" 18 | XOPTS="-fp /usr/share/fonts/X11/misc -config /etc/X11/xorg.conf -modulepath /usr/lib/xorg/modules/,/usr/local/lib/xorg/modules -nocursor" 19 | DESC="xserver" 20 | NAME=xserver 21 | echo "#### STARTING XSERVER ####" 22 | PIDFILE=/tmp/Xorg.0.pid 23 | 24 | test -x $DAEMON || exit 1 25 | 26 | set -e 27 | 28 | case "$1" in 29 | start) 30 | echo -n "Starting $DESC: " 31 | $DAEMON $XINITRC -- /usr/bin/Xorg $XOPTS &> /dev/null 32 | echo "$NAME." 33 | ;; 34 | 35 | stop) 36 | echo -n "Stopping $DESC: " 37 | # /lounge/bin/player stop 38 | killall -0 Xorg && killall Xorg 39 | echo "$NAME." 40 | ;; 41 | 42 | restart) 43 | $0 stop 44 | sleep 1 45 | $0 start 46 | ;; 47 | 48 | *) 49 | N=/etc/init.d/$NAME 50 | echo "Usage: $N {start|stop|force-stop|restart|force-reload}" >&2 51 | exit 1 52 | ;; 53 | esac 54 | 55 | exit 0 56 | -------------------------------------------------------------------------------- /src/etc/network/interfaces: -------------------------------------------------------------------------------- 1 | # This file describes the network interfaces available on your system 2 | # and how to activate them. For more information, see interfaces(5). 3 | 4 | # The loopback network interface 5 | auto lo eth0 6 | iface lo inet loopback 7 | 8 | # The primary network interface 9 | allow-hotplug eth0 10 | iface eth0 inet dhcp 11 | -------------------------------------------------------------------------------- /src/etc/nginx/fastcgi_params: -------------------------------------------------------------------------------- 1 | fastcgi_param QUERY_STRING $query_string; 2 | fastcgi_param REQUEST_METHOD $request_method; 3 | fastcgi_param CONTENT_TYPE $content_type; 4 | fastcgi_param CONTENT_LENGTH $content_length; 5 | 6 | fastcgi_param SCRIPT_FILENAME $request_filename; 7 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 8 | fastcgi_param REQUEST_URI $request_uri; 9 | fastcgi_param DOCUMENT_URI $document_uri; 10 | fastcgi_param DOCUMENT_ROOT $document_root; 11 | fastcgi_param SERVER_PROTOCOL $server_protocol; 12 | 13 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 14 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 15 | 16 | fastcgi_param REMOTE_ADDR $remote_addr; 17 | fastcgi_param REMOTE_PORT $remote_port; 18 | fastcgi_param SERVER_ADDR $server_addr; 19 | fastcgi_param SERVER_PORT $server_port; 20 | fastcgi_param SERVER_NAME $server_name; 21 | 22 | fastcgi_param HTTPS $https if_not_empty; 23 | 24 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 25 | fastcgi_param REDIRECT_STATUS 200; 26 | -------------------------------------------------------------------------------- /src/etc/nginx/fcgiwrap.conf: -------------------------------------------------------------------------------- 1 | # Include this file on your nginx.conf to support debian cgi-bin scripts using 2 | # fcgiwrap 3 | location /cgi-bin/ { 4 | # Disable gzip (it makes scripts feel slower since they have to complete 5 | # before getting gzipped) 6 | gzip off; 7 | 8 | # Set the root to /usr/lib (inside this location this means that we are 9 | # giving access to the files under /usr/lib/cgi-bin) 10 | root /lounge/www/; 11 | 12 | # Fastcgi socket 13 | fastcgi_pass unix:/var/run/fcgiwrap.socket; 14 | 15 | # Fastcgi parameters, include the standard ones 16 | include /etc/nginx/fastcgi_params; 17 | 18 | # Adjust non standard parameters (SCRIPT_FILENAME) 19 | fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name; 20 | } 21 | -------------------------------------------------------------------------------- /src/etc/nginx/koi-utf: -------------------------------------------------------------------------------- 1 | # This map is not a full koi8-r <> utf8 map: it does not contain 2 | # box-drawing and some other characters. Besides this map contains 3 | # several koi8-u and Byelorussian letters which are not in koi8-r. 4 | # If you need a full and standard map, use contrib/unicode2nginx/koi-utf 5 | # map instead. 6 | 7 | charset_map koi8-r utf-8 { 8 | 9 | 80 E282AC; # euro 10 | 11 | 95 E280A2; # bullet 12 | 13 | 9A C2A0; #   14 | 15 | 9E C2B7; # · 16 | 17 | A3 D191; # small yo 18 | A4 D194; # small Ukrainian ye 19 | 20 | A6 D196; # small Ukrainian i 21 | A7 D197; # small Ukrainian yi 22 | 23 | AD D291; # small Ukrainian soft g 24 | AE D19E; # small Byelorussian short u 25 | 26 | B0 C2B0; # ° 27 | 28 | B3 D081; # capital YO 29 | B4 D084; # capital Ukrainian YE 30 | 31 | B6 D086; # capital Ukrainian I 32 | B7 D087; # capital Ukrainian YI 33 | 34 | B9 E28496; # numero sign 35 | 36 | BD D290; # capital Ukrainian soft G 37 | BE D18E; # capital Byelorussian short U 38 | 39 | BF C2A9; # (C) 40 | 41 | C0 D18E; # small yu 42 | C1 D0B0; # small a 43 | C2 D0B1; # small b 44 | C3 D186; # small ts 45 | C4 D0B4; # small d 46 | C5 D0B5; # small ye 47 | C6 D184; # small f 48 | C7 D0B3; # small g 49 | C8 D185; # small kh 50 | C9 D0B8; # small i 51 | CA D0B9; # small j 52 | CB D0BA; # small k 53 | CC D0BB; # small l 54 | CD D0BC; # small m 55 | CE D0BD; # small n 56 | CF D0BE; # small o 57 | 58 | D0 D0BF; # small p 59 | D1 D18F; # small ya 60 | D2 D180; # small r 61 | D3 D181; # small s 62 | D4 D182; # small t 63 | D5 D183; # small u 64 | D6 D0B6; # small zh 65 | D7 D0B2; # small v 66 | D8 D18C; # small soft sign 67 | D9 D18B; # small y 68 | DA D0B7; # small z 69 | DB D188; # small sh 70 | DC D18D; # small e 71 | DD D189; # small shch 72 | DE D187; # small ch 73 | DF D18A; # small hard sign 74 | 75 | E0 D0AE; # capital YU 76 | E1 D090; # capital A 77 | E2 D091; # capital B 78 | E3 D0A6; # capital TS 79 | E4 D094; # capital D 80 | E5 D095; # capital YE 81 | E6 D0A4; # capital F 82 | E7 D093; # capital G 83 | E8 D0A5; # capital KH 84 | E9 D098; # capital I 85 | EA D099; # capital J 86 | EB D09A; # capital K 87 | EC D09B; # capital L 88 | ED D09C; # capital M 89 | EE D09D; # capital N 90 | EF D09E; # capital O 91 | 92 | F0 D09F; # capital P 93 | F1 D0AF; # capital YA 94 | F2 D0A0; # capital R 95 | F3 D0A1; # capital S 96 | F4 D0A2; # capital T 97 | F5 D0A3; # capital U 98 | F6 D096; # capital ZH 99 | F7 D092; # capital V 100 | F8 D0AC; # capital soft sign 101 | F9 D0AB; # capital Y 102 | FA D097; # capital Z 103 | FB D0A8; # capital SH 104 | FC D0AD; # capital E 105 | FD D0A9; # capital SHCH 106 | FE D0A7; # capital CH 107 | FF D0AA; # capital hard sign 108 | } 109 | -------------------------------------------------------------------------------- /src/etc/nginx/koi-win: -------------------------------------------------------------------------------- 1 | charset_map koi8-r windows-1251 { 2 | 3 | 80 88; # euro 4 | 5 | 95 95; # bullet 6 | 7 | 9A A0; #   8 | 9 | 9E B7; # · 10 | 11 | A3 B8; # small yo 12 | A4 BA; # small Ukrainian ye 13 | 14 | A6 B3; # small Ukrainian i 15 | A7 BF; # small Ukrainian yi 16 | 17 | AD B4; # small Ukrainian soft g 18 | AE A2; # small Byelorussian short u 19 | 20 | B0 B0; # ° 21 | 22 | B3 A8; # capital YO 23 | B4 AA; # capital Ukrainian YE 24 | 25 | B6 B2; # capital Ukrainian I 26 | B7 AF; # capital Ukrainian YI 27 | 28 | B9 B9; # numero sign 29 | 30 | BD A5; # capital Ukrainian soft G 31 | BE A1; # capital Byelorussian short U 32 | 33 | BF A9; # (C) 34 | 35 | C0 FE; # small yu 36 | C1 E0; # small a 37 | C2 E1; # small b 38 | C3 F6; # small ts 39 | C4 E4; # small d 40 | C5 E5; # small ye 41 | C6 F4; # small f 42 | C7 E3; # small g 43 | C8 F5; # small kh 44 | C9 E8; # small i 45 | CA E9; # small j 46 | CB EA; # small k 47 | CC EB; # small l 48 | CD EC; # small m 49 | CE ED; # small n 50 | CF EE; # small o 51 | 52 | D0 EF; # small p 53 | D1 FF; # small ya 54 | D2 F0; # small r 55 | D3 F1; # small s 56 | D4 F2; # small t 57 | D5 F3; # small u 58 | D6 E6; # small zh 59 | D7 E2; # small v 60 | D8 FC; # small soft sign 61 | D9 FB; # small y 62 | DA E7; # small z 63 | DB F8; # small sh 64 | DC FD; # small e 65 | DD F9; # small shch 66 | DE F7; # small ch 67 | DF FA; # small hard sign 68 | 69 | E0 DE; # capital YU 70 | E1 C0; # capital A 71 | E2 C1; # capital B 72 | E3 D6; # capital TS 73 | E4 C4; # capital D 74 | E5 C5; # capital YE 75 | E6 D4; # capital F 76 | E7 C3; # capital G 77 | E8 D5; # capital KH 78 | E9 C8; # capital I 79 | EA C9; # capital J 80 | EB CA; # capital K 81 | EC CB; # capital L 82 | ED CC; # capital M 83 | EE CD; # capital N 84 | EF CE; # capital O 85 | 86 | F0 CF; # capital P 87 | F1 DF; # capital YA 88 | F2 D0; # capital R 89 | F3 D1; # capital S 90 | F4 D2; # capital T 91 | F5 D3; # capital U 92 | F6 C6; # capital ZH 93 | F7 C2; # capital V 94 | F8 DC; # capital soft sign 95 | F9 DB; # capital Y 96 | FA C7; # capital Z 97 | FB D8; # capital SH 98 | FC DD; # capital E 99 | FD D9; # capital SHCH 100 | FE D7; # capital CH 101 | FF DA; # capital hard sign 102 | } 103 | -------------------------------------------------------------------------------- /src/etc/nginx/mime.types: -------------------------------------------------------------------------------- 1 | types { 2 | text/html html htm shtml; 3 | text/css css; 4 | text/xml xml rss; 5 | image/gif gif; 6 | image/jpeg jpeg jpg; 7 | application/x-javascript js; 8 | application/atom+xml atom; 9 | 10 | text/mathml mml; 11 | text/plain txt; 12 | text/vnd.sun.j2me.app-descriptor jad; 13 | text/vnd.wap.wml wml; 14 | text/x-component htc; 15 | 16 | image/png png; 17 | image/tiff tif tiff; 18 | image/vnd.wap.wbmp wbmp; 19 | image/x-icon ico; 20 | image/x-jng jng; 21 | image/x-ms-bmp bmp; 22 | image/svg+xml svg svgz; 23 | 24 | application/java-archive jar war ear; 25 | application/json json; 26 | application/mac-binhex40 hqx; 27 | application/msword doc; 28 | application/pdf pdf; 29 | application/postscript ps eps ai; 30 | application/rtf rtf; 31 | application/vnd.ms-excel xls; 32 | application/vnd.ms-powerpoint ppt; 33 | application/vnd.wap.wmlc wmlc; 34 | application/vnd.google-earth.kml+xml kml; 35 | application/vnd.google-earth.kmz kmz; 36 | application/x-7z-compressed 7z; 37 | application/x-cocoa cco; 38 | application/x-java-archive-diff jardiff; 39 | application/x-java-jnlp-file jnlp; 40 | application/x-makeself run; 41 | application/x-perl pl pm; 42 | application/x-pilot prc pdb; 43 | application/x-rar-compressed rar; 44 | application/x-redhat-package-manager rpm; 45 | application/x-sea sea; 46 | application/x-shockwave-flash swf; 47 | application/x-stuffit sit; 48 | application/x-tcl tcl tk; 49 | application/x-x509-ca-cert der pem crt; 50 | application/x-xpinstall xpi; 51 | application/xhtml+xml xhtml; 52 | application/zip zip; 53 | 54 | application/octet-stream bin exe dll; 55 | application/octet-stream deb; 56 | application/octet-stream dmg; 57 | application/octet-stream eot; 58 | application/octet-stream iso img; 59 | application/octet-stream msi msp msm; 60 | application/ogg ogx; 61 | 62 | audio/midi mid midi kar; 63 | audio/mpeg mpga mpega mp2 mp3 m4a; 64 | audio/ogg oga ogg spx; 65 | audio/x-realaudio ra; 66 | audio/webm weba; 67 | 68 | video/3gpp 3gpp 3gp; 69 | video/mp4 mp4; 70 | video/mpeg mpeg mpg mpe; 71 | video/ogg ogv; 72 | video/quicktime mov; 73 | video/webm webm; 74 | video/x-flv flv; 75 | video/x-mng mng; 76 | video/x-ms-asf asx asf; 77 | video/x-ms-wmv wmv; 78 | video/x-msvideo avi; 79 | } 80 | -------------------------------------------------------------------------------- /src/etc/nginx/naxsi-ui.conf.1.4.1: -------------------------------------------------------------------------------- 1 | [nx_extract] 2 | username = naxsi_web 3 | password = test 4 | port = 8081 5 | rules_path = /etc/nginx/naxsi_core.rules 6 | 7 | [nx_intercept] 8 | port = 8080 9 | 10 | [sql] 11 | dbtype = sqlite 12 | username = root 13 | password = 14 | hostname = 127.0.0.1 15 | dbname = naxsi_sig 16 | 17 | -------------------------------------------------------------------------------- /src/etc/nginx/naxsi.rules: -------------------------------------------------------------------------------- 1 | # Sample rules file for default vhost. 2 | 3 | LearningMode; 4 | SecRulesEnabled; 5 | #SecRulesDisabled; 6 | DeniedUrl "/RequestDenied"; 7 | 8 | ## check rules 9 | CheckRule "$SQL >= 8" BLOCK; 10 | CheckRule "$RFI >= 8" BLOCK; 11 | CheckRule "$TRAVERSAL >= 4" BLOCK; 12 | CheckRule "$EVADE >= 4" BLOCK; 13 | CheckRule "$XSS >= 8" BLOCK; 14 | -------------------------------------------------------------------------------- /src/etc/nginx/naxsi_core.rules: -------------------------------------------------------------------------------- 1 | ################################## 2 | ## INTERNAL RULES IDS:1-10 ## 3 | ################################## 4 | #weird_request : 1 5 | #big_body : 2 6 | #no_content_type : 3 7 | 8 | #MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999; 9 | 10 | ################################## 11 | ## SQL Injections IDs:1000-1099 ## 12 | ################################## 13 | MainRule "rx:select|union|update|delete|insert|table|from|ascii|hex|unhex" "msg:sql keywords" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1000; 14 | MainRule "str:\"" "msg:double quote" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1001; 15 | MainRule "str:0x" "msg:0x, possible hex encoding" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:2" id:1002; 16 | ## Hardcore rules 17 | MainRule "str:/*" "msg:mysql comment (/*)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:8" id:1003; 18 | MainRule "str:*/" "msg:mysql comment (*/)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:8" id:1004; 19 | MainRule "str:|" "msg:mysql keyword (|)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:8" id:1005; 20 | MainRule "rx:&&" "msg:mysql keyword (&&)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:8" id:1006; 21 | ## end of hardcore rules 22 | MainRule "str:--" "msg:mysql comment (--)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1007; 23 | MainRule "str:;" "msg:; in stuff" "mz:BODY|URL|ARGS" "s:$SQL:4" id:1008; 24 | MainRule "str:=" "msg:equal in var, probable sql/xss" "mz:ARGS|BODY" "s:$SQL:2" id:1009; 25 | MainRule "str:(" "msg:parenthesis, probable sql/xss" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1010; 26 | MainRule "str:)" "msg:parenthesis, probable sql/xss" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1011; 27 | MainRule "str:'" "msg:simple quote" "mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1013; 28 | MainRule "str:\"" "msg:double quote" "mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1014; 29 | MainRule "str:," "msg:, in stuff" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1015; 30 | MainRule "str:#" "msg:mysql comment (#)" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$SQL:4" id:1016; 31 | 32 | ############################### 33 | ## OBVIOUS RFI IDs:1100-1199 ## 34 | ############################### 35 | MainRule "str:http://" "msg:html comment tag" "mz:ARGS|BODY|$HEADERS_VAR:Cookie" "s:$RFI:8" id:1100; 36 | MainRule "str:https://" "msg:html comment tag" "mz:ARGS|BODY|$HEADERS_VAR:Cookie" "s:$RFI:8" id:1101; 37 | MainRule "str:ftp://" "msg:html comment tag" "mz:ARGS|BODY|$HEADERS_VAR:Cookie" "s:$RFI:8" id:1102; 38 | MainRule "str:php://" "msg:html comment tag" "mz:ARGS|BODY|$HEADERS_VAR:Cookie" "s:$RFI:8" id:1103; 39 | 40 | ####################################### 41 | ## Directory traversal IDs:1200-1299 ## 42 | ####################################### 43 | MainRule "str:.." "msg:html comment tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:4" id:1200; 44 | MainRule "str:/etc/passwd" "msg:html comment tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:4" id:1202; 45 | MainRule "str:c:\\" "msg:html comment tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:4" id:1203; 46 | MainRule "str:cmd.exe" "msg:html comment tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:4" id:1204; 47 | MainRule "str:\\" "msg:html comment tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:4" id:1205; 48 | #MainRule "str:/" "msg:slash in args" "mz:ARGS|BODY|$HEADERS_VAR:Cookie" "s:$TRAVERSAL:2" id:1206; 49 | ######################################## 50 | ## Cross Site Scripting IDs:1300-1399 ## 51 | ######################################## 52 | MainRule "str:<" "msg:html open tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1302; 53 | MainRule "str:>" "msg:html close tag" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1303; 54 | MainRule "str:'" "msg:simple quote" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1306; 55 | MainRule "str:\"" "msg:double quote" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1307; 56 | MainRule "str:(" "msg:parenthesis" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1308; 57 | MainRule "str:)" "msg:parenthesis" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1309; 58 | MainRule "str:[" "msg:html close comment tag" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$XSS:4" id:1310; 59 | MainRule "str:]" "msg:html close comment tag" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$XSS:4" id:1311; 60 | MainRule "str:~" "msg:html close comment tag" "mz:BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:$XSS:4" id:1312; 61 | MainRule "str:;" "msg:semi coma" "mz:ARGS|URL|BODY" "s:$XSS:8" id:1313; 62 | MainRule "str:`" "msg:grave accent !" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1314; 63 | MainRule "rx:%[2|3]." "msg:double encoding !" "mz:ARGS|URL|BODY|$HEADERS_VAR:Cookie" "s:$XSS:8" id:1315; 64 | 65 | #################################### 66 | ## Evading tricks IDs: 1400-1500 ## 67 | #################################### 68 | MainRule "str:&#" "msg: utf7/8 encoding" "mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" "s:$EVADE:4" id:1400; 69 | MainRule "str:%U" "msg: M$ encoding" "mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" "s:$EVADE:4" id:1401; 70 | MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" "msg:Content is neither mulipart/x-www-form.." "mz:$HEADERS_VAR:Content-type" "s:$EVADE:4" id:1402; 71 | 72 | ############################# 73 | ## File uploads: 1500-1600 ## 74 | ############################# 75 | MainRule "rx:.ph*|.asp*" "msg:asp/php file upload!" "mz:FILE_EXT" "s:$UPLOAD:8" id:1500; 76 | -------------------------------------------------------------------------------- /src/etc/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user lounge users; 2 | worker_processes 4; 3 | pid /run/nginx.pid; 4 | 5 | events { 6 | worker_connections 768; 7 | # multi_accept on; 8 | } 9 | 10 | http { 11 | 12 | ## 13 | # Basic Settings 14 | ## 15 | 16 | sendfile on; 17 | tcp_nopush on; 18 | tcp_nodelay on; 19 | keepalive_timeout 65; 20 | types_hash_max_size 2048; 21 | # server_tokens off; 22 | 23 | # server_names_hash_bucket_size 64; 24 | # server_name_in_redirect off; 25 | 26 | include /etc/nginx/mime.types; 27 | default_type application/octet-stream; 28 | 29 | ## 30 | # Logging Settings 31 | ## 32 | 33 | access_log /var/log/nginxaccess.log; 34 | error_log /var/log/nginxerror.log; 35 | 36 | ## 37 | # Gzip Settings 38 | ## 39 | 40 | gzip on; 41 | gzip_disable "msie6"; 42 | 43 | # gzip_vary on; 44 | # gzip_proxied any; 45 | # gzip_comp_level 6; 46 | # gzip_buffers 16 8k; 47 | # gzip_http_version 1.1; 48 | # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; 49 | 50 | ## 51 | # nginx-naxsi config 52 | ## 53 | # Uncomment it if you installed nginx-naxsi 54 | ## 55 | 56 | #include /etc/nginx/naxsi_core.rules; 57 | 58 | ## 59 | # nginx-passenger config 60 | ## 61 | # Uncomment it if you installed nginx-passenger 62 | ## 63 | 64 | #passenger_root /usr; 65 | #passenger_ruby /usr/bin/ruby; 66 | 67 | ## 68 | # Virtual Host Configs 69 | ## 70 | 71 | include /etc/nginx/conf.d/*.conf; 72 | include /etc/nginx/sites-enabled/*; 73 | 74 | } 75 | 76 | #mail { 77 | # # See sample authentication script at: 78 | # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript 79 | # 80 | # # auth_http localhost/auth.php; 81 | # # pop3_capabilities "TOP" "USER"; 82 | # # imap_capabilities "IMAP4rev1" "UIDPLUS"; 83 | # 84 | # server { 85 | # listen localhost:110; 86 | # protocol pop3; 87 | # proxy on; 88 | # } 89 | # 90 | # server { 91 | # listen localhost:143; 92 | # protocol imap; 93 | # proxy on; 94 | # } 95 | #} 96 | -------------------------------------------------------------------------------- /src/etc/nginx/proxy_params: -------------------------------------------------------------------------------- 1 | proxy_set_header Host $http_host; 2 | proxy_set_header X-Real-IP $remote_addr; 3 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 4 | proxy_set_header X-Forwarded-Proto $scheme; 5 | -------------------------------------------------------------------------------- /src/etc/nginx/scgi_params: -------------------------------------------------------------------------------- 1 | scgi_param REQUEST_METHOD $request_method; 2 | scgi_param REQUEST_URI $request_uri; 3 | scgi_param QUERY_STRING $query_string; 4 | scgi_param CONTENT_TYPE $content_type; 5 | 6 | scgi_param DOCUMENT_URI $document_uri; 7 | scgi_param DOCUMENT_ROOT $document_root; 8 | scgi_param SCGI 1; 9 | scgi_param SERVER_PROTOCOL $server_protocol; 10 | 11 | scgi_param REMOTE_ADDR $remote_addr; 12 | scgi_param REMOTE_PORT $remote_port; 13 | scgi_param SERVER_PORT $server_port; 14 | scgi_param SERVER_NAME $server_name; 15 | -------------------------------------------------------------------------------- /src/etc/nginx/sites-available/default: -------------------------------------------------------------------------------- 1 | # You may add here your 2 | # server { 3 | # ... 4 | # } 5 | # statements for each of your virtual hosts to this file 6 | 7 | ## 8 | # You should look at the following URL's in order to grasp a solid understanding 9 | # of Nginx configuration files in order to fully unleash the power of Nginx. 10 | # http://wiki.nginx.org/Pitfalls 11 | # http://wiki.nginx.org/QuickStart 12 | # http://wiki.nginx.org/Configuration 13 | # 14 | # Generally, you will want to move this file somewhere, and start with a clean 15 | # file but keep this around for reference. Or just disable in sites-enabled. 16 | # 17 | # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. 18 | ## 19 | 20 | server { 21 | listen 80 default_server; 22 | client_max_body_size 4000M; 23 | 24 | root /lounge/www/; 25 | index index.html index.htm; 26 | 27 | # Make site accessible from http://localhost/ 28 | server_name 0.0.0.0; 29 | 30 | add_header 'Access-Control-Allow-Origin' '*'; 31 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT'; 32 | add_header 'Access-Control-Allow-Credentials' 'true'; 33 | add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type'; 34 | 35 | location / { 36 | # First attempt to serve request as file, then 37 | # as directory, then fall back to displaying a 404. 38 | try_files $uri $uri/ =404; 39 | # Uncomment to enable naxsi on this location 40 | # include /etc/nginx/naxsi.rules 41 | 42 | } 43 | 44 | location = /searx { rewrite ^ /searx/; } 45 | 46 | location /searx { 47 | try_files $uri @searx; 48 | } 49 | 50 | location @searx { 51 | uwsgi_param SCRIPT_NAME /searx; 52 | include uwsgi_params; 53 | uwsgi_modifier1 30; 54 | uwsgi_pass unix:/run/uwsgi/app/searx/socket; 55 | } 56 | 57 | location /peerflix/ { 58 | proxy_pass http://127.0.0.1:9000/; 59 | } 60 | 61 | location /views/ { 62 | proxy_pass http://127.0.0.1:9000; 63 | } 64 | 65 | location /images/ { 66 | proxy_pass http://127.0.0.1:9000; 67 | } 68 | 69 | location /socket.io/ { 70 | proxy_pass http://127.0.0.1:9000; 71 | } 72 | 73 | location /torrents { 74 | proxy_pass http://127.0.0.1:9000; 75 | } 76 | 77 | 78 | # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests 79 | #location /RequestDenied { 80 | # proxy_pass http://127.0.0.1:8080; 81 | #} 82 | 83 | error_page 404 /404.html; 84 | 85 | # redirect server error pages to the static page /50x.html 86 | # 87 | #error_page 500 502 503 504 /50x.html; 88 | #location = /50x.html { 89 | # root /usr/share/nginx/html; 90 | #} 91 | 92 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 93 | # 94 | #location ~ \.php$ { 95 | # fastcgi_split_path_info ^(.+\.php)(/.+)$; 96 | # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini 97 | # 98 | # # With php5-cgi alone: 99 | # fastcgi_pass 127.0.0.1:9000; 100 | # # With php5-fpm: 101 | # fastcgi_pass unix:/var/run/php5-fpm.sock; 102 | # fastcgi_index index.php; 103 | # include fastcgi_params; 104 | #} 105 | 106 | # deny access to .htaccess files, if Apache's document root 107 | # concurs with nginx's one 108 | # 109 | #location ~ /\.ht { 110 | # deny all; 111 | #} 112 | 113 | include /etc/nginx/fcgiwrap.conf; 114 | 115 | } 116 | 117 | 118 | # another virtual host using mix of IP-, name-, and port-based configuration 119 | # 120 | #server { 121 | # listen 8000; 122 | # listen somename:8080; 123 | # server_name somename alias another.alias; 124 | # root html; 125 | # index index.html index.htm; 126 | # 127 | # location / { 128 | # try_files $uri $uri/ =404; 129 | # } 130 | #} 131 | 132 | 133 | # HTTPS server 134 | # 135 | #server { 136 | # listen 443; 137 | # server_name localhost; 138 | # 139 | # root html; 140 | # index index.html index.htm; 141 | # 142 | # ssl on; 143 | # ssl_certificate cert.pem; 144 | # ssl_certificate_key cert.key; 145 | # 146 | # ssl_session_timeout 5m; 147 | # 148 | # ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; 149 | # ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; 150 | # ssl_prefer_server_ciphers on; 151 | # 152 | # location / { 153 | # try_files $uri $uri/ =404; 154 | # } 155 | #} 156 | -------------------------------------------------------------------------------- /src/etc/nginx/sites-enabled/default: -------------------------------------------------------------------------------- 1 | /etc/nginx/sites-available/default -------------------------------------------------------------------------------- /src/etc/nginx/uwsgi_params: -------------------------------------------------------------------------------- 1 | uwsgi_param QUERY_STRING $query_string; 2 | uwsgi_param REQUEST_METHOD $request_method; 3 | uwsgi_param CONTENT_TYPE $content_type; 4 | uwsgi_param CONTENT_LENGTH $content_length; 5 | 6 | uwsgi_param REQUEST_URI $request_uri; 7 | uwsgi_param PATH_INFO $document_uri; 8 | uwsgi_param DOCUMENT_ROOT $document_root; 9 | uwsgi_param SERVER_PROTOCOL $server_protocol; 10 | uwsgi_param UWSGI_SCHEME $scheme; 11 | 12 | uwsgi_param REMOTE_ADDR $remote_addr; 13 | uwsgi_param REMOTE_PORT $remote_port; 14 | uwsgi_param SERVER_PORT $server_port; 15 | uwsgi_param SERVER_NAME $server_name; 16 | -------------------------------------------------------------------------------- /src/etc/nginx/win-utf: -------------------------------------------------------------------------------- 1 | # This map is not a full windows-1251 <> utf8 map: it does not 2 | # contain Serbian and Macedonian letters. If you need a full map, 3 | # use contrib/unicode2nginx/win-utf map instead. 4 | 5 | charset_map windows-1251 utf-8 { 6 | 7 | 82 E2809A; # single low-9 quotation mark 8 | 9 | 84 E2809E; # double low-9 quotation mark 10 | 85 E280A6; # ellipsis 11 | 86 E280A0; # dagger 12 | 87 E280A1; # double dagger 13 | 88 E282AC; # euro 14 | 89 E280B0; # per mille 15 | 16 | 91 E28098; # left single quotation mark 17 | 92 E28099; # right single quotation mark 18 | 93 E2809C; # left double quotation mark 19 | 94 E2809D; # right double quotation mark 20 | 95 E280A2; # bullet 21 | 96 E28093; # en dash 22 | 97 E28094; # em dash 23 | 24 | 99 E284A2; # trade mark sign 25 | 26 | A0 C2A0; #   27 | A1 D18E; # capital Byelorussian short U 28 | A2 D19E; # small Byelorussian short u 29 | 30 | A4 C2A4; # currency sign 31 | A5 D290; # capital Ukrainian soft G 32 | A6 C2A6; # borken bar 33 | A7 C2A7; # section sign 34 | A8 D081; # capital YO 35 | A9 C2A9; # (C) 36 | AA D084; # capital Ukrainian YE 37 | AB C2AB; # left-pointing double angle quotation mark 38 | AC C2AC; # not sign 39 | AD C2AD; # soft hypen 40 | AE C2AE; # (R) 41 | AF D087; # capital Ukrainian YI 42 | 43 | B0 C2B0; # ° 44 | B1 C2B1; # plus-minus sign 45 | B2 D086; # capital Ukrainian I 46 | B3 D196; # small Ukrainian i 47 | B4 D291; # small Ukrainian soft g 48 | B5 C2B5; # micro sign 49 | B6 C2B6; # pilcrow sign 50 | B7 C2B7; # · 51 | B8 D191; # small yo 52 | B9 E28496; # numero sign 53 | BA D194; # small Ukrainian ye 54 | BB C2BB; # right-pointing double angle quotation mark 55 | 56 | BF D197; # small Ukrainian yi 57 | 58 | C0 D090; # capital A 59 | C1 D091; # capital B 60 | C2 D092; # capital V 61 | C3 D093; # capital G 62 | C4 D094; # capital D 63 | C5 D095; # capital YE 64 | C6 D096; # capital ZH 65 | C7 D097; # capital Z 66 | C8 D098; # capital I 67 | C9 D099; # capital J 68 | CA D09A; # capital K 69 | CB D09B; # capital L 70 | CC D09C; # capital M 71 | CD D09D; # capital N 72 | CE D09E; # capital O 73 | CF D09F; # capital P 74 | 75 | D0 D0A0; # capital R 76 | D1 D0A1; # capital S 77 | D2 D0A2; # capital T 78 | D3 D0A3; # capital U 79 | D4 D0A4; # capital F 80 | D5 D0A5; # capital KH 81 | D6 D0A6; # capital TS 82 | D7 D0A7; # capital CH 83 | D8 D0A8; # capital SH 84 | D9 D0A9; # capital SHCH 85 | DA D0AA; # capital hard sign 86 | DB D0AB; # capital Y 87 | DC D0AC; # capital soft sign 88 | DD D0AD; # capital E 89 | DE D0AE; # capital YU 90 | DF D0AF; # capital YA 91 | 92 | E0 D0B0; # small a 93 | E1 D0B1; # small b 94 | E2 D0B2; # small v 95 | E3 D0B3; # small g 96 | E4 D0B4; # small d 97 | E5 D0B5; # small ye 98 | E6 D0B6; # small zh 99 | E7 D0B7; # small z 100 | E8 D0B8; # small i 101 | E9 D0B9; # small j 102 | EA D0BA; # small k 103 | EB D0BB; # small l 104 | EC D0BC; # small m 105 | ED D0BD; # small n 106 | EE D0BE; # small o 107 | EF D0BF; # small p 108 | 109 | F0 D180; # small r 110 | F1 D181; # small s 111 | F2 D182; # small t 112 | F3 D183; # small u 113 | F4 D184; # small f 114 | F5 D185; # small kh 115 | F6 D186; # small ts 116 | F7 D187; # small ch 117 | F8 D188; # small sh 118 | F9 D189; # small shch 119 | FA D18A; # small hard sign 120 | FB D18B; # small y 121 | FC D18C; # small soft sign 122 | FD D18D; # small e 123 | FE D18E; # small yu 124 | FF D18F; # small ya 125 | } 126 | -------------------------------------------------------------------------------- /src/etc/profile: -------------------------------------------------------------------------------- 1 | # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) 2 | # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). 3 | 4 | if [ "`id -u`" -eq 0 ]; then 5 | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 6 | else 7 | PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" 8 | fi 9 | export PATH 10 | 11 | if [ "$PS1" ]; then 12 | if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then 13 | # The file bash.bashrc already sets the default PS1. 14 | # PS1='\h:\w\$ ' 15 | if [ -f /etc/bash.bashrc ]; then 16 | . /etc/bash.bashrc 17 | fi 18 | else 19 | if [ "`id -u`" -eq 0 ]; then 20 | PS1='# ' 21 | else 22 | PS1='$ ' 23 | fi 24 | fi 25 | fi 26 | 27 | # The default umask is now handled by pam_umask. 28 | # See pam_umask(8) and /etc/login.defs. 29 | 30 | if [ -d /etc/profile.d ]; then 31 | for i in /etc/profile.d/*.sh; do 32 | if [ -r $i ]; then 33 | . $i 34 | fi 35 | done 36 | unset i 37 | fi 38 | 39 | export LUA_PATH="/usr/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?.lua;./?.lua" 40 | export LUA_CPATH="/usr/lib/arm-linux-gnueabihf/lua/5.1/?.so;/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so" 41 | 42 | -------------------------------------------------------------------------------- /src/etc/rc.local: -------------------------------------------------------------------------------- 1 | mkdir -p /var/log/nginx 2 | chmod a+rw /var/log/nginx 3 | exit 0 4 | 5 | -------------------------------------------------------------------------------- /src/etc/sudoers: -------------------------------------------------------------------------------- 1 | # /etc/sudoers 2 | # 3 | # This file MUST be edited with the 'visudo' command as root. 4 | # 5 | # See the man page for details on how to write a sudoers file. 6 | # 7 | 8 | Defaults env_reset 9 | 10 | # Host alias specification 11 | 12 | # User alias specification 13 | 14 | # Cmnd alias specification 15 | 16 | # User privilege specification 17 | root ALL=(ALL) ALL 18 | 19 | # Allow members of group sudo to execute any command 20 | # (Note that later entries override this, so you might need to move 21 | # it further down) 22 | %sudo ALL=(ALL) ALL 23 | # 24 | #includedir /etc/sudoers.d 25 | lounge ALL = NOPASSWD: /lounge/bin/gainroot 26 | 27 | -------------------------------------------------------------------------------- /src/etc/sysctl.conf: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/sysctl.conf - Configuration file for setting system variables 3 | # See /etc/sysctl.d/ for additional system variables. 4 | # See sysctl.conf (5) for information. 5 | # 6 | 7 | #kernel.domainname = example.com 8 | 9 | # Uncomment the following to stop low-level messages on console 10 | #kernel.printk = 3 4 1 3 11 | 12 | ##############################################################3 13 | # Functions previously found in netbase 14 | # 15 | 16 | # Uncomment the next two lines to enable Spoof protection (reverse-path filter) 17 | # Turn on Source Address Verification in all interfaces to 18 | # prevent some spoofing attacks 19 | #net.ipv4.conf.default.rp_filter=1 20 | #net.ipv4.conf.all.rp_filter=1 21 | 22 | # Uncomment the next line to enable TCP/IP SYN cookies 23 | # See http://lwn.net/Articles/277146/ 24 | # Note: This may impact IPv6 TCP sessions too 25 | #net.ipv4.tcp_syncookies=1 26 | 27 | # Uncomment the next line to enable packet forwarding for IPv4 28 | #net.ipv4.ip_forward=1 29 | 30 | # Uncomment the next line to enable packet forwarding for IPv6 31 | # Enabling this option disables Stateless Address Autoconfiguration 32 | # based on Router Advertisements for this host 33 | #net.ipv6.conf.all.forwarding=1 34 | 35 | 36 | ################################################################### 37 | # Additional settings - these settings can improve the network 38 | # security of the host and prevent against some network attacks 39 | # including spoofing attacks and man in the middle attacks through 40 | # redirection. Some network environments, however, require that these 41 | # settings are disabled so review and enable them as needed. 42 | # 43 | # Do not accept ICMP redirects (prevent MITM attacks) 44 | #net.ipv4.conf.all.accept_redirects = 0 45 | #net.ipv6.conf.all.accept_redirects = 0 46 | # _or_ 47 | # Accept ICMP redirects only for gateways listed in our default 48 | # gateway list (enabled by default) 49 | # net.ipv4.conf.all.secure_redirects = 1 50 | # 51 | # Do not send ICMP redirects (we are not a router) 52 | #net.ipv4.conf.all.send_redirects = 0 53 | # 54 | # Do not accept IP source route packets (we are not a router) 55 | #net.ipv4.conf.all.accept_source_route = 0 56 | #net.ipv6.conf.all.accept_source_route = 0 57 | # 58 | # Log Martian Packets 59 | #net.ipv4.conf.all.log_martians = 1 60 | # 61 | #net.ipv4.tcp_tw_recycle=1 62 | net.ipv4.tcp_tw_reuse=1 63 | -------------------------------------------------------------------------------- /src/etc/systemd/system/autologin@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Getty on %I 10 | Documentation=man:agetty(8) man:systemd-getty-generator(8) 11 | Documentation=http://0pointer.de/blog/projects/serial-console.html 12 | After=systemd-user-sessions.service plymouth-quit-wait.service 13 | After=rc-local.service 14 | 15 | # If additional gettys are spawned during boot then we should make 16 | # sure that this is synchronized before getty.target, even though 17 | # getty.target didn't actually pull it in. 18 | Before=getty.target 19 | IgnoreOnIsolate=yes 20 | 21 | # On systems without virtual consoles, don't start any getty. Note 22 | # that serial gettys are covered by serial-getty@.service, not this 23 | # unit. 24 | ConditionPathExists=/dev/tty0 25 | 26 | [Service] 27 | # the VT is cleared by TTYVTDisallocate 28 | ExecStart=-/sbin/mingetty --autologin root %I 29 | Type=idle 30 | Restart=no 31 | RestartSec=0 32 | UtmpIdentifier=%I 33 | TTYPath=/dev/%I 34 | TTYReset=yes 35 | TTYVHangup=yes 36 | TTYVTDisallocate=yes 37 | KillMode=process 38 | IgnoreSIGPIPE=no 39 | SendSIGHUP=yes 40 | Alias=getty.target.wants/getty@tty2.service 41 | # Unset locale for the console getty since the console has problems 42 | # displaying some internationalized messages. 43 | Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= 44 | 45 | [Install] 46 | WantedBy=getty.target 47 | DefaultInstance=tty1 48 | 49 | -------------------------------------------------------------------------------- /src/etc/systemd/system/getty@tty1.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Getty on %I 10 | Documentation=man:agetty(8) man:systemd-getty-generator(8) 11 | Documentation=http://0pointer.de/blog/projects/serial-console.html 12 | After=systemd-user-sessions.service plymouth-quit-wait.service 13 | After=rc-local.service 14 | 15 | # If additional gettys are spawned during boot then we should make 16 | # sure that this is synchronized before getty.target, even though 17 | # getty.target didn't actually pull it in. 18 | Before=getty.target 19 | IgnoreOnIsolate=yes 20 | 21 | # On systems without virtual consoles, don't start any getty. Note 22 | # that serial gettys are covered by serial-getty@.service, not this 23 | # unit. 24 | ConditionPathExists=/dev/tty0 25 | 26 | [Service] 27 | # the VT is cleared by TTYVTDisallocate 28 | ExecStart=-/sbin/mingetty --autologin root %I 29 | Type=idle 30 | Restart=no 31 | RestartSec=0 32 | UtmpIdentifier=%I 33 | TTYPath=/dev/%I 34 | TTYReset=yes 35 | TTYVHangup=yes 36 | TTYVTDisallocate=yes 37 | KillMode=process 38 | IgnoreSIGPIPE=no 39 | SendSIGHUP=yes 40 | Alias=getty.target.wants/getty@tty2.service 41 | # Unset locale for the console getty since the console has problems 42 | # displaying some internationalized messages. 43 | Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= 44 | 45 | [Install] 46 | WantedBy=getty.target 47 | DefaultInstance=tty1 48 | 49 | -------------------------------------------------------------------------------- /src/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by the /lib/udev/write_net_rules 2 | # program, run by the persistent-net-generator.rules rules file. 3 | # 4 | # You can modify it, as long as you keep each rule on a single 5 | # line, and change only the value of the NAME= key. 6 | 7 | -------------------------------------------------------------------------------- /src/etc/uwsgi/apps-available/searx.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # Who will run the code 3 | uid = searx 4 | gid = searx 5 | 6 | # disable logging for privacy 7 | disable-logging = true 8 | 9 | # Number of workers (usually CPU count) 10 | workers = 4 11 | 12 | # The right granted on the created socket 13 | chmod-socket = 666 14 | 15 | # Plugin to use and interpretor config 16 | single-interpreter = true 17 | #master = true 18 | plugin = python 19 | 20 | # Module to import 21 | module = searx.webapp 22 | 23 | # Virtualenv and python path 24 | virtualenv = /usr/local/searx/searx-ve/ 25 | pythonpath = /usr/local/searx/ 26 | chdir = /usr/local/searx/searx/ 27 | -------------------------------------------------------------------------------- /src/etc/uwsgi/apps-enabled/searx.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # Who will run the code 3 | uid = searx 4 | gid = searx 5 | 6 | # disable logging for privacy 7 | disable-logging = true 8 | 9 | # Number of workers (usually CPU count) 10 | workers = 4 11 | 12 | # The right granted on the created socket 13 | chmod-socket = 666 14 | 15 | # Plugin to use and interpretor config 16 | single-interpreter = true 17 | #master = true 18 | plugin = python 19 | 20 | # Module to import 21 | module = searx.webapp 22 | 23 | # Virtualenv and python path 24 | virtualenv = /usr/local/searx/searx-ve/ 25 | pythonpath = /usr/local/searx/ 26 | chdir = /usr/local/searx/searx/ 27 | -------------------------------------------------------------------------------- /src/etc/wpa_supplicant/wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=/var/run/wpa_supplicant 2 | 3 | # Let wpa_supplicant take care of scanning for and AP selection 4 | ap_scan=1 5 | 6 | -------------------------------------------------------------------------------- /src/etc/xdg/midori/config: -------------------------------------------------------------------------------- 1 | [settings] 2 | default-encoding=ISO-8859-1 3 | default-font-family=DejaVu Sans 4 | monospace-font-family=DejaVu Sans Mono 5 | minimum-font-size=10 6 | enable-site-specific-quirks=true 7 | last-window-width=681 8 | last-window-height=748 9 | toolbar-style=MIDORI_TOOLBAR_SMALL_ICONS 10 | toolbar-items=Location, 11 | load-on-startup=MIDORI_STARTUP_HOMEPAGE 12 | homepage=file:///lounge/www/blank.html 13 | location-entry-search=https://duckduckgo.com/?q=%s 14 | open-new-pages-in=MIDORI_NEW_PAGE_CURRENT 15 | middle-click-opens-selection=false 16 | enable-spell-checking=false 17 | enable-html5-database=true 18 | zoom-text-and-images=true 19 | maximum-cookie-age=1 20 | maximum-history-age=0 21 | show-crash-dialog=false 22 | user-agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X; c) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.22+ Midori/0.4 23 | 24 | [extensions] 25 | libtoolbar-editor.so=true 26 | libadblock.so=true 27 | -------------------------------------------------------------------------------- /src/lounge/.bash_logout: -------------------------------------------------------------------------------- 1 | # ~/.bash_logout: executed by bash(1) when login shell exits. 2 | 3 | # when leaving the console clear the screen to increase privacy 4 | 5 | if [ "$SHLVL" = 1 ]; then 6 | [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q 7 | fi 8 | -------------------------------------------------------------------------------- /src/lounge/.bashrc: -------------------------------------------------------------------------------- 1 | export HOME="/lounge" 2 | export PATH="$HOME/bin:$PATH" 3 | export VDPAU_DRIVER=sunxi 4 | export DISPLAY=:0 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/lounge/.janosh/janosh.json: -------------------------------------------------------------------------------- 1 | { 2 | "database": "/lounge/janosh.db", 3 | "port": "22221" 4 | } 5 | -------------------------------------------------------------------------------- /src/lounge/.profile: -------------------------------------------------------------------------------- 1 | # ~/.profile: executed by the command interpreter for login shells. 2 | # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login 3 | # exists. 4 | # see /usr/share/doc/bash/examples/startup-files for examples. 5 | # the files are located in the bash-doc package. 6 | 7 | # the default umask is set in /etc/profile; for setting the umask 8 | # for ssh logins, install and configure the libpam-umask package. 9 | #umask 022 10 | 11 | # if running bash 12 | if [ -n "$BASH_VERSION" ]; then 13 | # include .bashrc if it exists 14 | if [ -f "$HOME/.bashrc" ]; then 15 | . "$HOME/.bashrc" 16 | fi 17 | fi 18 | 19 | # set PATH so it includes user's private bin if it exists 20 | if [ -d "$HOME/bin" ] ; then 21 | PATH="$HOME/bin:$PATH" 22 | fi 23 | -------------------------------------------------------------------------------- /src/lounge/.vimrc: -------------------------------------------------------------------------------- 1 | set ts=2 2 | set expandtab 3 | syntax on 4 | 5 | -------------------------------------------------------------------------------- /src/lounge/.xpdfrc: -------------------------------------------------------------------------------- 1 | initialZoom width 2 | bind home any gotoPage(1) 3 | bind end any gotoLastPage 4 | -------------------------------------------------------------------------------- /src/lounge/bin/gainroot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bash -c "$@" 4 | -------------------------------------------------------------------------------- /src/lounge/bin/getip: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | export DISPLAY=:0 22 | export PATH="$PATH:/lounge/bin" 23 | INTERFACE="$(sudo /lounge/bin/gainroot -c '/lounge/bin/janosh -r get /network/connection/interface')" 24 | /sbin/ifconfig $INTERFACE | grep -Po 'inet addr:\K.*?(?= )' | tail -n1 25 | -------------------------------------------------------------------------------- /src/lounge/bin/locate/find.screeninvader: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | arguments="`echo $@ | sed 's/[(] -fstype.*[)]//g' | sed 's/[-]prune [-]o//g'`" 3 | 4 | bash -c "/usr/bin/find $arguments" 5 | 6 | -------------------------------------------------------------------------------- /src/lounge/bin/locate/functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH="$PATH:/lounge/bin/locate/" 4 | function prepareTerms() { 5 | echo "$@" | sed 's/%20/ /g' | sed 's/ /\*/g' 6 | } 7 | 8 | function makeLocateArgs() { 9 | terms="$1" 10 | shift; 11 | echo -en " -i "; 12 | echo -en " \"*$terms*\" " 13 | } 14 | -------------------------------------------------------------------------------- /src/lounge/bin/locate/updateimage: -------------------------------------------------------------------------------- 1 | updatedb.loungemc --prunepaths='' --prunefs='/' --netpaths='' --findoptions='-type f \( -iname "*png" -o -iname "*jpg" -o -iname "*jpeg" -o -iname "*svg" -o -iname "*gif" -o -iname "*bmp" -o -iname "*pnm" -o -iname "*ppm" \)' --output="/lounge/image.db" --localpaths="/share/" 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/lounge/bin/locate/updatemovie: -------------------------------------------------------------------------------- 1 | 2 | ( echo -n "{ 'media': { 'movies': [ " 3 | find /share -type f \( -iname "*mpeg" -o -iname "*mpg" -o -iname "*avi" -o -iname "*mov" -o -iname "*wmv" -o -iname "*mp4" -o -iname "*3gp" -o -iname "*ogm" -o -iname "*mkv" \) | while read line; do 4 | echo "'$line'," 5 | done 6 | echo " ] } }" ) > /tmp/movie.json 7 | #| /lounge/bin/janosh load 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/lounge/bin/locate/updatemusic: -------------------------------------------------------------------------------- 1 | /lounge/bin/locate/updatedb.screeninvader --prunepaths='' --prunefs='/' --netpaths='' --findoptions='-type f \( -iname "*aac" -o -iname "*ac3*" -o -iname "*flac" -o -iname "*m4a" -o -iname "*mp3" -o -iname "*oga" -o -iname "*wav" -o -iname "*wave" -o -iname "*wma" \)' --output="/lounge/music.db" --localpaths="/share/" 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/lounge/bin/notify: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | ( 22 | set -x 23 | export DISPLAY=:0 24 | timeout=$2 25 | 26 | [ -z "$timeout" ] && timeout=2 27 | 28 | title="$1" 29 | TITLE=${ARG:0:48} 30 | killall osd 31 | 32 | width="$( sudo /lounge/bin/gainroot '/lounge/bin/janosh -r get /display/resolution/value | cut -d"x" -f1' )" 33 | 34 | fontsize=240; 35 | 36 | /lounge/bin/osd -f "-misc-topaz a500a1000a2000-medium-r-normal--0-${fontsize}-0-0-c-0-iso8859-1" -t $timeout "$title" & 37 | disown 38 | ) &>> /tmp/osd 39 | -------------------------------------------------------------------------------- /src/lounge/bin/player: -------------------------------------------------------------------------------- 1 | /lounge/triggers/player -------------------------------------------------------------------------------- /src/lounge/bin/showip: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | export DISPLAY=:0 22 | export PATH="$PATH:/lounge/bin" 23 | while [ 0 ]; do 24 | sleep 1; 25 | ADDR="$(getip)" 26 | 27 | if [ -z "$ADDR" ]; then 28 | notify "No Network" 0 &>/dev/null 29 | else 30 | notify "http://$ADDR/" 0 &>/dev/null 31 | exit 32 | fi 33 | ADDR="" 34 | done; 35 | 36 | -------------------------------------------------------------------------------- /src/lounge/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/lounge/logo.png -------------------------------------------------------------------------------- /src/lounge/lounge-firstboot.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # ScreenInvader - A shared media experience. Instant and seamless. 3 | # Copyright (C) 2012 Amir Hassan 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | # 19 | 20 | function askHowNet() { 21 | echo "manual" 22 | } 23 | 24 | function askNetConnection() { 25 | echo "Ethernet" 26 | } 27 | 28 | function askWifiSSID() { 29 | echo "n/a" 30 | } 31 | 32 | function askWifiEncryption() { 33 | echo "n/a" 34 | } 35 | 36 | function askWifiPassphrase() { 37 | echo "n/a" 38 | } 39 | 40 | function askHostname() { 41 | echo "lounge" 42 | } 43 | 44 | function askManualNetwork() { 45 | # address 10.20.30.51 46 | # netmask 255.255.255.0 47 | # gateway 10.20.30.1 48 | # nameserver 10.20.30.1 49 | 50 | printf "10.20.30.51\n255.255.255.0\n10.20.30.1\n10.20.30.1\n" 51 | } 52 | 53 | function askDoReboot() { 54 | # return 1 # don't reboot 55 | return 0 # reboot 56 | } 57 | -------------------------------------------------------------------------------- /src/lounge/lua/background.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | function refresh(key, op, value) 4 | Janosh:system("feh --bg-center /lounge/logo.png") 5 | end 6 | 7 | Janosh:subscribe("backgroundRefresh", refresh) 8 | 9 | Janosh:forever() 10 | 11 | -------------------------------------------------------------------------------- /src/lounge/lua/browser.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | local midori = require("midori") 3 | 4 | function open(key, op, value) 5 | print("open:", value) 6 | Janosh:publish("pdfClose","W","") 7 | print("publish") 8 | obj = Janosh:get("/browser/.") 9 | url = obj.url 10 | category = obj.category 11 | active="browser" 12 | 13 | if category == "image" or category == "animation" then 14 | url="http://localhost/cgi-bin/makeImageView?" .. url 15 | active=category 16 | end 17 | midori:openUrl(url) 18 | --FIXME notify Loading category: url 19 | Janosh:set_all({ "/image/active", false, "/browser/active", false, "/animation/active", false}) 20 | Janosh:set_t("/" .. active .. "/active", true); 21 | end 22 | 23 | Janosh:subscribe("/browser/url", open) 24 | Janosh:subscribe("browserClose", function(key,op,value) 25 | midori:close() 26 | Janosh:transaction(function() 27 | obj = Janosh:get({ "/image/active", "/browser/active", "/animation/active"}) 28 | if obj.browser.active == true or obj.image.active == true or obj.animation.active == true then 29 | Janosh:set_all({ "/image/active", false, "/browser/active", false, "/animation/active", false}) 30 | Janosh:set_t("/browser/active", false); 31 | end 32 | end) 33 | end) 34 | 35 | --Janosh:subscribe("browserPageUp", function(key,op,value) midori:pageUp() end) 36 | --Janosh:subscribe("browserPageDown", function(key,op,value) midori:pageDown() end) 37 | Janosh:subscribe("browserScrollUp", function(key,op,value) midori:scrollUp() end) 38 | Janosh:subscribe("browserScrollDown", function(key,op,value) midori:scrollDown() end) 39 | Janosh:subscribe("browserScrollLeft", function(key,op,value) midori:scrollLeft() end) 40 | Janosh:subscribe("browserScrollRight", function(key,op,value) midori:scrollRight() end) 41 | Janosh:subscribe("browserZoomIn", function(key,op,value) midori:zoomIn() end) 42 | Janosh:subscribe("browserZoomOut", function(key,op,value) midori:zoomOut() end) 43 | 44 | midori:run() 45 | -------------------------------------------------------------------------------- /src/lounge/lua/helpers.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | 5 | local api_keys = { 6 | soundcloud = "2dcf4e12afd6ed5119741f888260fc85" 7 | } 8 | 9 | 10 | local HelpersClass = {} -- the table representing the class, which will double as the metatable for the instances 11 | HelpersClass.__index = HelpersClass -- failed table lookups on the instances should fallback to the class table, to get methods 12 | 13 | function HelpersClass.new() 14 | return setmetatable({}, HelpersClass) 15 | end 16 | 17 | function HelpersClass.resolve(self, url, category) 18 | if category == "youtube" then 19 | if string.gmatch(url, "&v=") then 20 | url = url:gsub("&list=[a-zA-Z0-9]+", "") 21 | end 22 | print("#### URL:", url) 23 | return self:youtube_dl(url) 24 | else 25 | return self:youtube_dl_noformat(url) 26 | end 27 | end 28 | 29 | function HelpersClass.youtube_dl(self, url) 30 | -- p,i,o,e = Janosh:psystem("/usr/bin/youtube-dl -f 22+bestaudio/18+bestaudio/137+bestaudio/136+bestaudio/135+bestaudio/134+bestaudio/133+bestaudio/160+bestaudio/http-380+bestaudio/http-240+bestaudio/http-144+bestaudio/hls-380-3+bestaudio/hls-380-2+bestaudio/hls-380-1+bestaudio/hls-380-0+bestaudio/hls-240-3+bestaudio/hls-240-2+bestaudio/hls-240-1+bestaudio/hls-240-0+bestaudio/hls-144-3+bestaudio/hls-144-2+bestaudio/hls-144-1+bestaudio/hls-144-0+bestaudio --encoding utf-8 -g -e '" .. url .. "'") 31 | p,i,o,e = Janosh:psystem("/usr/local/bin/youtube-dl -f 'best[ext=mp4]/best' -r 1 --encoding utf-8 -g -e '" .. url .. "'") 32 | items={} 33 | title="" 34 | url="" 35 | while true do 36 | title = Janosh:preadLine(o) 37 | url = Janosh:preadLine(o) 38 | if title == nil or url == nil then break end 39 | items[title]=url 40 | end 41 | print("YOUTUBE_DL", title, url) 42 | Janosh:pclose(i) 43 | Janosh:pclose(o) 44 | Janosh:pclose(e) 45 | Janosh:pwait(p) 46 | return items 47 | end 48 | 49 | function HelpersClass.youtube_dl_noformat(self, url) 50 | p,i,o,e = Janosh:psystem("/usr/local/bin/youtube-dl --encoding utf-8 -g -r 1 -e '" .. url .. "'") 51 | items={} 52 | title="" 53 | url="" 54 | while true do 55 | title = Janosh:preadLine(o) 56 | url = Janosh:preadLine(o) 57 | if title == nil or url == nil then break end 58 | items[title]=url 59 | end 60 | print("YOUTUBE_DL", title, url) 61 | Janosh:pclose(i) 62 | Janosh:pclose(o) 63 | Janosh:pclose(e) 64 | Janosh:pwait(p) 65 | return items 66 | end 67 | 68 | function HelpersClass.soundcloud(self, url) 69 | local json = JSON:decode( 70 | util:http_get('http://api.soundcloud.com/resolve.json?' .. 71 | 'client_id=' .. api_keys.soundcloud .. '&url=' .. url)) 72 | return json['stream_url'], json.user.username .. ' - ' .. json.title 73 | end 74 | 75 | function HelpersClass.jamendo(self, url) 76 | local html = util:http_get(url) 77 | local json = JSON:decode( 78 | string.match(html,"> /media/history") 8 | print("Added " .. value) 9 | end 10 | 11 | Janosh:subscribe("historyAdd", add) 12 | 13 | Janosh:forever() 14 | 15 | -------------------------------------------------------------------------------- /src/lounge/lua/ip_osd.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | 5 | local function show() 6 | print("show") 7 | Janosh:system("killall osd;/lounge/bin/osd -f \"-misc-topaz a500a1000a2000-medium-r-normal--0-300-0-0-c-0-iso8859-1\" -t 0 " .. "http://" .. util:getIPAddress() .. " &") 8 | end 9 | 10 | local function hide() 11 | print("hide") 12 | Janosh:system("killall osd") 13 | end 14 | 15 | function toggle(key,op,value) 16 | Janosh:transaction(function() 17 | obj = Janosh:get({"/player/active", "/browser/active", "/pdf/active", "/image/active", "/animation/active"}) 18 | if obj.player.active == true or obj.browser.active == true or obj.pdf.active == true or obj.image.active == true or obj.animation.active == true then 19 | hide() 20 | else 21 | show() 22 | end 23 | end) 24 | end 25 | 26 | show() 27 | 28 | Janosh:subscribe("/player/active", toggle) 29 | Janosh:subscribe("/browser/active", toggle) 30 | Janosh:subscribe("/pdf/active", toggle) 31 | Janosh:subscribe("/image/active", toggle) 32 | Janosh:subscribe("/animation/active", toggle) 33 | 34 | Janosh:forever() 35 | 36 | -------------------------------------------------------------------------------- /src/lounge/lua/keyboard.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | -- all values received here shoud be x11 keysymbols 4 | function down(key,op,value) 5 | Janosh:keyDown(value) 6 | end 7 | 8 | function up(key,op,value) 9 | Janosh:keyUp(value) 10 | end 11 | 12 | function type(key,op,value) 13 | Janosh:keyType(value) 14 | end 15 | 16 | Janosh:subscribe("keyUp", up) 17 | Janosh:subscribe("keyDown", down) 18 | Janosh:subscribe("keyType", type) 19 | 20 | Janosh:forever() 21 | 22 | -------------------------------------------------------------------------------- /src/lounge/lua/midori.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | 5 | Janosh:setenv("DISPLAY",":0") 6 | local MidoriClass = {} -- the table representing the class, which will double as the metatable for the instances 7 | MidoriClass.__index = MidoriClass -- failed table lookups on the instances should fallback to the class table, to get methods 8 | 9 | function MidoriClass.new() 10 | return setmetatable({}, MidoriClass) 11 | end 12 | 13 | function MidoriClass.cmd(self, cmdstring) 14 | print("cmd:", cmdstring) 15 | Janosh:system("killall -0 midori && midori -e " .. cmdstring) 16 | end 17 | 18 | function MidoriClass.minimize(self) 19 | print("mini") 20 | xid = util:getWindowID("midori.Midori") 21 | if xid ~= -1 then 22 | print("minimize:", xid) 23 | print("xdotool windowminimize " .. xid) 24 | Janosh:system("xdotool windowminimize " .. xid) 25 | end 26 | end 27 | 28 | function MidoriClass.raise(self) 29 | print("raise") 30 | xid = util:getWindowID("midori.Midori") 31 | if xid ~= -1 then 32 | print("raise:", xid) 33 | Janosh:system("xdotool windowraise " .. xid) 34 | end 35 | end 36 | 37 | function MidoriClass.openUrl(self, url) 38 | util:notify("Open Browser: " .. url) 39 | 40 | print("openUrl:", url) 41 | Janosh:system("midori \"" .. url .. "\" &") 42 | self:raise() 43 | end 44 | 45 | function MidoriClass.close(self) 46 | print("close") 47 | self:cmd("Homepage") 48 | self:cmd("WindowClose") 49 | self:minimize() 50 | end 51 | 52 | --function MidoriClass.pageDown(self) 53 | -- Janosh:keyType("Page_Down") 54 | --end 55 | 56 | --function MidoriClass.pageUp(self) 57 | -- Janosh:keyType("Page_Up") 58 | --end 59 | 60 | function MidoriClass.scrollDown(self) 61 | self:cmd("ScrollDown") 62 | end 63 | 64 | function MidoriClass.scrollUp(self) 65 | self:cmd("ScrollUp") 66 | end 67 | 68 | function MidoriClass.scrollLeft(self) 69 | self:cmd("ScrollLeft") 70 | end 71 | 72 | function MidoriClass.scrollRight(self) 73 | self:cmd("ScrollRight") 74 | end 75 | 76 | function MidoriClass.zoomIn(self) 77 | self:cmd("ZoomIn") 78 | end 79 | 80 | function MidoriClass.zoomOut(self) 81 | self:cmd("ZoomOut") 82 | end 83 | 84 | function MidoriClass.run(self) 85 | while true do 86 | Janosh:sleep(10000) 87 | end 88 | end 89 | 90 | return MidoriClass:new() 91 | -------------------------------------------------------------------------------- /src/lounge/lua/monitor.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | Janosh:subscribe("", print) 4 | Janosh:forever() 5 | -------------------------------------------------------------------------------- /src/lounge/lua/mouse.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | -- takes two floats nomalized from 0 to 1 4 | function move(key, op, value) 5 | pos = JSON:decode(value) 6 | Janosh:mouseMove(tonumber(pos[1]), tonumber(pos[2])) 7 | end 8 | 9 | -- takes two ints (screen coordinates) and moves the mouse pointer relative. 10 | function moveRel(key,op,value) 11 | pos = JSON:decode(value) 12 | Janosh:mouseMoveRel(tonumber(pos[1]), tonumber(pos[2])) 13 | end 14 | 15 | -- 1=left, 2=middle, 3=right, 4=wheelup, 5=wheeldown 16 | function down(key,op,value) 17 | button = tonumber(value) 18 | -- avoid x11 error with assert 19 | assert(button > 0 and button < 6) 20 | Janosh:mouseDown(button) 21 | end 22 | 23 | function up(key,op,value) 24 | button = tonumber(value) 25 | -- avoid x11 error with assert 26 | assert(button > 0 and button < 6) 27 | Janosh:mouseUp(button) 28 | end 29 | 30 | Janosh:subscribe("mouseMoveAbs", move) 31 | Janosh:subscribe("mouseMoveRel", moveRel) 32 | Janosh:subscribe("mouseUp", up) 33 | Janosh:subscribe("mouseDown", down) 34 | 35 | Janosh:forever() 36 | 37 | -------------------------------------------------------------------------------- /src/lounge/lua/mpv.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | local helper = require("helpers") 5 | 6 | Janosh:set("/player/active", false) 7 | Janosh:set("/player/paused", false) 8 | 9 | --Janosh:setenv("VDPAU_OSD","1") 10 | Janosh:setenv("DISPLAY",":0") 11 | Janosh:setenv("USER","lounge") 12 | Janosh:setenv("HOME","/lounge/") 13 | Janosh:setenv("VDPAU_DRIVER", "sunxi") 14 | Janosh:system("killall -9 mpv") 15 | 16 | local MPID, MSTDIN, MSTDOUT, MSTDERR = Janosh:popen("mpv", "-idle", "--input-ipc-server", "/tmp/mpv.socket") 17 | Janosh:pclose(MSTDIN) 18 | 19 | Janosh:sleep(3000) 20 | local S1PID, S1STDIN, S1STDOUT, S1STDERR = Janosh:popen("/usr/bin/socat", "-", "/tmp/mpv.socket") 21 | Janosh:pclose(S1STDERR) 22 | 23 | -- unset causes wierd errors 24 | 25 | local MpvClass = {} -- the table representing the class, which will double as the metatable for the instances 26 | MpvClass.__index = MpvClass -- failed table lookups on the instances should fallback to the class table, to get methods 27 | 28 | function MpvClass.new() 29 | return setmetatable({}, MpvClass) 30 | end 31 | 32 | function MpvClass.jump(self, idx) 33 | print("jump:", idx) 34 | Janosh:publish("shairportStop", "W", "") 35 | 36 | obj = Janosh:get("/playlist/items/.") 37 | idx = tonumber(idx); 38 | lua_idx = idx + 1; 39 | print("IDX:", lua_idx, #obj) 40 | 41 | if lua_idx > #obj then 42 | lua_idx = #obj 43 | idx = #obj - 1 44 | end 45 | videoUrl = obj[lua_idx].url 46 | title = obj[lua_idx].title 47 | cat = obj[lua_idx].category 48 | 49 | 50 | if string.match(videoUrl, "http[s]*://") then 51 | p, i, o, e = Janosh:popen("curl", "--head", videoUrl) 52 | line=Janosh:preadLine(o) 53 | Janosh:pclose(i) 54 | Janosh:pclose(e) 55 | Janosh:pclose(o) 56 | Janosh:pwait(p) 57 | 58 | token="-1" 59 | 60 | if line ~= nil then 61 | token=util:split(line," ")[2] 62 | end 63 | 64 | code=tonumber(token) 65 | print("CODE: " .. code) 66 | 67 | if code ~= 200 and code ~= 302 then 68 | src = Janosh:get("/playlist/items/#" .. idx .. "/source") 69 | title = Janosh:get("/playlist/items/#" .. idx .. "/title") 70 | cat = Janosh:get("/playlist/items/#" .. idx .. "/category") 71 | util:notify("Fixing cached item:" .. title) 72 | items = helper:resolve(src,cat); 73 | for t, v in pairs(items) do 74 | title=t 75 | videoUrl=v 76 | break; 77 | end 78 | print("TITLE", t) 79 | Janosh:set("/playlist/items/#" .. idx .. "/url", videoUrl) 80 | end 81 | end 82 | print("VIDEOURL2", videoUrl) 83 | 84 | util:notifyLong(title) 85 | print("LOAD", idx) 86 | self:cmd("loadfile", videoUrl) 87 | self:play() 88 | Janosh:set_all_t({"/player/active", true,"/playlist/index", idx}) 89 | end 90 | 91 | function MpvClass.previous(self) 92 | util:notify("previous") 93 | self:jump(Janosh:get("/playlist/index") - 1) 94 | 95 | end 96 | 97 | function MpvClass.next(self) 98 | util:notify("next") 99 | self:jump(Janosh:get("/playlist/index") + 1) 100 | end 101 | 102 | function MpvClass.seek(self, seconds) 103 | self:cmd("seek", seconds, "absolute") 104 | end 105 | 106 | function MpvClass.enqueue(self, videoUrl, title, srcUrl, category) 107 | util:notify("Queued: " .. title) 108 | if title == "" then 109 | title = "(no title)" 110 | end 111 | size = Janosh:size("/playlist/items/.") 112 | Janosh:mkobj_t("/playlist/items/#" .. size .. "/.") 113 | Janosh:set_t("/playlist/items/#" .. size .. "/url", videoUrl) 114 | Janosh:set_t("/playlist/items/#" .. size .. "/title", title) 115 | Janosh:set_t("/playlist/items/#" .. size .. "/source", srcUrl) 116 | Janosh:set_t("/playlist/items/#" .. size .. "/category", category) 117 | end 118 | 119 | function MpvClass.add(self, videoUrl, title, srcUrl, category) 120 | self:enqueue(videoUrl, title, srcUrl, category) 121 | 122 | if Janosh:get("/player/active") == false then 123 | self:jump(10000000) -- jump to the end of the playlist 124 | end 125 | end 126 | 127 | function MpvClass.run(self) 128 | print("run") 129 | Janosh:thread(function() 130 | while true do 131 | line="" 132 | pos="" 133 | len="" 134 | while true do 135 | line = Janosh:preadLine(MSTDERR) 136 | -- print("STDERR:", line) 137 | if line == nil then break end 138 | tokens = util:split(line, " ") 139 | if #tokens >= 4 and (tokens[2] ~= pos or tokens[4] ~= len) then 140 | info = {} 141 | info[1] = tokens[2] 142 | pos = tokens[2] 143 | info[2] = tokens[4] 144 | len = tokens[4] 145 | Janosh:publish("playerTimePos","W",JSON:encode(info)) 146 | end 147 | end 148 | Janosh:sleep(1000) 149 | end 150 | end)() 151 | 152 | Janosh:thread(function() 153 | while true do 154 | line="" 155 | while true do 156 | line = Janosh:preadLine(S1STDOUT) 157 | print("RECEIVED:", line) 158 | if line == nil then break end 159 | obj = JSON:decode(line) 160 | if obj.event == "idle" then 161 | self:onIdle() 162 | elseif obj.event == "playback-restart" then 163 | -- self:sotrack() 164 | -- elseif string.find(line, CACHEEMPTY) then 165 | -- self:cache_empty() 166 | -- elseif string.find(line, TIMEPOS) then 167 | -- times=util:split(line:gsub(TIMEPOS,""), "/") 168 | -- Janosh:publish("playerTimePos", "W", JSON:encode(times)) 169 | end 170 | 171 | end 172 | Janosh:sleep(1000) 173 | end 174 | end)() 175 | 176 | while true do 177 | line="" 178 | while true do 179 | line = Janosh:preadLine(MSTDOUT) 180 | if line == nil then break end 181 | print("STDOUT", line) 182 | end 183 | Janosh:sleep(1000) 184 | end 185 | end 186 | 187 | function MpvClass.cmd(self, ...) 188 | local arg={...} 189 | print("cmd:", unpack(arg)) 190 | obj = {} 191 | obj["command"] = {} 192 | 193 | for i, a in ipairs(arg) do 194 | obj["command"][i]=a 195 | end 196 | print(JSON:encode(obj)) 197 | Janosh:pwrite(S1STDIN, JSON:encode(obj) .. "\n") 198 | end 199 | 200 | function MpvClass.forward(self) 201 | util:notify("Forward") 202 | self:cmd("seek", "10") 203 | end 204 | 205 | function MpvClass.forwardMore(self) 206 | util:notify("Forward more") 207 | self:cmd("seek", "60") 208 | end 209 | 210 | function MpvClass.rewind(self) 211 | util:notify("Rewind") 212 | self:cmd("seek", "-10") 213 | end 214 | 215 | function MpvClass.rewindMore(self) 216 | util:notify("Rewind more") 217 | self:cmd("seek", "-60") 218 | end 219 | 220 | function MpvClass.pause(self) 221 | util:notify("Pause") 222 | self:cmd("set_property","pause",true) 223 | Janosh:set_t("/player/paused", "true") 224 | end 225 | 226 | function MpvClass.play(self) 227 | self:cmd("set_property","pause",false) 228 | Janosh:set_t("/player/paused", "false") 229 | end 230 | 231 | function MpvClass.cache_empty(self) 232 | Janosh:publish("notifySend", "Network Problem!") 233 | end 234 | 235 | function MpvClass.onIdle(self) 236 | obj = Janosh:get("/playlist/.") 237 | idx = obj.index 238 | len = #obj.items 239 | if idx + 1 < len then 240 | Janosh:publish("backgroundRefresh", "W", "") 241 | self:jump(tostring(idx + 1)) 242 | else 243 | Janosh:publish("backgroundRefresh", "W", "") 244 | Janosh:set_t("/player/active",false) 245 | end 246 | end 247 | 248 | function MpvClass.loadFile(self,path) 249 | Janosh:set_t("/player/active", true) 250 | self:cmd("loadfile", path) 251 | end 252 | 253 | return MpvClass:new() 254 | -------------------------------------------------------------------------------- /src/lounge/lua/mupdf.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | 5 | Janosh:set("/pdf/active", "false") 6 | 7 | local MupdfClass = {} -- the table representing the class, which will double as the metatable for the instances 8 | MupdfClass.__index = MupdfClass -- failed table lookups on the instances should fallback to the class table, to get methods 9 | 10 | function MupdfClass.new() 11 | return setmetatable({}, MupdfClass) 12 | end 13 | 14 | function MupdfClass.openFile(self, file) 15 | util:notify("Open PDF: " .. file) 16 | 17 | print("openFile:", file) 18 | Janosh:system("killall mupdf-x11; mupdf-x11 \"" .. file .. "\" &") 19 | end 20 | 21 | function MupdfClass.close(self) 22 | print("close") 23 | Janosh:system("killall mupdf-x11") 24 | end 25 | 26 | function MupdfClass.pageDown(self) 27 | Janosh:keyType("Page_Down") 28 | end 29 | 30 | function MupdfClass.pageUp(self) 31 | Janosh:keyType("Page_Up") 32 | end 33 | 34 | function MupdfClass.scrollDown(self) 35 | Janosh:keyType("j") 36 | end 37 | 38 | function MupdfClass.scrollUp(self) 39 | Janosh:keyType("k") 40 | end 41 | 42 | function MupdfClass.scrollLeft(self) 43 | Janosh:keyType("h") 44 | end 45 | 46 | function MupdfClass.scrollRight(self) 47 | Janosh:keyType("l") 48 | end 49 | 50 | function MupdfClass.zoomIn(self) 51 | Janosh:keyType("plus") 52 | end 53 | 54 | function MupdfClass.zoomOut(self) 55 | Janosh:keyType("minus") 56 | end 57 | 58 | function MupdfClass.run(self) 59 | while true do 60 | Janosh:sleep(10000) 61 | end 62 | end 63 | 64 | return MupdfClass:new() 65 | -------------------------------------------------------------------------------- /src/lounge/lua/notify.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | Janosh:system("export $(dbus-launch); dunst -fn \"Topaz a500a1000a2000,40\" -lto 3 -cto 1 -nto 1 &") 4 | 5 | function send(key, op, value) 6 | Janosh:system("notify-send \"" .. value .. "\"") 7 | end 8 | 9 | function long(key, op, value) 10 | Janosh:system("notify-send -u low \"" .. value .. "\"") 11 | end 12 | 13 | function exception(key, op, value) 14 | Janosh:system("notify-send -u critical \"" .. value .. "\"") 15 | end 16 | 17 | Janosh:subscribe("notifySend", send) 18 | Janosh:subscribe("notifyLong", long) 19 | Janosh:subscribe("notifyException", exception) 20 | 21 | Janosh:forever() 22 | 23 | -------------------------------------------------------------------------------- /src/lounge/lua/pdf.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | local util = require("util") 3 | local mupdf = require("mupdf") 4 | 5 | function open(key, op, value) 6 | Janosh:publish("browserClose","W", "") 7 | print("open:", value) 8 | obj = Janosh:get("/pdf/.") 9 | url = obj.url 10 | 11 | tmpfile = util:trim(Janosh:capture("mktemp")) 12 | Janosh:system("wget -O" .. tmpfile .. " \"".. url .. "\"") 13 | 14 | mupdf:openFile(tmpfile) 15 | cnt=0 16 | id=-1 17 | while id == -1 and cnt < 100 do 18 | Janosh:sleep(500) 19 | id = util:getWindowID("mupdf.MuPDF") 20 | cnt = cnt + 1 21 | print("WindowID:", id) 22 | end 23 | 24 | Janosh:system("rm " .. tmpfile) 25 | Janosh:set_t("/pdf/active", true) 26 | end 27 | 28 | Janosh:subscribe("/pdf/url", open) 29 | Janosh:subscribe("pdfClose", function(key,op,value) 30 | mupdf:close() 31 | Janosh:transaction(function() 32 | if Janosh:get("/pdf/active") == true then 33 | Janosh:set_t("/pdf/active", false) 34 | end 35 | end) 36 | end) 37 | 38 | Janosh:subscribe("pdfPageUp", function(key,op,value) mupdf:pageUp() end) 39 | Janosh:subscribe("pdfPageDown", function(key,op,value) mupdf:pageDown() end) 40 | Janosh:subscribe("pdfScrollUp", function(key,op,value) mupdf:scrollUp() end) 41 | Janosh:subscribe("pdfScrollDown", function(key,op,value) mupdf:scrollDown() end) 42 | Janosh:subscribe("pdfScrollLeft", function(key,op,value) mupdf:scrollLeft() end) 43 | Janosh:subscribe("pdfScrollRight", function(key,op,value) mupdf:scrollRight() end) 44 | Janosh:subscribe("pdfZoomIn", function(key,op,value) mupdf:zoomIn() end) 45 | Janosh:subscribe("pdfZoomOut", function(key,op,value) mupdf:zoomOut() end) 46 | 47 | mupdf:run() 48 | -------------------------------------------------------------------------------- /src/lounge/lua/player.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | 4 | local util = require("util") 5 | local mpv = require("mpv") 6 | local helpers = require("helpers") 7 | 8 | local function basename(str) 9 | local name = string.gsub(str, "(.*/)(.*)", "%2") 10 | return name 11 | end 12 | 13 | function open(key, op, value) 14 | Janosh:transaction(function() 15 | obj=Janosh:get("/player/.") 16 | Janosh:tprint(obj) 17 | url=obj.url 18 | category=obj.category 19 | videoUrl="" 20 | title="" 21 | 22 | if category ~= "video" and category ~= "audio" then 23 | items = helpers:resolve(url,category) 24 | for title, videoUrl in pairs(items) do 25 | mpv:add(videoUrl, title, url, category) 26 | Janosh:publish("historyAdd", "W", JSON:encode({url=url, title=title})) 27 | end 28 | else 29 | videoUrl = url 30 | title = basename(url) 31 | mpv:add(videoUrl, title, url, category) 32 | Janosh:publish("historyAdd", "W", JSON:encode({url=url, title=title})) 33 | end 34 | end) 35 | end 36 | 37 | Janosh:subscribe("/player/url", open) 38 | Janosh:subscribe("playerPause", function(key,op,value) mpv:pause() end) 39 | Janosh:subscribe("playerPlay", function(key,op,value) mpv:play() end) 40 | Janosh:subscribe("playerNext", function(key,op,value) mpv:next() end) 41 | Janosh:subscribe("playerPrevious", function(key,op,value) mpv:previous() end) 42 | Janosh:subscribe("playerForward", function(key,op,value) mpv:forward() end) 43 | Janosh:subscribe("playerRewind", function(key,op,value) mpv:rewind() end) 44 | Janosh:subscribe("playerForwardMore", function(key,op,value) mpv:forwardMore() end) 45 | Janosh:subscribe("playerRewindMore", function(key,op,value) mpv:rewindMore() end) 46 | Janosh:subscribe("playerJump", function(key,op,value) mpv:jump(value) end) 47 | Janosh:subscribe("playerLoadFile", function(key,op,value) mpv:loadFile(value) end) 48 | Janosh:subscribe("playerCommand", function(key,op,value) mpv:cmd(value) end) 49 | Janosh:subscribe("playerSeek", function(key,op,value) mpv:seek(value) end) 50 | mpv:run() 51 | -------------------------------------------------------------------------------- /src/lounge/lua/playlist.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | 4 | function remove(key, op, value) 5 | Janosh:transaction(function() 6 | value = tonumber(value) 7 | idx = tonumber(Janosh:get("/playlist/index")) 8 | Janosh:remove_t("/playlist/items/#" .. value .. "/.") 9 | if value < idx then 10 | Janosh:set_t("/playlist/index", idx - 1); 11 | end 12 | end) 13 | end 14 | 15 | function clear(key, op, value) 16 | Janosh:transaction(function() 17 | Janosh:remove_t("/playlist/items/.") 18 | Janosh:mkarr_t("/playlist/items/.") 19 | end) 20 | end 21 | 22 | function shift(key,op,value) 23 | param = JSON:decode(value) 24 | Janosh:transaction(function() 25 | idx = Janosh:get("/playlist/index") 26 | Janosh:shift_t("/playlist/items/#" .. param.from .. "/.", "/playlist/items/#" .. param.to .. "/.") 27 | if idx == tonumber(param.from) then 28 | Janosh:set_t("/playlist/index", tonumber(param.to)) 29 | elseif idx >= tonumber(param.to) and idx < tonumber(param.from) then 30 | Janosh:set_t("/playlist/index", idx + 1) 31 | elseif idx <= tonumber(param.to) and idx > tonumber(param.from) then 32 | Janosh:set_t("/playlist/index", idx - 1) 33 | end 34 | end) 35 | end 36 | 37 | function load(key,op,value) 38 | Janosh:transaction(function() 39 | urls = JSON:decode(value) 40 | for u in urls do 41 | Janosh:publish("showUrl", "W", u); 42 | end 43 | end) 44 | end 45 | 46 | Janosh:subscribe("playlistRemove", remove) 47 | Janosh:subscribe("playlistClear", clear) 48 | Janosh:subscribe("playlistShift", shift) 49 | Janosh:subscribe("playlistLoad", load) 50 | 51 | Janosh:forever() 52 | 53 | -------------------------------------------------------------------------------- /src/lounge/lua/shairport.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | local util = require("util") 3 | 4 | function start(key, op, value) 5 | Janosh:transaction(function() 6 | Janosh:publish("playerPause","W",""); 7 | Janosh:system("killall shairport; shairport -a `cat /etc/hostname` &") 8 | if Janosh:get("/shairport/active") == false then 9 | util:notifyLong("Activating shairport"); 10 | Janosh:set_t("/shairport/active", true) 11 | end 12 | end) 13 | end 14 | 15 | function stop(key,op,value) 16 | Janosh:transaction(function() 17 | Janosh:system("killall shairport") 18 | if Janosh:get("/shairport/active") == true then 19 | util:notifyLong("Deactivating shairport"); 20 | Janosh:set_t("/shairport/active", false) 21 | Janosh:publish("playerPlay"); 22 | end 23 | end) 24 | end 25 | 26 | Janosh:subscribe("shairportStart", start) 27 | Janosh:subscribe("shairportStop", stop) 28 | 29 | Janosh:forever() 30 | 31 | -------------------------------------------------------------------------------- /src/lounge/lua/show.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | local VIDEO_HOSTS={ 5 | ["youtube.com/"]='youtube', 6 | ["youtu.be/"]='youtube', 7 | ["vine.com/"]='youtube_noformat', 8 | ["dailymotion.com/"]='dailymotion', 9 | ["twitch.tv/"]='youtube_noformat', 10 | ["tvthek.orf.at/"]='orf', 11 | ["videos.arte.tv/"]='arte7', 12 | ["vimeo.com/"]='vimeo', 13 | ["soundcloud.com/"]='soundcloud', 14 | ["ted.com/"]='ted', 15 | ["jamendo.com/"]='jamendo', 16 | ["bandcamp.com/"]='bandcamp', 17 | ["tindeck.com/"]='tindeck', 18 | ["put.io/"]='putio' 19 | } 20 | 21 | local CATEGORY_MAP={ 22 | ["video"]='player', 23 | ["multipart"]='browser', 24 | ["audio"]='player', 25 | ["image"]='browser', 26 | ["animation"]='browser', 27 | ["radio"]='player', 28 | ["text"]='browser', 29 | ["pdf"]='pdf', 30 | ["youtube"]='player', 31 | ["youtube_noformat"]='player', 32 | ["orf"]='player', 33 | ["arte7"]='player', 34 | ["vimeo"]='player', 35 | ["soundcloud"]='player', 36 | ["dailymotion"]='player', 37 | ["ted"]='player', 38 | ["jamendo"]='player', 39 | ["bandcamp"]='player', 40 | ["tindeck"]='player', 41 | ["joker"]='player', 42 | ["putio"]='player', 43 | ["magnet"]='player' 44 | } 45 | 46 | local CATEGORY_FIX={ 47 | ["application/octet-stream"]='video', 48 | ["application/x-matroska"]='video', 49 | ["audio/x-mpegurl"]='radio', 50 | ["application/pls"]='radio', 51 | ["application/pdf"]='pdf', 52 | ["audio/x-scpls"]='radio', 53 | ["image/gif"]='animation', 54 | ["application/ogg"]='video', 55 | ["application/x-bittorrent"]='joker' 56 | } 57 | 58 | 59 | function open(key, op, value) 60 | util:notify("Resolving url: " .. value) 61 | print(key); 62 | print("open:",value) 63 | 64 | function ends(String,End) 65 | return End=='' or string.sub(String,-string.len(End))==End 66 | end 67 | 68 | function getCategory(url) 69 | print("getCategory:", url) 70 | if string.match(url, "magnet:?") then 71 | return "magnet" 72 | end 73 | 74 | hUrl=string.match(url, "http[s]*://[w.]*([0-9a-zA-z._-]*/)") 75 | if hUrl ~= nil then 76 | for host,category in pairs(VIDEO_HOSTS) do 77 | print(hUrl,host); 78 | if ends(hUrl,host) then 79 | return category 80 | end 81 | end 82 | end 83 | 84 | mimeType="unknown/" 85 | 86 | if string.match(url, "http[s]*://") then 87 | head="" 88 | location=url 89 | lastloc=url 90 | while location ~= nil do 91 | lastloc=location 92 | p, i, o, e = Janosh:popen("curl", "--head", location) 93 | line="" 94 | head="" 95 | while true do 96 | line=Janosh:preadLine(o) 97 | if line == nil then break end 98 | head= head .. string.gsub(line, "\r", "\n") 99 | end 100 | Janosh:pclose(i) 101 | Janosh:pclose(e) 102 | Janosh:pclose(o) 103 | Janosh:pwait(p) 104 | p, i, o, e = Janosh:popen("grep", "-iPo", "Location: \\K(.*)?(?=)") 105 | Janosh:pwrite(i, head) 106 | Janosh:pclose(i) 107 | location=Janosh:preadLine(o) 108 | Janosh:pclose(i) 109 | Janosh:pclose(e) 110 | Janosh:pclose(o) 111 | Janosh:pwait(p) 112 | end 113 | 114 | line=util:split(head,"\n")[1] 115 | token=util:split(line," ")[2] 116 | code=tonumber(token) 117 | print("code:", code) 118 | if code ~= 200 then 119 | mimeType="video/fixed" 120 | else 121 | mimeType=Janosh:capture("curl --head \"" .. lastloc .. "\" | grep -iPo 'Content-Type: \\K(.*)?(?=)'") 122 | end 123 | elseif string.match(url, "[a-zA-Z]+://") then 124 | mimeType = "video/fixed" 125 | else 126 | file=url 127 | mimeType=Janosh:capture("file -i \"" .. file .. "\" | sed 's/.*: \\([a-zA-Z]*\\/[a-zA-Z]*\\).*/\\1/p' | sed '1d'") 128 | end 129 | mimeType=util:trim(mimeType) 130 | 131 | if mimeType == nil or mimeType == "" then 132 | return nil 133 | end 134 | 135 | category=CATEGORY_FIX[mimeType] 136 | if category == nil then 137 | category=Janosh:capture("echo \"" .. mimeType .. "\" | cut -d'/' -f1") 138 | end 139 | return util:trim(category); 140 | end 141 | 142 | url=value 143 | cat=getCategory(url) 144 | handler=CATEGORY_MAP[cat] 145 | print("triggering:", handler, "/", cat) 146 | if cat == "magnet" then 147 | Janosh:publish("peerflixAdd", "W", url) 148 | elseif handler ~= nil then 149 | Janosh:set_all_t({"/" .. handler .. "/category",cat, "/" .. handler .. "/url", url}) 150 | else 151 | util:exception("Unable to handle url: " .. url) 152 | end 153 | end 154 | 155 | Janosh:subscribe("showUrl", open) 156 | 157 | Janosh:forever() 158 | 159 | 160 | -------------------------------------------------------------------------------- /src/lounge/lua/sound.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | function setVolume(key, op, value) 4 | print("setVolume", value) 5 | device = Janosh:get("/sound/device") 6 | print("amixer -D".. device .." sset PCM " .. value .. "%") 7 | Janosh:system("amixer -D".. device .." set PCM " .. value .. "%") 8 | end 9 | 10 | function setMute(key,op,value) 11 | print("setMute",value) 12 | -- not implemented 13 | end 14 | 15 | Janosh:subscribe("setVolume", setVolume) 16 | Janosh:subscribe("setMute", setMute) 17 | 18 | Janosh:forever() 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/lounge/lua/util.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local UtilClass = {} 4 | UtilClass.__index = UtilClass 5 | 6 | function UtilClass.new() 7 | return setmetatable({}, UtilClass) 8 | end 9 | 10 | function UtilClass.hex_to_char(self, x) 11 | return string.char(tonumber(x, 16)) 12 | end 13 | 14 | function UtilClass.urldecode(self, url) 15 | return url:gsub("%%(%x%x)", self.hex_to_char) 16 | end 17 | 18 | function UtilClass.http_get(self,url) 19 | return Janosh:capture("/usr/bin/curl -s -L '" .. url .. "'") 20 | end 21 | 22 | function UtilClass.getIPAddress(self) 23 | return self:trim(Janosh:capture("/sbin/ifconfig eth0 | grep -Po 'inet addr:\\K.*?(?= )' | tail -n1" 24 | )) 25 | end 26 | 27 | function UtilClass.trim(self, s) 28 | return (s:gsub("^%s*(.-)%s*$", "%1")) 29 | end 30 | 31 | function UtilClass.notify(self,msg) 32 | Janosh:publish("notifySend","W",msg) 33 | end 34 | 35 | function UtilClass.notifyLong(self,msg) 36 | Janosh:publish("notifyLong","W",msg) 37 | end 38 | 39 | function UtilClass.exception(self,msg) 40 | Janosh:publish("notifyException", "W", msg) 41 | end 42 | 43 | function UtilClass.getWindowID(self,name) 44 | pid,sin,sout,serr = Janosh:popen("wmctrl", "-lx") 45 | line = Janosh:preadLine(serr) 46 | if line ~= nil then 47 | print("Error:", line) 48 | return -1 49 | end 50 | id=-1 51 | while true do 52 | line = Janosh:preadLine(sout) 53 | if line == nil then break end 54 | tokens = self:split(line," ") 55 | assert(#tokens > 2) 56 | if tokens[3] == name then 57 | id = tonumber(tokens[1], 16) 58 | end 59 | end 60 | 61 | Janosh:pclose(sin) 62 | Janosh:pclose(sout) 63 | Janosh:pclose(serr) 64 | Janosh:pwait(pid) 65 | return id; 66 | end 67 | 68 | function UtilClass.split(self,inputstr, sep) 69 | if sep == nil then 70 | sep = "%s" 71 | end 72 | local t={} ; i=1 73 | for str in string.gmatch(inputstr, "([^"..sep.."]+)") do 74 | t[i] = str 75 | i = i + 1 76 | end 77 | return t 78 | end 79 | return UtilClass:new() 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/lounge/lua/websocket.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | local util = require("util") 4 | function receive(handle, message) 5 | Janosh:transaction(function() 6 | if message == 'setup' then 7 | util:notify("New client connected: " .. handle) 8 | Janosh:wsSend(handle, janosh_request({"get","/."})) 9 | else 10 | print("received", message) 11 | local tmsg = JSON:decode(message) 12 | Janosh:publish(tmsg[2], tmsg[4]) 13 | end 14 | end) 15 | end 16 | 17 | function push(key, op, value) 18 | Janosh:wsBroadcast(JSON:encode({key, op, value})) 19 | end 20 | 21 | Janosh:wsOpen(8080) 22 | Janosh:wsOnReceive(receive) 23 | Janosh:subscribe("", push) 24 | 25 | Janosh:forever() 26 | 27 | -------------------------------------------------------------------------------- /src/lounge/makefirstboot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | usermod -s /setup/firstboot.sh root 4 | reboot 5 | -------------------------------------------------------------------------------- /src/lounge/www/blank.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/lounge/www/blank.html -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/get: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ./initcgi "application/json" 4 | 5 | GET="`echo $QUERY_STRING | sed 's/=/ /g;s/&/ /g'`" 6 | 7 | /lounge/bin/janosh -j get $GET 2> /dev/null 8 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/getlogs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ./initcgi "application/zip" 4 | 5 | zip -r - /var/log/ 6 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/initcgi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export DISPLAY=:0 4 | export HOME=/lounge 5 | export USER=lounge 6 | export PATH="$HOME/bin:/lounge/www/cgi-bin/:$PATH" 7 | export LOGDIR="/var/log/lounge" 8 | 9 | echo "Content-type: $1" 10 | echo "" 11 | cd $HOME/www/cgi-bin/ 12 | 13 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/makeImageView: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ./initcgi "text/html" 4 | 5 | URL="$QUERY_STRING" 6 | 7 | cat < 9 | 10 | 22 | 23 | 24 | 25 | 26 | EOHTML 27 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/set: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ./initcgi "text/plain" 4 | 5 | SET="`echo $QUERY_STRING | sed 's/=/ /g;s/&/ /g'`" 6 | 7 | /lounge/bin/janosh set $SET &>/dev/null 8 | 9 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ./initcgi "text/html" 3 | 4 | { 5 | janosh publish showUrl "$QUERY_STRING" 6 | } &>/dev/null & 7 | cat /lounge/www/close.html 8 | 9 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/trigger: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ./initcgi "text/plain" 4 | 5 | SET="`echo $QUERY_STRING | sed 's/=/ /g;s/&/ /g'`" 6 | 7 | /lounge/bin/janosh trigger $SET &>/dev/null 8 | 9 | -------------------------------------------------------------------------------- /src/lounge/www/cgi-bin/uploadstream: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ./initcgi "text/html" 3 | { 4 | set -x 5 | read 6 | read line 7 | filename="$(echo $line | grep -iPo 'filename="\K(.*)?(?=")')" 8 | read line 9 | contentType="$(echo $line | grep -iPo 'Content-Type: \K(.*)?(?=)')" 10 | read 11 | if echo "$contentType" | grep -E "(video|matroska|audio|octet-stream)"; then 12 | tmp="$(mktemp -u)" 13 | mkfifo "$tmp" 14 | janosh publish playerLoadFile "$tmp" 15 | sleep 1 16 | dd if=/dev/stdin of="$tmp" 17 | elif echo "$contentType" | fgrep "image"; then 18 | mkdir -p /lounge/www/tmp 19 | tmp="/lounge/www$(mktemp).jpg" 20 | 21 | dd if=/dev/stdin > "$tmp" 22 | janosh publish showUrl "http://localhost/tmp/$(basename $tmp)" 23 | fi 24 | } &> /tmp/upload 25 | cat /lounge/www/close.html 26 | 27 | -------------------------------------------------------------------------------- /src/lounge/www/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Cleanup Time 4 | 5 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lounge/www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/lounge/www/favicon.ico -------------------------------------------------------------------------------- /src/lounge/www/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /src/lounge/www/upload.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 |
Live Stream Upload
8 |
9 | 10 |
11 |
14 |
15 | -------------------------------------------------------------------------------- /src/lounge/xsession.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ( 3 | set -x 4 | mount /media/ 5 | export DISPLAY=:0 6 | export HOME=/lounge 7 | export PATH="/lounge/bin/:$PATH" 8 | sudo -u lounge xhost + 9 | #resolution="$(sudo -u lounge /lounge/bin/janosh -r get /display/resolution)" 10 | #sudo -u lounge /lounge/bin/janosh -t set /display/resolution $resolution 11 | 12 | # apply real resolution 13 | #resolution="`xrandr -q | fgrep "*" | tr -s " " | cut -d" " -f2`" 14 | #sudo -u lounge /lounge/bin/janosh -t set /display/resolution $resolution 15 | 16 | xset -dpms 17 | xset s off 18 | 19 | xbindkeys & 20 | sudo -u lounge /usr/bin/unclutter -root -grab -idle 1 -reset & 21 | # somehow the first message doesnt make it 22 | janosh publish something 23 | awesome 24 | ) &> /tmp/xsession 25 | 26 | -------------------------------------------------------------------------------- /src/root/.janosh/janosh.json: -------------------------------------------------------------------------------- 1 | { 2 | "database": "/root/janosh.db", 3 | "port": "22222" 4 | } 5 | -------------------------------------------------------------------------------- /src/root/.vimrc: -------------------------------------------------------------------------------- 1 | set ts=2 2 | set expandtab 3 | syntax on 4 | 5 | -------------------------------------------------------------------------------- /src/root/.xbindkeysrc: -------------------------------------------------------------------------------- 1 | ########################### 2 | # xbindkeys configuration # 3 | ########################### 4 | # 5 | # Version: 0.1.3 6 | # 7 | # If you edit this, do not forget to uncomment any lines that you change. 8 | # The pound(#) symbol may be used anywhere for comments. 9 | # 10 | # A list of keys is in /usr/include/X11/keysym.h and in 11 | # /usr/include/X11/keysymdef.h 12 | # The XK_ is not needed. 13 | # 14 | # List of modifier (on my keyboard): 15 | # Control, Shift, Mod1 (Alt), Mod2 (NumLock), 16 | # Mod3 (CapsLock), Mod4, Mod5 (Scroll). 17 | # 18 | # Another way to specifie a key is to use 'xev' and set the 19 | # keycode with c:nnn or the modifier with m:nnn where nnn is 20 | # the keycode or the state returned by xev 21 | # 22 | # This file is created by xbindkey_config 23 | # The structure is : 24 | # # Remark 25 | # "command" 26 | # m:xxx + c:xxx 27 | # Shift+... 28 | 29 | 30 | 31 | 32 | #keystate_numlock = enable 33 | #keystate_scrolllock = enable 34 | #keystate_capslock = enable 35 | 36 | 37 | 38 | #reboot 39 | "/bin/bash /lounge/makefirstboot.sh" 40 | m:0x4 + c:67 41 | Control + F1 42 | 43 | # 44 | # End of xbindkeys configuration 45 | -------------------------------------------------------------------------------- /src/root/lua/display.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | 4 | local function setResolution(key,op,value) 5 | Janosh:system("/root/shell/display setResolution " .. Janosh:get("/display/adapter/value").adapter.value .. " " .. value) 6 | end 7 | 8 | local function setBlanking(key,op,value) 9 | Janosh:system("/root/shell/display setBlanking " .. value) 10 | end 11 | 12 | function reload(key,op,value) 13 | Janosh:transaction(function() 14 | p,i,o,e = Janosh:popen("/root/shell/display", "readAvailableAdapters") 15 | j=0 16 | while true do 17 | line = Janosh:preadLine(o) 18 | if line == nil then break end 19 | if j == 0 then 20 | Janosh:set("/display/adapter/value",line) 21 | end 22 | Janosh:set("/display/adapter/choices/#" .. j, line) 23 | j = j + 1 24 | end 25 | Janosh:pclose(i) 26 | Janosh:pclose(o) 27 | Janosh:pclose(e) 28 | 29 | p,i,o,e = Janosh:popen("/root/shell/display", "readAvailableResolutions") 30 | j=0 31 | while true do 32 | line = Janosh:preadLine(o) 33 | if line == nil then break end 34 | Janosh:set("/display/resolution/choices/#" .. j, line) 35 | j = j + 1 36 | end 37 | Janosh:pclose(i) 38 | Janosh:pclose(o) 39 | Janosh:pclose(e) 40 | 41 | p,i,o,e = Janosh:popen("/root/shell/display", "readCurrentResolution") 42 | j=0 43 | line = Janosh:preadLine(o) 44 | assert(line ~= nil) 45 | Janosh:set("/display/resolution/value", line) 46 | Janosh:pclose(i) 47 | Janosh:pclose(o) 48 | Janosh:pclose(e) 49 | 50 | end) 51 | end 52 | 53 | Janosh:subscribe("/display/resolution/value", setResolution) 54 | Janosh:subscribe("/display/blank/value", setBlanking) 55 | Janosh:subscribe("displayReload", reload) 56 | 57 | while true do 58 | Janosh:sleep(100000) 59 | end 60 | 61 | -------------------------------------------------------------------------------- /src/root/lua/network.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | 4 | local function makeHostname() 5 | Janosh:system("/root/shell/network makeHostname " .. Janosh:get("/network/hostname").hostname) 6 | end 7 | 8 | local function makeNetworkDhcp() 9 | interface = Janosh:get("/network/connection/interface").connection.interface 10 | print("interface:", interface) 11 | Janosh:system("/root/shell/network makeNetworkDhcp " .. interface) 12 | end 13 | 14 | local function makeNetworkMan() 15 | obj = Janosh:get("/network/.") 16 | Janosh:system("/root/shell/network makeNetworkMan " .. obj.connection.interface .. " " .. obj.address .. " " .. obj.netmask .. " " .. obj.gateway) 17 | end 18 | 19 | local function addWifi() 20 | obj = Janosh:get("/network/.") 21 | Janosh:system("/root/shell/network addWifi " .. obj.wifi.encryption.value .. " " .. obj.wifi.ssid .. " " .. obj.wifi.passphrase) 22 | end 23 | 24 | local function makeDns() 25 | Janosh:system("/root/shell/network makeDns " .. Janosh:get("/network/nameserver").nameserver) 26 | end 27 | 28 | function make() 29 | Janosh:transaction(function() 30 | obj = Janosh:get("/network/.") 31 | makeHostname() 32 | if obj.mode.value == "DHCP" then 33 | makeNetworkDhcp() 34 | else 35 | makeNetworkMan() 36 | makeDns() 37 | end 38 | print(obj.connection.value) 39 | if obj.connection.value == "Wifi" then 40 | print("wifi") 41 | addWifi() 42 | end 43 | end) 44 | end 45 | 46 | function reload() 47 | Janosh:transaction(function() 48 | p,i,o,e = Janosh:popen("/root/shell/network", "readWirelessNics") 49 | i=0 50 | while true do 51 | line = Janosh:preadLine(o) 52 | if line == nil then break end 53 | Janosh:set("/network/connection/wireless/choices/#" .. i, line) 54 | i = i + 1 55 | end 56 | Janosh:pclose(i) 57 | Janosh:pclose(o) 58 | Janosh:pclose(e) 59 | 60 | p,i,o,e = Janosh:popen("/root/shell/network", "readWiredNics") 61 | i=0 62 | while true do 63 | line = Janosh:preadLine(o) 64 | if line == nil then break end 65 | Janosh:set("/network/connection/wired/choices/#" .. i, line) 66 | i = i + 1 67 | end 68 | Janosh:pclose(i) 69 | Janosh:pclose(o) 70 | Janosh:pclose(e) 71 | 72 | -- Janosh:system("/etc/init.d/networking stop") 73 | -- Janosh:system("/etc/init.d/networking start") 74 | end) 75 | end 76 | 77 | Janosh:subscribe("networkMake", make) 78 | Janosh:subscribe("networkReload", reload) 79 | while true do 80 | Janosh:sleep(100000) 81 | end 82 | 83 | -------------------------------------------------------------------------------- /src/root/lua/searx.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | Janosh:system("mkdir -p /run/uwsgi/app/searx") 4 | Janosh:system("chown searx:searx /run/uwsgi/app/searx") 5 | Janosh:system("uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/searx.ini") 6 | 7 | -------------------------------------------------------------------------------- /src/root/lua/system.lua: -------------------------------------------------------------------------------- 1 | #!/lounge/bin/janosh -f 2 | 3 | 4 | local function makeInittab(key,op,value) 5 | Janosh:system("/root/shell/system makeInittab") 6 | end 7 | 8 | Janosh:subscribe("systemMakeinittab", makeInittab) 9 | 10 | while true do 11 | Janosh:sleep(100000) 12 | end 13 | 14 | -------------------------------------------------------------------------------- /src/root/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "network": { 3 | "mode": { 4 | "choices" : [ "DHCP", "Manual" ], 5 | "value": "DHCP" 6 | }, 7 | "connection": { 8 | "choices" : ["Wifi", "Ethernet"], 9 | "value": "Wifi", 10 | "interface": "", 11 | "wired" : { 12 | "choices" : [] 13 | }, 14 | "wireless" : { 15 | "choices" : [] 16 | } 17 | }, 18 | "address": "", 19 | "netmask": "255.255.255.0", 20 | "gateway": "", 21 | "nameserver": "", 22 | "hostname": "", 23 | "wifi": { 24 | "encryption": { 25 | "choices" : [ "NONE", "WEP", "WPA-PSK" ], 26 | "value": "WPA-PSK" 27 | }, 28 | "ssid": "", 29 | "passphrase": "" 30 | } 31 | }, 32 | 33 | "storage": { 34 | "smb": { 35 | "user":"u", 36 | "password":"p", 37 | "domain":"d", 38 | "host":"h", 39 | "directory":"d" 40 | } 41 | }, 42 | 43 | "display": { 44 | "adapter": { 45 | "choices" : [ ], 46 | "value": "" 47 | }, 48 | "resolution": { 49 | "choices" : [], 50 | "value": "" 51 | }, 52 | "blank": { 53 | "choices" : [ "0", "5", "15", "30", "60", "300" ], 54 | "value": "30" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/root/shell/display: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FUNCTION="$1" 4 | 5 | 6 | function setResolution() { 7 | xrandr --output "$1" --mode "$2" --primary 8 | } 9 | 10 | function setBlanking() { 11 | timeout="$1" 12 | if [ "$timeout" -gt 0 ]; then 13 | xset s blank 14 | xset s $[ $timeout * 60 ] 15 | xset +dpms 16 | setterm -blank $timeout 17 | setterm -powersave on 18 | setterm -powerdown $timeout 19 | 20 | else 21 | xset s off 22 | xset -dpms 23 | setterm -blank 0 24 | setterm -powersave off 25 | setterm -powerdown 0 26 | fi 27 | } 28 | 29 | 30 | function readAvailableAdapters() { 31 | xrandr -q | grep -Po '^\K(.*)(?= connected)' 32 | } 33 | 34 | function readAvailableResolutions() { 35 | xrandr -q | sed "1,/^$1/d" | while read line; do 36 | if ! echo $line | grep -Po '^\s*\K([0-9]*x[0-9]*)(?=)'; then 37 | break 38 | fi 39 | done 40 | } 41 | 42 | function readCurrentResolution() { 43 | xrandr -q | grep -m1 -Po 'current \K([0-9]* x [0-9]*)(?=)' | sed 's/ //g' 44 | } 45 | 46 | if [ "$(type -t "$FUNCTION")" == "function" ]; then 47 | shift 48 | $FUNCTION $@ 49 | else 50 | echo "Unknown command: $FUNCTION" 1>&2 51 | exit 1 52 | fi 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/root/shell/network: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FUNCTION="$1" 4 | 5 | function makeHostname() { 6 | echo "$1" > "/etc/hostname" 7 | } 8 | 9 | function makeNetworkDhcp() { 10 | 11 | cat > /etc/network/interfaces < /etc/network/interfaces < /etc/resolv.conf <> /etc/network/interfaces <> /etc/network/interfaces <&2 67 | exit 1 68 | fi 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/root/shell/system: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FUNCTION=$1 4 | 5 | function makeInittab() { 6 | cat > /etc/inittab <&2 37 | exit 1 38 | fi 39 | 40 | -------------------------------------------------------------------------------- /src/setup/askconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | ask="dialog --stdout --ok-label Next --cancel-label Back" 22 | 23 | function askHowNet() { 24 | $ask --radiolist "Network Configuration" 11 42 4 \ 25 | dhcp "Automatic configuration" on \ 26 | manual "Manual configuration" off 27 | } 28 | 29 | function askNetConnection() { 30 | $ask --radiolist "Network Connection" 9 32 2 \ 31 | Ethernet "Wired" on \ 32 | Wifi "Wireless" off 33 | } 34 | 35 | function askWifiSSID() { 36 | $ask --nocancel --inputbox "Wireless Network (SSID)" 7 30 37 | } 38 | 39 | function askWifiEncryption() { 40 | $ask --radiolist "Wireless Encryption" 10 38 3 \ 41 | WPA-PSK "WPA Passphrase" on \ 42 | WEP "WEP Passphrase" off \ 43 | NONE "No encryption" off 44 | } 45 | 46 | function askWifiPassphrase() { 47 | $ask --insecure --passwordbox "Wireless Passphrase" 7 30 48 | } 49 | 50 | 51 | function askHostname() { 52 | $ask --nocancel --inputbox "Please specify a hostname:" 7 30 53 | } 54 | 55 | function askManualNetwork() { 56 | $ask --form "Manual Network Configuration" 12 38 0 \ 57 | "Address:" 1 1 "" 1 12 20 0 \ 58 | "Netmask:" 2 1 "" 2 12 20 0 \ 59 | "Gateway:" 3 1 "" 3 12 20 0 \ 60 | "DNS:" 4 1 "" 4 12 20 0 61 | } 62 | 63 | function askDoReboot() { 64 | $ask --yesno 'Finish configuration and reboot?' 6 43 65 | } 66 | 67 | -------------------------------------------------------------------------------- /src/setup/firstboot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ScreenInvader - A shared media experience. Instant and seamless. 4 | # Copyright (C) 2012 Amir Hassan 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | # 20 | 21 | ( 22 | set -x 23 | depmod 24 | [ -z "$LC_ALL" ] && export LC_ALL=C 25 | cd `dirname $0` 26 | chvt 2 27 | sudo -u lounge /lounge/go/bin/ipfs init 28 | sudo -u lounge /lounge/go/bin/ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8082 29 | 30 | ln -s /usr/lib/x86_64-linux-gnu/libzmq.so.3 /usr/lib/x86_64-linux-gnu/libzmq.so 31 | ln -s /usr/lib/arm-linux-gnueabihf/libzmq.so.3 /usr/lib/arm-linux-gnueabihf/libzmq.so 32 | chown root:root /etc/sudoers 33 | mkdir -p /var/log/nginx 34 | chmod a+rw /var/log/nginx 35 | chmod 0440 /etc/sudoers 36 | chown -R lounge:users /lounge/ 37 | 38 | update-rc.d xserver defaults 39 | update-rc.d nginx defaults 40 | update-rc.d janosh-lounge defaults 41 | update-rc.d janosh-root defaults 42 | 43 | /etc/init.d/janosh-lounge start 44 | /etc/init.d/janosh-root start 45 | 46 | update-rc.d screeninvader-lounge defaults 47 | update-rc.d screeninvader-root defaults 48 | 49 | /etc/init.d/screeninvader-root start 50 | 51 | sleep 3 52 | 53 | 54 | janosh="/lounge/bin/janosh" 55 | 56 | export HOME=/lounge 57 | export USER=lounge 58 | 59 | $janosh truncate 60 | $janosh load /lounge/lounge.json 61 | $janosh dump 62 | 63 | export HOME=/root 64 | export USER=root 65 | 66 | $janosh truncate 67 | $janosh load /root/root.json 68 | $janosh dump 69 | 70 | cp /var/log/janosh-*.log /setup 71 | 72 | $janosh publish networkReload 73 | 74 | if [ -f ./answer.sh ]; then 75 | source ./answer.sh 76 | else 77 | source ./askconfig.sh 78 | fi 79 | 80 | function makeHostname() { 81 | $janosh set /network/hostname "$1" 82 | } 83 | 84 | function makeDNS() { 85 | $janosh set /network/nameserver "$1" 86 | } 87 | 88 | function makeDHCPNet() { 89 | $janosh set /network/connection/interface "$1" 90 | } 91 | 92 | function makeManualNet() { 93 | $janosh set /network/mode/value Manual /network/connection/interface "$1" /network/address "$2" /network/netmask "$3" /network/gateway "$4" 94 | } 95 | 96 | function makeWifi() { 97 | $janosh set /network/connection/interface "$1" /network/wifi/ssid "$2" /network/wifi/encryption/value "$3" /network/wifi/passphrase "$4" 98 | } 99 | 100 | function doConf() { 101 | ${1}Conf 102 | } 103 | 104 | function hostnameConf(){ 105 | hostname= 106 | while [ -z "$hostname" ]; do 107 | hostname=$(askHostname) 108 | done 109 | 110 | makeHostname "$hostname" 111 | doConf "connection" 112 | } 113 | 114 | INTERFACE= 115 | 116 | function connectionConf() { 117 | howconf=$(askNetConnection) 118 | if [ $? == 0 ]; then 119 | $janosh set /network/connection/value "$howconf" 120 | if [ "$howconf" == "Wifi" ]; then 121 | doConf "wireless" 122 | elif [ "$howconf" == "Ethernet" ]; then 123 | export INTERFACE="eth0" 124 | doConf "network" 125 | fi 126 | else 127 | doConf "hostname" 128 | fi 129 | } 130 | 131 | function wirelessConf() { 132 | ssid=$(askWifiSSID) 133 | if [ $? == 0 ]; then 134 | encrypt=$(askWifiEncryption) 135 | if [ "$encrypt" == "WPA-PSK" -o "$encrypt" == "WEP" ]; then 136 | passphrase=$(askWifiPassphrase) 137 | fi 138 | export INTERFACE="wlan0" 139 | makeWifi "$INTERFACE" "$ssid" "$encrypt" "$passphrase" 140 | doConf "network" 141 | else 142 | doConf "connection" 143 | fi 144 | } 145 | 146 | function networkConf() { 147 | howconf=$(askHowNet) 148 | if [ $? == 0 ]; then 149 | if [ "$howconf" == "dhcp" ]; then 150 | makeDHCPNet "$INTERFACE" 151 | elif [ "$howconf" == "manual" ]; then 152 | netconf=$(askManualNetwork) 153 | if [ $? == 0 ]; then 154 | set $netconf 155 | makeManualNet "$INTERFACE" "$1" "$2" "$3" 156 | makeDNS "$4" 157 | else 158 | doConf "network" 159 | fi 160 | fi 161 | doConf "reboot" 162 | else 163 | doConf "connection" 164 | fi 165 | } 166 | 167 | function rebootConf(){ 168 | if askDoReboot; then 169 | finish 170 | else 171 | doConf "hostname" 172 | fi 173 | } 174 | 175 | function finish() { 176 | $janosh publish networkMake 177 | update-rc.d avahi-daemon defaults 178 | mkdir -p /share 179 | mkdir -p /var/cache/debconf/ 180 | chown -R lounge:users /lounge/ 181 | usermod -s /bin/bash root 182 | usermod -G audio lounge 183 | cat /var/log/network.log 184 | cat /var/log/janosh-root.log 185 | rm /lib/systemd/system/nginx.service 186 | /sbin/shutdown -r now 187 | } 188 | 189 | doConf "hostname" 190 | $janosh publish networkReload 191 | ) &> /setup.log 192 | -------------------------------------------------------------------------------- /src/setup/template-firstboot.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # ScreenInvader - A shared media experience. Instant and seamless. 3 | # Copyright (C) 2012 Amir Hassan 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | # 19 | 20 | function askHowNet() { 21 | echo "dhcp" 22 | # echo "manual" 23 | } 24 | 25 | function askNetConnection() { 26 | # echo "Wifi" 27 | echo "Ethernet" 28 | } 29 | 30 | function askWifiSSID() { 31 | echo "" 32 | } 33 | 34 | function askWifiEncryption() { 35 | # echo "WPA-PSK" 36 | # echo "WEP" 37 | echo "NONE" 38 | } 39 | 40 | function askWifiPassphrase() { 41 | echo "" 42 | } 43 | 44 | function askHostname() { 45 | echo "screeninvader" 46 | } 47 | 48 | function askManualNetwork() { 49 | echo "" # address 50 | echo "" # netmask 51 | echo "" # gateway 52 | echo "" # nameserver 53 | } 54 | 55 | function askDoReboot() { 56 | return 0 # no need to modify ;) 57 | } 58 | -------------------------------------------------------------------------------- /src/usr/share/awesome/themes/default/theme.lua: -------------------------------------------------------------------------------- 1 | --------------------------- 2 | -- Default awesome theme -- 3 | --------------------------- 4 | 5 | theme = {} 6 | 7 | theme.font = "sans 8" 8 | 9 | theme.bg_normal = "#222222" 10 | theme.bg_focus = "#535d6c" 11 | theme.bg_urgent = "#ff0000" 12 | theme.bg_minimize = "#444444" 13 | 14 | theme.fg_normal = "#aaaaaa" 15 | theme.fg_focus = "#ffffff" 16 | theme.fg_urgent = "#ffffff" 17 | theme.fg_minimize = "#ffffff" 18 | 19 | theme.border_width = "1" 20 | theme.border_normal = "#000000" 21 | theme.border_focus = "#535d6c" 22 | theme.border_marked = "#91231c" 23 | 24 | -- There are other variable sets 25 | -- overriding the default one when 26 | -- defined, the sets are: 27 | -- [taglist|tasklist]_[bg|fg]_[focus|urgent] 28 | -- titlebar_[bg|fg]_[normal|focus] 29 | -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] 30 | -- mouse_finder_[color|timeout|animate_timeout|radius|factor] 31 | -- Example: 32 | --theme.taglist_bg_focus = "#ff0000" 33 | 34 | -- Display the taglist squares 35 | theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png" 36 | theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png" 37 | 38 | theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/floatingw.png" 39 | 40 | -- Variables set for theming the menu: 41 | -- menu_[bg|fg]_[normal|focus] 42 | -- menu_[border_color|border_width] 43 | theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png" 44 | theme.menu_height = "15" 45 | theme.menu_width = "100" 46 | 47 | -- You can add as many variables as 48 | -- you wish and access them by using 49 | -- beautiful.variable in your rc.lua 50 | --theme.bg_widget = "#cc0000" 51 | 52 | -- Define the image to load 53 | theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" 54 | theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" 55 | 56 | theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" 57 | theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" 58 | theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" 59 | theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" 60 | 61 | theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png" 62 | theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" 63 | theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" 64 | theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png" 65 | 66 | theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png" 67 | theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" 68 | theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" 69 | theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" 70 | 71 | theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" 72 | theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" 73 | theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" 74 | theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png" 75 | 76 | -- You can use your own command to set your wallpaper 77 | theme.wallpaper_cmd = { "awsetbg -c /lounge/logo.png" } 78 | 79 | -- You can use your own layout icons like this: 80 | theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png" 81 | theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png" 82 | theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png" 83 | theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png" 84 | theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png" 85 | theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png" 86 | theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png" 87 | theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png" 88 | theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png" 89 | theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png" 90 | theme.layout_spiral = "/usr/share/awesome/themes/default/layouts/spiralw.png" 91 | theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png" 92 | 93 | theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png" 94 | 95 | return theme 96 | -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 97 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/adobe-dingbats.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/adobe-dingbats.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/adobe-standard.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/adobe-standard.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/adobe-symbol.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/adobe-symbol.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/armscii-8.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/armscii-8.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/ascii-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/ascii-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/dec-special.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/dec-special.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/encodings.dir: -------------------------------------------------------------------------------- 1 | 64 2 | jisx0208.1983-0 large/jisx0208.1990-0.enc.gz 3 | jisx0208.1990-0 large/jisx0208.1990-0.enc.gz 4 | gb18030.2000-1 large/gb18030.2000-1.enc.gz 5 | ksxjohab-1 large/ksc5601.1992-3.enc.gz 6 | ksx1001.1998-3 large/ksc5601.1992-3.enc.gz 7 | ksc5601.1992-3 large/ksc5601.1992-3.enc.gz 8 | big5.cp950-0 large/big5.eten-0.enc.gz 9 | big5-0 large/big5.eten-0.enc.gz 10 | big5.eten-0 large/big5.eten-0.enc.gz 11 | gb2312.1980-0 large/gb2312.1980-0.enc.gz 12 | cns11643-2 large/cns11643-2.enc.gz 13 | cns11643-2 large/cns11643-2.enc.gz 14 | gbk-0 large/gbk-0.enc.gz 15 | jisx0201.1976-0 large/jisx0201.1976-0.enc.gz 16 | sun.unicode.india-0 large/sun.unicode.india-0.enc.gz 17 | ksx1001.1997-0 large/ksc5601.1987-0.enc.gz 18 | ksx1001.1998-0 large/ksc5601.1987-0.enc.gz 19 | ksc5601.1987-0 large/ksc5601.1987-0.enc.gz 20 | gb18030.2000-0 large/gb18030.2000-0.enc.gz 21 | gb18030-0 large/gb18030-0.enc.gz 22 | jisx0212.1990-0 large/jisx0212.1990-0.enc.gz 23 | cns11643-1 large/cns11643-1.enc.gz 24 | cns11643-1 large/cns11643-1.enc.gz 25 | big5hkscs-0 large/big5hkscs-0.enc.gz 26 | cns11643-3 large/cns11643-3.enc.gz 27 | cns11643-3 large/cns11643-3.enc.gz 28 | tcvn-0 ./tcvn-0.enc.gz 29 | microsoft-cp1251 ./microsoft-cp1251.enc.gz 30 | microsoft-cp1254 ./microsoft-cp1254.enc.gz 31 | ibm-cp437 ./ibm-cp437.enc.gz 32 | microsoft-cp1256 ./microsoft-cp1256.enc.gz 33 | adobe-symbol ./adobe-symbol.enc.gz 34 | microsoft-cp1253 ./microsoft-cp1253.enc.gz 35 | armscii-8 ./armscii-8.enc.gz 36 | microsoft-ansi ./microsoft-cp1252.enc.gz 37 | microsoft-cp1252 ./microsoft-cp1252.enc.gz 38 | microsoft-cp1255 ./microsoft-cp1255.enc.gz 39 | microsoft-cp1257 ./microsoft-cp1257.enc.gz 40 | suneu-greek ./suneu-greek.enc.gz 41 | mulelao-1 ./mulelao-1.enc.gz 42 | mulearabic-0 ./mulearabic-0.enc.gz 43 | iso8859-16 ./iso8859-16.enc.gz 44 | ibm-cp852 ./ibm-cp852.enc.gz 45 | iso8859-6.16 ./iso8859-6.16.enc.gz 46 | mulearabic-2 ./mulearabic-2.enc.gz 47 | tis620-2 ./tis620-2.enc.gz 48 | iso8859-6.8x ./iso8859-6.8x.enc.gz 49 | ibm-cp850 ./ibm-cp850.enc.gz 50 | iso8859-13 ./iso8859-13.enc.gz 51 | dec-special ./dec-special.enc.gz 52 | viscii1.1-1 ./viscii1.1-1.enc.gz 53 | ascii-0 ./ascii-0.enc.gz 54 | adobe-dingbats ./adobe-dingbats.enc.gz 55 | tis620.2533-0 ./iso8859-11.enc.gz 56 | tis620.2533-1 ./iso8859-11.enc.gz 57 | tis620.2529-1 ./iso8859-11.enc.gz 58 | tis620-0 ./iso8859-11.enc.gz 59 | iso8859-11 ./iso8859-11.enc.gz 60 | mulearabic-1 ./mulearabic-1.enc.gz 61 | ibm-cp866 ./ibm-cp866.enc.gz 62 | adobe-standard ./adobe-standard.enc.gz 63 | microsoft-cp1258 ./microsoft-cp1258.enc.gz 64 | microsoft-win3.1 ./microsoft-win3.1.enc.gz 65 | microsoft-cp1250 ./microsoft-cp1250.enc.gz 66 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/ibm-cp437.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/ibm-cp437.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/ibm-cp850.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/ibm-cp850.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/ibm-cp852.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/ibm-cp852.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/ibm-cp866.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/ibm-cp866.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/iso8859-11.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/iso8859-11.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/iso8859-13.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/iso8859-13.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/iso8859-16.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/iso8859-16.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/iso8859-6.16.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/iso8859-6.16.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/iso8859-6.8x.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/iso8859-6.8x.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/big5.eten-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/big5.eten-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/big5hkscs-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/big5hkscs-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/cns11643-1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/cns11643-1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/cns11643-2.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/cns11643-2.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/cns11643-3.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/cns11643-3.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/encodings.dir: -------------------------------------------------------------------------------- 1 | 26 2 | jisx0208.1983-0 ./jisx0208.1990-0.enc.gz 3 | jisx0208.1990-0 ./jisx0208.1990-0.enc.gz 4 | gb18030.2000-1 ./gb18030.2000-1.enc.gz 5 | ksxjohab-1 ./ksc5601.1992-3.enc.gz 6 | ksx1001.1998-3 ./ksc5601.1992-3.enc.gz 7 | ksc5601.1992-3 ./ksc5601.1992-3.enc.gz 8 | big5.cp950-0 ./big5.eten-0.enc.gz 9 | big5-0 ./big5.eten-0.enc.gz 10 | big5.eten-0 ./big5.eten-0.enc.gz 11 | gb2312.1980-0 ./gb2312.1980-0.enc.gz 12 | cns11643-2 ./cns11643-2.enc.gz 13 | cns11643-2 ./cns11643-2.enc.gz 14 | gbk-0 ./gbk-0.enc.gz 15 | jisx0201.1976-0 ./jisx0201.1976-0.enc.gz 16 | sun.unicode.india-0 ./sun.unicode.india-0.enc.gz 17 | ksx1001.1997-0 ./ksc5601.1987-0.enc.gz 18 | ksx1001.1998-0 ./ksc5601.1987-0.enc.gz 19 | ksc5601.1987-0 ./ksc5601.1987-0.enc.gz 20 | gb18030.2000-0 ./gb18030.2000-0.enc.gz 21 | gb18030-0 ./gb18030-0.enc.gz 22 | jisx0212.1990-0 ./jisx0212.1990-0.enc.gz 23 | cns11643-1 ./cns11643-1.enc.gz 24 | cns11643-1 ./cns11643-1.enc.gz 25 | big5hkscs-0 ./big5hkscs-0.enc.gz 26 | cns11643-3 ./cns11643-3.enc.gz 27 | cns11643-3 ./cns11643-3.enc.gz 28 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/gb18030-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/gb18030-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/gb18030.2000-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/gb18030.2000-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/gb18030.2000-1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/gb18030.2000-1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/gb2312.1980-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/gb2312.1980-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/gbk-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/gbk-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/jisx0201.1976-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/jisx0201.1976-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/jisx0208.1990-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/jisx0208.1990-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/jisx0212.1990-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/jisx0212.1990-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/ksc5601.1987-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/ksc5601.1987-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/ksc5601.1992-3.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/ksc5601.1992-3.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/large/sun.unicode.india-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/large/sun.unicode.india-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1250.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1250.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1251.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1251.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1252.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1252.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1253.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1253.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1254.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1254.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1255.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1255.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1256.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1256.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1257.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1257.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-cp1258.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-cp1258.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/microsoft-win3.1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/microsoft-win3.1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/mulearabic-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/mulearabic-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/mulearabic-1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/mulearabic-1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/mulearabic-2.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/mulearabic-2.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/mulelao-1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/mulelao-1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/suneu-greek.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/suneu-greek.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/tcvn-0.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/tcvn-0.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/tis620-2.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/tis620-2.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/encodings/viscii1.1-1.enc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/encodings/viscii1.1-1.enc.gz -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/fonts.dir: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/fonts.scale: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/misc/fonts.dir: -------------------------------------------------------------------------------- 1 | 3 2 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-ascii-0 3 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-iso10646-1 4 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-iso8859-1 5 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/misc/fonts.scale: -------------------------------------------------------------------------------- 1 | 3 2 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-ascii-0 3 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-iso10646-1 4 | topaz.ttf -misc-topaz a500a1000a2000-medium-r-normal--0-0-0-0-c-0-iso8859-1 5 | -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/misc/topaz.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/X11/misc/topaz.ttf -------------------------------------------------------------------------------- /src/usr/share/fonts/X11/util/map-JISX0201.1976-0: -------------------------------------------------------------------------------- 1 | # 2 | # Name: JIS X 0201 (1976) to Unicode 1.1 Table 3 | # Unicode version: 1.1 4 | # Table version: 0.9 5 | # Table format: Format A 6 | # Date: 8 March 1994 7 | # Authors: Glenn Adams 8 | # John H. Jenkins 9 | # 10 | # Copyright (c) 1991-1994 Unicode, Inc. All Rights reserved. 11 | # 12 | # This file is provided as-is by Unicode, Inc. (The Unicode Consortium). 13 | # No claims are made as to fitness for any particular purpose. No 14 | # warranties of any kind are expressed or implied. The recipient 15 | # agrees to determine applicability of information provided. If this 16 | # file has been provided on magnetic media by Unicode, Inc., the sole 17 | # remedy for any claim will be exchange of defective media within 90 18 | # days of receipt. 19 | # 20 | # Recipient is granted the right to make copies in any form for 21 | # internal distribution and to freely use the information supplied 22 | # in the creation of products supporting Unicode. Unicode, Inc. 23 | # specifically excludes the right to re-distribute this file directly 24 | # to third parties or other organizations whether for profit or not. 25 | # 26 | # General notes: 27 | # 28 | # This table contains the data the Unicode Consortium has on how 29 | # single-byte JIS X 0201 characters map into Unicode 1.1 30 | # (ISO/IEC 10646:1-1993 UCS-2). 31 | # 32 | # Format: Three tab-separated columns 33 | # Column #1 is the shift JIS code (in hex as 0xXX) 34 | # Column #2 is the Unicode (in hex as 0xXXXX) 35 | # Column #3 the Unicode (ISO 10646) name (follows a comment sign) 36 | # 37 | # The entries are in JIS order 38 | # 39 | # These mappings are provisional, pending definition of 40 | # official mappings by Japanese standards bodies. 41 | # 42 | # Any comments or problems, contact 43 | # 44 | # 45 | 0x20 0x0020 # SPACE 46 | 0x21 0x0021 # EXCLAMATION MARK 47 | 0x22 0x0022 # QUOTATION MARK 48 | 0x23 0x0023 # NUMBER SIGN 49 | 0x24 0x0024 # DOLLAR SIGN 50 | 0x25 0x0025 # PERCENT SIGN 51 | 0x26 0x0026 # AMPERSAND 52 | 0x27 0x0027 # APOSTROPHE 53 | 0x28 0x0028 # LEFT PARENTHESIS 54 | 0x29 0x0029 # RIGHT PARENTHESIS 55 | 0x2A 0x002A # ASTERISK 56 | 0x2B 0x002B # PLUS SIGN 57 | 0x2C 0x002C # COMMA 58 | 0x2D 0x002D # HYPHEN-MINUS 59 | 0x2E 0x002E # FULL STOP 60 | 0x2F 0x002F # SOLIDUS 61 | 0x30 0x0030 # DIGIT ZERO 62 | 0x31 0x0031 # DIGIT ONE 63 | 0x32 0x0032 # DIGIT TWO 64 | 0x33 0x0033 # DIGIT THREE 65 | 0x34 0x0034 # DIGIT FOUR 66 | 0x35 0x0035 # DIGIT FIVE 67 | 0x36 0x0036 # DIGIT SIX 68 | 0x37 0x0037 # DIGIT SEVEN 69 | 0x38 0x0038 # DIGIT EIGHT 70 | 0x39 0x0039 # DIGIT NINE 71 | 0x3A 0x003A # COLON 72 | 0x3B 0x003B # SEMICOLON 73 | 0x3C 0x003C # LESS-THAN SIGN 74 | 0x3D 0x003D # EQUALS SIGN 75 | 0x3E 0x003E # GREATER-THAN SIGN 76 | 0x3F 0x003F # QUESTION MARK 77 | 0x40 0x0040 # COMMERCIAL AT 78 | 0x41 0x0041 # LATIN CAPITAL LETTER A 79 | 0x42 0x0042 # LATIN CAPITAL LETTER B 80 | 0x43 0x0043 # LATIN CAPITAL LETTER C 81 | 0x44 0x0044 # LATIN CAPITAL LETTER D 82 | 0x45 0x0045 # LATIN CAPITAL LETTER E 83 | 0x46 0x0046 # LATIN CAPITAL LETTER F 84 | 0x47 0x0047 # LATIN CAPITAL LETTER G 85 | 0x48 0x0048 # LATIN CAPITAL LETTER H 86 | 0x49 0x0049 # LATIN CAPITAL LETTER I 87 | 0x4A 0x004A # LATIN CAPITAL LETTER J 88 | 0x4B 0x004B # LATIN CAPITAL LETTER K 89 | 0x4C 0x004C # LATIN CAPITAL LETTER L 90 | 0x4D 0x004D # LATIN CAPITAL LETTER M 91 | 0x4E 0x004E # LATIN CAPITAL LETTER N 92 | 0x4F 0x004F # LATIN CAPITAL LETTER O 93 | 0x50 0x0050 # LATIN CAPITAL LETTER P 94 | 0x51 0x0051 # LATIN CAPITAL LETTER Q 95 | 0x52 0x0052 # LATIN CAPITAL LETTER R 96 | 0x53 0x0053 # LATIN CAPITAL LETTER S 97 | 0x54 0x0054 # LATIN CAPITAL LETTER T 98 | 0x55 0x0055 # LATIN CAPITAL LETTER U 99 | 0x56 0x0056 # LATIN CAPITAL LETTER V 100 | 0x57 0x0057 # LATIN CAPITAL LETTER W 101 | 0x58 0x0058 # LATIN CAPITAL LETTER X 102 | 0x59 0x0059 # LATIN CAPITAL LETTER Y 103 | 0x5A 0x005A # LATIN CAPITAL LETTER Z 104 | 0x5B 0x005B # LEFT SQUARE BRACKET 105 | 0x5C 0x00A5 # YEN SIGN 106 | 0x5D 0x005D # RIGHT SQUARE BRACKET 107 | 0x5E 0x005E # CIRCUMFLEX ACCENT 108 | 0x5F 0x005F # LOW LINE 109 | 0x60 0x0060 # GRAVE ACCENT 110 | 0x61 0x0061 # LATIN SMALL LETTER A 111 | 0x62 0x0062 # LATIN SMALL LETTER B 112 | 0x63 0x0063 # LATIN SMALL LETTER C 113 | 0x64 0x0064 # LATIN SMALL LETTER D 114 | 0x65 0x0065 # LATIN SMALL LETTER E 115 | 0x66 0x0066 # LATIN SMALL LETTER F 116 | 0x67 0x0067 # LATIN SMALL LETTER G 117 | 0x68 0x0068 # LATIN SMALL LETTER H 118 | 0x69 0x0069 # LATIN SMALL LETTER I 119 | 0x6A 0x006A # LATIN SMALL LETTER J 120 | 0x6B 0x006B # LATIN SMALL LETTER K 121 | 0x6C 0x006C # LATIN SMALL LETTER L 122 | 0x6D 0x006D # LATIN SMALL LETTER M 123 | 0x6E 0x006E # LATIN SMALL LETTER N 124 | 0x6F 0x006F # LATIN SMALL LETTER O 125 | 0x70 0x0070 # LATIN SMALL LETTER P 126 | 0x71 0x0071 # LATIN SMALL LETTER Q 127 | 0x72 0x0072 # LATIN SMALL LETTER R 128 | 0x73 0x0073 # LATIN SMALL LETTER S 129 | 0x74 0x0074 # LATIN SMALL LETTER T 130 | 0x75 0x0075 # LATIN SMALL LETTER U 131 | 0x76 0x0076 # LATIN SMALL LETTER V 132 | 0x77 0x0077 # LATIN SMALL LETTER W 133 | 0x78 0x0078 # LATIN SMALL LETTER X 134 | 0x79 0x0079 # LATIN SMALL LETTER Y 135 | 0x7A 0x007A # LATIN SMALL LETTER Z 136 | 0x7B 0x007B # LEFT CURLY BRACKET 137 | 0x7C 0x007C # VERTICAL LINE 138 | 0x7D 0x007D # RIGHT CURLY BRACKET 139 | 0x7E 0x203E # OVERLINE 140 | 0xA1 0xFF61 # HALFWIDTH IDEOGRAPHIC FULL STOP 141 | 0xA2 0xFF62 # HALFWIDTH LEFT CORNER BRACKET 142 | 0xA3 0xFF63 # HALFWIDTH RIGHT CORNER BRACKET 143 | 0xA4 0xFF64 # HALFWIDTH IDEOGRAPHIC COMMA 144 | 0xA5 0xFF65 # HALFWIDTH KATAKANA MIDDLE DOT 145 | 0xA6 0xFF66 # HALFWIDTH KATAKANA LETTER WO 146 | 0xA7 0xFF67 # HALFWIDTH KATAKANA LETTER SMALL A 147 | 0xA8 0xFF68 # HALFWIDTH KATAKANA LETTER SMALL I 148 | 0xA9 0xFF69 # HALFWIDTH KATAKANA LETTER SMALL U 149 | 0xAA 0xFF6A # HALFWIDTH KATAKANA LETTER SMALL E 150 | 0xAB 0xFF6B # HALFWIDTH KATAKANA LETTER SMALL O 151 | 0xAC 0xFF6C # HALFWIDTH KATAKANA LETTER SMALL YA 152 | 0xAD 0xFF6D # HALFWIDTH KATAKANA LETTER SMALL YU 153 | 0xAE 0xFF6E # HALFWIDTH KATAKANA LETTER SMALL YO 154 | 0xAF 0xFF6F # HALFWIDTH KATAKANA LETTER SMALL TU 155 | 0xB0 0xFF70 # HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK 156 | 0xB1 0xFF71 # HALFWIDTH KATAKANA LETTER A 157 | 0xB2 0xFF72 # HALFWIDTH KATAKANA LETTER I 158 | 0xB3 0xFF73 # HALFWIDTH KATAKANA LETTER U 159 | 0xB4 0xFF74 # HALFWIDTH KATAKANA LETTER E 160 | 0xB5 0xFF75 # HALFWIDTH KATAKANA LETTER O 161 | 0xB6 0xFF76 # HALFWIDTH KATAKANA LETTER KA 162 | 0xB7 0xFF77 # HALFWIDTH KATAKANA LETTER KI 163 | 0xB8 0xFF78 # HALFWIDTH KATAKANA LETTER KU 164 | 0xB9 0xFF79 # HALFWIDTH KATAKANA LETTER KE 165 | 0xBA 0xFF7A # HALFWIDTH KATAKANA LETTER KO 166 | 0xBB 0xFF7B # HALFWIDTH KATAKANA LETTER SA 167 | 0xBC 0xFF7C # HALFWIDTH KATAKANA LETTER SI 168 | 0xBD 0xFF7D # HALFWIDTH KATAKANA LETTER SU 169 | 0xBE 0xFF7E # HALFWIDTH KATAKANA LETTER SE 170 | 0xBF 0xFF7F # HALFWIDTH KATAKANA LETTER SO 171 | 0xC0 0xFF80 # HALFWIDTH KATAKANA LETTER TA 172 | 0xC1 0xFF81 # HALFWIDTH KATAKANA LETTER TI 173 | 0xC2 0xFF82 # HALFWIDTH KATAKANA LETTER TU 174 | 0xC3 0xFF83 # HALFWIDTH KATAKANA LETTER TE 175 | 0xC4 0xFF84 # HALFWIDTH KATAKANA LETTER TO 176 | 0xC5 0xFF85 # HALFWIDTH KATAKANA LETTER NA 177 | 0xC6 0xFF86 # HALFWIDTH KATAKANA LETTER NI 178 | 0xC7 0xFF87 # HALFWIDTH KATAKANA LETTER NU 179 | 0xC8 0xFF88 # HALFWIDTH KATAKANA LETTER NE 180 | 0xC9 0xFF89 # HALFWIDTH KATAKANA LETTER NO 181 | 0xCA 0xFF8A # HALFWIDTH KATAKANA LETTER HA 182 | 0xCB 0xFF8B # HALFWIDTH KATAKANA LETTER HI 183 | 0xCC 0xFF8C # HALFWIDTH KATAKANA LETTER HU 184 | 0xCD 0xFF8D # HALFWIDTH KATAKANA LETTER HE 185 | 0xCE 0xFF8E # HALFWIDTH KATAKANA LETTER HO 186 | 0xCF 0xFF8F # HALFWIDTH KATAKANA LETTER MA 187 | 0xD0 0xFF90 # HALFWIDTH KATAKANA LETTER MI 188 | 0xD1 0xFF91 # HALFWIDTH KATAKANA LETTER MU 189 | 0xD2 0xFF92 # HALFWIDTH KATAKANA LETTER ME 190 | 0xD3 0xFF93 # HALFWIDTH KATAKANA LETTER MO 191 | 0xD4 0xFF94 # HALFWIDTH KATAKANA LETTER YA 192 | 0xD5 0xFF95 # HALFWIDTH KATAKANA LETTER YU 193 | 0xD6 0xFF96 # HALFWIDTH KATAKANA LETTER YO 194 | 0xD7 0xFF97 # HALFWIDTH KATAKANA LETTER RA 195 | 0xD8 0xFF98 # HALFWIDTH KATAKANA LETTER RI 196 | 0xD9 0xFF99 # HALFWIDTH KATAKANA LETTER RU 197 | 0xDA 0xFF9A # HALFWIDTH KATAKANA LETTER RE 198 | 0xDB 0xFF9B # HALFWIDTH KATAKANA LETTER RO 199 | 0xDC 0xFF9C # HALFWIDTH KATAKANA LETTER WA 200 | 0xDD 0xFF9D # HALFWIDTH KATAKANA LETTER N 201 | 0xDE 0xFF9E # HALFWIDTH KATAKANA VOICED SOUND MARK 202 | 0xDF 0xFF9F # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK 203 | -------------------------------------------------------------------------------- /src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf -------------------------------------------------------------------------------- /src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf -------------------------------------------------------------------------------- /src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/screeninvader/ScreenInvader/d058dce6f3524d914c5c96aace50aae1e0f11c61/src/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf -------------------------------------------------------------------------------- /src/usr/share/uwsgi/conf/default.ini: -------------------------------------------------------------------------------- 1 | # User-made changes in this file will be silently lost, as it is silently 2 | # rewrited with upgrade of uwsgi package. 3 | # 4 | # If you want to change default options of uWSGI daemon, then: 5 | # * copy this file somewhere 6 | # * add/remove/change options in copied file 7 | # * edit /etc/default/uwsgi and change location of inherited configuration 8 | # file to path to copied file 9 | 10 | [uwsgi] 11 | 12 | # -------------------------- 13 | # About %(deb-confnamespace) 14 | # -------------------------- 15 | # 16 | # uWSGI init.d script passes environment variable UWSGI_DEB_CONFNAMESPACE to 17 | # started uWSGI daemon, which is recognized as a (fake) option with name 18 | # 'deb-confnamespace'. 19 | # 20 | # 'confnamespace' means 'configuration files namespace'. Namespace is the name 21 | # of first directory in relative path to configuration file, but with stripped 22 | # suffix 's-enabled'. "Relative path" means "path relative to /etc/uwsgi". 23 | # 24 | # Example: namespace of '/etc/uwsgi/apps-enabled/site.ini' is 'app'. 25 | 26 | # --------------------- 27 | # About %(deb-confname) 28 | # --------------------- 29 | # 30 | # uWSGI init.d script passes environment variable UWSGI_DEB_CONFNAME to 31 | # started uWSGI daemon, which is recognized as a (fake) option with name 32 | # 'deb-confname'. 33 | # 34 | # 'confname' means 'configuration name', which is a filename without 35 | # extension of the configuration file. 36 | # 37 | # Example: name of '/etc/uwsgi/apps-enabled/site.ini' is 'site'. 38 | 39 | # try to autoload appropriate plugin if "unknown" option has been specified 40 | autoload = true 41 | 42 | # enable master process manager 43 | #master = true 44 | 45 | # spawn 2 uWSGI worker processes 46 | workers = 2 47 | 48 | # automatically kill workers on master's death 49 | no-orphans = true 50 | 51 | # write master's pid in file /run/uwsgi///pid 52 | pidfile = /run/uwsgi/app/searx/pid 53 | 54 | # bind to UNIX socket at /run/uwsgi///socket 55 | socket = /run/uwsgi/app/searx/socket 56 | 57 | # set mode of created UNIX socket 58 | chmod-socket = 660 59 | 60 | # place timestamps into log 61 | log-date = true 62 | 63 | # user identifier of uWSGI processes 64 | uid = www-data 65 | 66 | # group identifier of uWSGI processes 67 | gid = www-data 68 | -------------------------------------------------------------------------------- /templates/00aptcacher: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat < $BOOTSTRAP_LOG 4 | source .functions.sh 5 | 6 | trap 'kill $(jobs -p)' EXIT 7 | ssh-keygen -f ~/.ssh/known_hosts -R [localhost]:2222 8 | 9 | check "sshpass command" \ 10 | "which sshpass" 11 | 12 | check "ssh command" \ 13 | "which ssh" 14 | 15 | 16 | function sshc() { 17 | sshpass -p 'lounge' ssh -p 2222 -oStrictHostKeyChecking=no -oConnectTimeout=10 root@localhost "$1" 2>> test.log 18 | return $? 19 | } 20 | 21 | export -f sshc 22 | #### main #### 23 | 24 | [ $# -ne 3 ] || error "Usage: test.sh [amd64|armhf] " 25 | arch="$1" 26 | image="$2" 27 | 28 | ./runimage.sh -a "$arch" -n "$image" &>> $BOOTSTRAP_LOG & 29 | 30 | check "Wait 120 seconds" \ 31 | "sleep 120" 32 | 33 | check "Test ssh connectivity" \ 34 | 'sshc id' 35 | 36 | sleep 20 37 | 38 | check "Test Janosh availability" \ 39 | "sshc '/lounge/bin/janosh hash'" 40 | 41 | check "Test JanoshAPI availability" \ 42 | '[ "$(echo "Janosh:tprint({\"hi\"})" | sshc "bash -lc \"/lounge/bin/janosh -f /dev/stdin\"")" == "1: hi" ]' 43 | 44 | exit 0 45 | -------------------------------------------------------------------------------- /third/build_dri2.sh: -------------------------------------------------------------------------------- 1 | cd /third/libdri2 2 | ./autogen.sh 3 | ./configure 4 | make 5 | make install 6 | -------------------------------------------------------------------------------- /third/build_janosh.sh: -------------------------------------------------------------------------------- 1 | cd /third/ 2 | cd Janosh 3 | #./build_dependencies.sh 4 | threads="`grep -c ^processor /proc/cpuinfo`" 5 | export PATH="$PATH:/usr/local/bin/" 6 | make -j"$threads" screeninvader_debug 7 | make DESTDIR=/ PREFIX=/lounge/ install 8 | 9 | 10 | -------------------------------------------------------------------------------- /third/build_kernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd linux-sunxi 4 | cp screeninvader.config .config 5 | threads="`grep -c ^processor /proc/cpuinfo`" 6 | make -j"$threads" ARCH=arm CROSS_COMPILE=arm-none-eabi- uImage modules 7 | 8 | 9 | -------------------------------------------------------------------------------- /third/build_lanes.sh: -------------------------------------------------------------------------------- 1 | cd /third/ 2 | cd lanes 3 | ln -s /usr/local/lib/libluajit.so /usr/local/lib/libluajit-5.1.so 4 | make -j8 5 | make install 6 | -------------------------------------------------------------------------------- /third/build_libvdpau-sunxi.sh: -------------------------------------------------------------------------------- 1 | cd /third 2 | git clone https://github.com/screeninvader/libvdpau-sunxi.git 3 | cd libvdpau-sunxi 4 | make clean 5 | make 6 | make install 7 | 8 | -------------------------------------------------------------------------------- /third/build_luajitrocks.sh: -------------------------------------------------------------------------------- 1 | cd /third/luajit-rocks 2 | mkdir build 3 | cd build 4 | cmake .. 5 | make -j8 install 6 | 7 | -------------------------------------------------------------------------------- /third/build_mpv.sh: -------------------------------------------------------------------------------- 1 | cd /third/mpv-build 2 | echo '--disable-gl' > mpv_options 3 | echo '--disable-drm' >> mpv_options 4 | ./rebuild -j4 5 | ./install 6 | -------------------------------------------------------------------------------- /third/build_outta_space.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd outta_space 4 | npm install 5 | ./node_modules/.bin/browserify -d src/main.js -t babelify -o bundle.js 6 | ./node_modules/.bin/lessc theme/style.less > theme/style.css 7 | 8 | 9 | -------------------------------------------------------------------------------- /third/build_searx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /third/ 4 | cp -a searx /usr/local/ 5 | sudo useradd searx -d /usr/local/searx 6 | sudo chown searx:searx -R /usr/local/searx 7 | chmod a+x /usr/lib/python2.7/dist-packages/virtualenv.py 8 | ln -s /usr/lib/python2.7/dist-packages/virtualenv.py /usr/bin/virtualenv 9 | 10 | cd /usr/local/searx 11 | sudo -u searx bash -c "cd /usr/local/searx; virtualenv searx-ve; source ./searx-ve/bin/activate; ./manage.sh update_packages; sed -i -e \"s/ultrasecretkey/`openssl rand -hex 16`/g\" searx/settings.yml; sed -i -e \"s/debug : True/debug : False/g\" searx/settings.yml" 12 | 13 | -------------------------------------------------------------------------------- /third/build_shairport.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /third/shairport 4 | ./configure 5 | make 6 | make install 7 | 8 | 9 | -------------------------------------------------------------------------------- /third/build_simpleosd.sh: -------------------------------------------------------------------------------- 1 | cd /third/ 2 | git clone https://github.com/screeninvader/SimpleOSD.git 3 | cd SimpleOSD 4 | make clean 5 | make -j8 6 | make DESTDIR=/ PREFIX=/lounge/ install 7 | 8 | -------------------------------------------------------------------------------- /third/build_sunxi-mali.sh: -------------------------------------------------------------------------------- 1 | cd /third/ 2 | git clone https://github.com/screeninvader/sunxi-mali.git 3 | cd sunxi-mali 4 | ./configure 5 | make clean 6 | make 7 | true 8 | -------------------------------------------------------------------------------- /third/build_sunxi-tools.sh: -------------------------------------------------------------------------------- 1 | cd /third/sunxi-tools 2 | make clean 3 | make 4 | cp fex2bin /usr/bin/ 5 | 6 | -------------------------------------------------------------------------------- /third/build_uboot-cfg.sh: -------------------------------------------------------------------------------- 1 | cd /third/uboot-cfg/bananapi 2 | fex2bin script.fex script.bin 3 | cp uEnv.txt script.bin /boot/ 4 | 5 | -------------------------------------------------------------------------------- /third/build_ump.sh: -------------------------------------------------------------------------------- 1 | cd /third 2 | git clone https://github.com/screeninvader/libump.git 3 | cd libump 4 | autoreconf -i 5 | ./configure 6 | make clean 7 | make 8 | make install 9 | 10 | -------------------------------------------------------------------------------- /third/build_xf86-video-fbturbo.sh: -------------------------------------------------------------------------------- 1 | cd /third/ 2 | git clone https://github.com/screeninvader/xf86-video-fbturbo.git 3 | cd xf86-video-fbturbo 4 | ./autogen.sh 5 | ./configure 6 | make clean 7 | make 8 | make install 9 | 10 | -------------------------------------------------------------------------------- /third/clone_dri2.sh: -------------------------------------------------------------------------------- 1 | rm -fr libdri2 2 | git clone https://github.com/screeninvader/libdri2.git 3 | -------------------------------------------------------------------------------- /third/clone_janosh.sh: -------------------------------------------------------------------------------- 1 | rm -rf Janosh 2 | git clone https://github.com/kallaballa/Janosh.git 3 | 4 | -------------------------------------------------------------------------------- /third/clone_kernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf linux-sunxi 3 | git clone --depth 1 git://github.com/screeninvader/linux-sunxi.git 4 | 5 | -------------------------------------------------------------------------------- /third/clone_lanes.sh: -------------------------------------------------------------------------------- 1 | rm -rf lanes 2 | git clone https://github.com/screeninvader/lanes 3 | 4 | -------------------------------------------------------------------------------- /third/clone_libvdpau-sunxi.sh: -------------------------------------------------------------------------------- 1 | rm -fr libvdpau-sunxi 2 | git clone https://github.com/screeninvader/libvdpau-sunxi.git 3 | 4 | -------------------------------------------------------------------------------- /third/clone_luajitrocks.sh: -------------------------------------------------------------------------------- 1 | rm -rf luajit-rocks 2 | git clone https://github.com/kallaballa/luajit-rocks.git 3 | -------------------------------------------------------------------------------- /third/clone_mpv.sh: -------------------------------------------------------------------------------- 1 | rm -fr mpv-build 2 | git clone https://github.com/mpv-player/mpv-build.git 3 | cd mpv-build; 4 | git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg 5 | git clone http://anongit.freedesktop.org/git/fribidi/fribidi.git fribidi 6 | git clone https://github.com/libass/libass.git libass 7 | git clone https://github.com/mpv-player/mpv.git mpv 8 | 9 | 10 | -------------------------------------------------------------------------------- /third/clone_outta_space.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf outta_space 3 | git clone https://github.com/screeninvader/outta_space.git 4 | 5 | -------------------------------------------------------------------------------- /third/clone_searx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf searx 4 | git clone https://github.com/asciimoo/searx.git 5 | -------------------------------------------------------------------------------- /third/clone_shairport.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf shairport 4 | git clone https://github.com/abrasive/shairport.git 5 | 6 | -------------------------------------------------------------------------------- /third/clone_simpleosd.sh: -------------------------------------------------------------------------------- 1 | rm -rf SimpleOSD 2 | git clone https://github.com/screeninvader/SimpleOSD.git 3 | 4 | -------------------------------------------------------------------------------- /third/clone_sunxi-mali.sh: -------------------------------------------------------------------------------- 1 | rm -rf sunxi-mali 2 | git clone https://github.com/screeninvader/sunxi-mali.git 3 | -------------------------------------------------------------------------------- /third/clone_sunxi-tools.sh: -------------------------------------------------------------------------------- 1 | rm -rf sunxi-tools 2 | git clone https://github.com/screeninvader/sunxi-tools.git 3 | 4 | -------------------------------------------------------------------------------- /third/clone_uboot-cfg.sh: -------------------------------------------------------------------------------- 1 | rm -fr uboot-cfg 2 | git clone https://github.com/screeninvader/uboot-cfg.git 3 | -------------------------------------------------------------------------------- /third/clone_ump.sh: -------------------------------------------------------------------------------- 1 | rm -rf libump 2 | git clone https://github.com/screeninvader/libump.git 3 | 4 | -------------------------------------------------------------------------------- /third/clone_xf86-video-fbturbo.sh: -------------------------------------------------------------------------------- 1 | rm -rf xf86-video-fbturbo 2 | git clone https://github.com/screeninvader/xf86-video-fbturbo.git 3 | 4 | -------------------------------------------------------------------------------- /umountimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umount "$2/p1" 4 | umount "$2/p2" 5 | 6 | kpartx -dv "$1" 7 | 8 | --------------------------------------------------------------------------------