Home
Initial commit. - bitreich-conference - Bitreich Conference System HTML git clone git://bitreich.org/bitreich-conference git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-conference DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 4e45edcc18a5ec88c454ebbe6f695e36d382b325 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Fri, 8 Apr 2022 18:42:39 +0200 Initial commit. Diffstat: A README.md | 113 +++++++++++++++++++++++++++++++ A bin/bitreich-con-hold-presentation | 33 +++++++++++++++++++++++++++++++ A bin/bitreich-con-start-conference | 21 +++++++++++++++++++++ A bin/bitreich-con-stop-conference | 16 ++++++++++++++++ A bin/bitreich-con-teaser-shell | 45 +++++++++++++++++++++++++++++++ A bin/bitreich-con-view-presentation | 39 +++++++++++++++++++++++++++++++ A bin/bitreich-con-visitor-count | 4 ++++ 7 files changed, 271 insertions(+), 0 deletions(-) --- DIR diff --git a/README.md b/README.md @@ -0,0 +1,113 @@ +# The Bitreich Conference System + +## Overview + +How do people perceive the conference content? + + ssh visitor@bitreich.org + +On screen is shown what the presenter shows on the commandline. At the +bitreich conferences this is mostly some slides shown using catpoint(1). +(git://bitreich.org/pointtools) + + mpv gopher://bitreich.org/9/radio/listen + +This is simple some audio stream of any kind, which is generated by the +presenter or the audio server. Here at bitreich we use icecast and some +simple frontend script for http2gopher. + +Overall this will require at maximum 120 kb/s per visitor. You could +strip down audio quality even more. The ssh slides are bytes per second, +if any. + + +## Setup + +You will need to adapt all scripts to your needs. It is simple. So do not +fear. + +1. Create a presenter account. +2. Create a visitor account. +3. Install abduco. +5. Copy over the modified scripts from bin/ to your PATH. + 1. Modify in all scripts the prefix /br to your needs. + 2. Create the $PREFIX/con directory, where all communication is + handled. +6. Run the scripts accordingly. + +7. Setup audio via icecast etc. + +## Visitor account. + +For /etc/ssh/sshd_config: + + Match user visitor + AllowAgentForwarding no + AllowTcpForwarding no + GatewayPorts no + X11Forwarding no + PermitTunnel no + X11UseLocalhost no + PermitTTY yes + PasswordAuthentication yes + PermitEmptyPasswords yes + ForceCommand /path/to/bitreich-con-view-presentation + +Depending on how secure you want access, disabling any authentication for +this account is possible. + +## Start a Conference + + bitreich-con-start-conference + +The socket for visitor and presenter attachment is created. The teaser +shell is run. + +## Watch the Presentation + + bitreich-con-view-presentation + +See visitor account preparation above. + +## Hold a Presentation + +Presenter logs into presenter account and runs: + + bitreich-con-hold-presentation + +In the teaser shell the presenter presses Enter to get into the presenter +shell. There all possibilities of the presenter account on the +commandline is possible. + +## bitreich-con-teaser-shell + +Please see in this script, how ads are shown. You can download examples +from + + gopher://bitreich.org/1/con/2019/ads + +It is all simple text, just cat(1)ed to the screen in an random order. + +When a presenter pressed Enter in the teaser shell, the presentation mode +is started. + +## Stop a Conference + + bitreich-con-stop-conference + +This will remove all sockets and remains of the conference. + +## bitreich-con-visitor-count + +This is a simple shell to show you how, after you have set up the +conference system, visitors can be counted using standard shell commands. + +## Comments + +Send comments to: + + Christoph Lohmann <20h@r-36.net> or on #bitreich-en + irc.bitreich.org + +Have fun! + DIR diff --git a/bin/bitreich-con-hold-presentation b/bin/bitreich-con-hold-presentation @@ -0,0 +1,33 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + year="$(date +%Y)" +else + year="$1" +fi + +# Handled in bitreich-con-start-conference for a common value. +#printf 'CONTERMCOL=%d\nCONTERMLIN=%d' "$(tput cols)" "$(tput lines)" \ +# > "/br/con/termres${year}" + +<<\. cat +You will be connected to the conference holding terminal. +There just type Enter and you will get a bash prompt to hold your +presentation. + +It is advised to first resize your presentation terminal. The +viewers were advised to resize their terminal to 100x35. That +the space you have. So do not go beyond that. + +Type in ^\ (control+'\') to detach from it. + +To reconnect to it, simply run this script again. +Press any key to continue. +. + +read keypressed + +#env ABDUCO_SOCKET_DIR=/br/con/abduco abduco -A bitreichcon2017 +abduco -A "/br/con/sock/bitreichcon${year}" + DIR diff --git a/bin/bitreich-con-start-conference b/bin/bitreich-con-start-conference @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + year="$(date +%Y)" +else + year="$1" +fi + +# Set a good default. +printf "CONTERMCOL=%d\nCONTERMLIN=%d" "100" "35" \ + > "/br/con/termres${year}" +sudo -u presenter chmod g+w,g+r "/br/con/termres${year}" + +#env ABDUCO_SOCKET_DIR=/br/con/abduco abduco -A bitreichcon${year} +sudo -u presenter abduco -n "/br/con/sock/bitreichcon${year}" /br/bin/bitreich-con-teaser-shell "${year}" +sudo -u presenter chmod g+w,g+r "/br/con/sock/bitreichcon${year}" + +printf "The conference is now active and showing ads.\n" +printf "Now run bitreich-hold-presentation on your behalf.\n" + DIR diff --git a/bin/bitreich-con-stop-conference b/bin/bitreich-con-stop-conference @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + year="$(date +%Y)" +else + year="$1" +fi + +rm -f /br/con/sock/bitreichcon${year} +rm -f /br/con/termres${year} +pkill -u presenter -f "bitreichcon${year}" + +printf "All abduco sessions have been closed.\n" +printf "All was fun! :)\n" + DIR diff --git a/bin/bitreich-con-teaser-shell b/bin/bitreich-con-teaser-shell @@ -0,0 +1,45 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + year="$(date +%Y)" +else + year="$1" +fi + +function shell() { + cd "/home/presenter/con/${year}" + bash +} + +adpath="/br/gopher/con/${year}/ads" + +while /bin/true; +do + clear + adfile="${adpath}/$(ls -1 "${adpath}" | shuf -n 1)" + + i=0 + # Change the ad every 30 seconds. + while [ $i -lt 20 ]; + do + tput cup 0 0 + tput civis + cat "$adfile" + # Redisplay every second, in case someone freshly attached. + i=$(($i + 1)) + + userinput="" + read -t 1 userinput + if [ $? -eq 0 ]; + then + # Be clear and clean. + clear + tput cvvis + shell + clear + tput civis + fi + done +done + DIR diff --git a/bin/bitreich-con-view-presentation b/bin/bitreich-con-view-presentation @@ -0,0 +1,39 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + year="$(date +%Y)" +else + year="$1" +fi + +if [ ! -f "/br/con/termres${year}" ] +then + printf 'The conference has not started yet. Please retry later.\n' + exit 1 +fi + +. "/br/con/termres${year}" + +if [ "$(tput cols)" -lt "$CONTERMCOL" ] || [ "$(tput lines)" -lt "$CONTERMLIN" ] +then + printf 'Input presentation terminal is %dx%d characters.\n' \ + "$CONTERMCOL" "$CONTERMLIN" + printf 'You should adjust your terminal to it. Continue anyway? y/N: ' + read yesno + if [ "$yesno" != 'y' ] + then + exit 1 + fi +fi + +printf '%s\n' 'You will be connected to the conference view-only terminal.' \ + 'Type in ^'\\' (control+'\\') to detach from it.' \ + 'Press any key to continue.' + +read + +abduco -r -l -a /br/con/sock/bitreichcon${year} || \ + printf '%s\n' 'Could not connect to the conference. ' \ + 'Please contact 20h on #bitreich-con on freenode.' + DIR diff --git a/bin/bitreich-con-visitor-count b/bin/bitreich-con-visitor-count @@ -0,0 +1,4 @@ +#!/bin/sh + +pgrep -u visitor abduco | wc -l +