Serving Gossips: Difference between revisions

From XPUB & Lens-Based wiki
Line 193: Line 193:
== merged soul pedagogy ==
== merged soul pedagogy ==


by group of max 4 persons.
1. form group of max 4 persons.
2. you start a Tmux session together.
3. once we made sure that the setup is working for everyone. you have to first select at least 3 command that some people of the group don't know, and at least one person know about.
4. then the groups split in the space of the school.
5. the exercice is to teach or collaborate together, by showing how those command work inside of a Tmux session.  


1. you start a tmux session together.
Warning 45min goes fast, try to not spend more than 15min on a command.
  (put back the command to do so)
2. once we made sure that the setup is working for everyone. you have to first select at least 3 command that some people of the group don't know about and at least one person know about.
3. the groups split in space.
4. then teach them to each others by showing how they work inside of a tmux session. warning 30min goes fast, try to not spend more than 10min on a command.


moving around
moving around
Line 212: Line 212:
* tree
* tree
* figlet
* figlet
editing stuff
* nano
* chmod
* chown


grabbing stuff
grabbing stuff
Line 217: Line 223:
* grep
* grep
* history
* history
changing authority
* chmod
* chown


network
network
Line 230: Line 231:
* curl
* curl


yours!!!
yours!


* ...
* ...


== zine printing and CSS! ==
== zine printing and CSS! ==

Revision as of 18:34, 18 January 2026


Why do we do that in this SI ?

  • Tmux is a pedagogical tool, everyone can teach to each others things about the terminal, empowering each others! think about HowSpot, and inclusive pedagogy.
  • Tmux is a very gossipy tool, because we see what everyone type at the same time it is a way to interact with computers that include people subjectivity, mistakes, opinions, not trying to delimit the "official" from the "unofficial" the inputs.
  • it asks for all of you to invent social practices to be able to organize as a temporary group
  • by having a web and printed output with tmux2web2print, it shows we can produce experimental publishing that is collective, that capture it's process, doesn't filter, and use the server as a space.

afternoon timeline

hour session
14h00-14h30 🖐️ your first TMUX session
14h30-15h00 🗨️ presenting tmux2web2print, a tool made by Kaa
15h00-15h15 ⏳ small break
15h15-16h00 🖐️ collective TMUX pedagogy
16h00-16h15 🗨️ sharing how it went
16h15-17h00 🖐️ web2print zine of our session

what is SSH

The Secure Shell Protocol (SSH Protocol) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution.

Remote-login-is-a-lot-like-astral-projection.png

What do we mean? I am on my computer using its keyboard and its screen. But when I SSH, it's like i am on another (distant) computer, but using the interface (keyboard, screen) of my computer. We do that to interact with a server, without having to be in the same space or to plug a keyboard, or screen on it (maybe it's in a datacenter and I don't have access to it physically even...). I can use that computer, through my computer, using SSH.

Communal servers can be said to be like shared space, a colocation. In order to feel good in a colocation we need shared rules as much as shared agency. However if we connect at many on a server there isn't a chat room to share links or explain things to each others. For shared rules and shared agency, we resort to:

  • naming the folder/file in a way that convey a meaning, and standard naming practice, like what's hosted is it /var/www/ (balconny), and /home/ (our bedrooms) contain one folder per users with their 'home' directory. Things like this already induce that some spaces are more intimate and other more shared.
  • putting README.txt (like little note on the fridge) file in directory to invite people to read them as little manuals of what's happening there (using cat to dump the text, or nano to edit it).
  • read and write access can be given using chmod and chown (keys and lock we put on the doors) to give different rights to different users.

Communal "tilde" server, where everyone has a room in a big mansion type of vide:

what is TMUX

Tmux-is-a-lot-like-merging-our-minds.png

Tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing remote sessions to remain active without being visible. TMUX was first published as open-source code in 2007 by Nicholas Marriott.

What do we mean? If SSH is astral projection TMUX is like we merge our souls and interact as one person with a (distant) computer over SSH. It is handful because communication over SSH relied on established protocol in files and filenaming, while inside of a TMUX session everyone sees what everyone type immediately, like if we merged our soul we all have the same POV. But then actually typing stuff is difficult because collaboration become "character granular", if we we both try to type echo we might end up with like echehocho or something...

Tmux allows you to

  • Run multiple terminal sessions/shells inside a single terminal window
  • Detach and reattach sessions without stopping programs
  • Split a terminal into multiple panes or windows -Share sessions with other users via sockets

a shell is the program the terminal starts for you. it provides the command-line interface that lets you write commands to an operating system.

a socket is a direct connection between two points. each connection point is updated automatically. it is a server running in the background. for Tmux, it means that one or two users are directly connected to terminal shells via ssh. it's what makes the connection between two astral projection.

a session is a workspace inside a socket. it's the mindspace in which we merged our souls.

While we use Tmux mainly for collaborating, many people use it for window management and structuring their shells over time.

your first TMUX session

  1. Everyone SSH into sergio (this year server)
  2. Kaa starts a session for everyone to join.
    tmux -f tmx/tmux.conf -S /tmp/(socket) new -s (session)
  3. Kaa grant access to everyone
    chmod 777 -S /tmp/(socket)
    tmux server-access -a (username)
  4. Everyone "attach" to the session
    tmux -S /tmp/(socket) attach -t (session)
  5. Kaa (traceroute), Doriane (tree), and one or two students shows a command they like
  6. Everyone leaves the session with
    ctrl+b and then d
  7. We end the session with
    exit

tmux2web2print: serving gossips

Printing a Tmux session!

What are the server gossiping about?, What is being gossiped on the server? and of course can we print it!.

  • if we come back at the origin of the "terminal", it used to look like a printer. those machines, called teletype (starting in 1890s) or teleprinter, or telex (in the late 1920s), where basically like a typewriter but connected to a network. In those case we didn't had a screen, the inputs and outputs where printed on a paper! (if you wanna know more, a whole SI has been done on the TTY (teletype) )
  • Documentation is hard, but also - specifically for Feminist server, wanting to be inclusive and welcoming - documentation is important. Can we have documentation generated on the go? (with all the organic chaos that comes from it as part of the pedagogy?)
  • By doing Tmux hooks that activate a set of bash scripts, we can "record" what we type inside of our Tmux session and print it into some HTML file directly hosted on a server.
  • So our collective history is accessible online, but because we can print webpages, we can make a zine out of it!
  • For that we'll need to edit the CSS, but also draw/insert images? add little comment about how was the session for us, print it in different format or paper that translate what we did into a physical object.

IMPORTANT NOTE: The zine capture everything that we type. even if you remove it (with backspace), it will still show in the final output. However, what we do inside an editor like nano isn't recorded, but you can cat after saving to still get a trace of the editing. if you type and remove a lot, maybe try repeating them or using echo.

quick starting guide

this the code this repository [1] will contains a tmux configuration that

  • for every session creates a html website
  • logs events (creating, attaching, detaching from the session) to the website
  • logs everything you write in that session and the output to the website
  • contains minimal styling to print the logs into a zine
  ├── README.md
  ├── scripts # contains the scripts executed by the hooks
  │   ├── append-content.sh
  │   ├── create-session.sh
  │   ├── handle-event.sh
  │   └── handle-log.sh
  ├── template # the html template that is cloned for every session
  │   ├── index.html
  │   └── style.css
  ├── tmux # contains all the hooks we want to add to our session
  │   └── tmux.conf
  └── tmux-cheat-sheet.md

install dependencies

if tmux is not installed yet:

   apt install tmux

tmux gives us very raw output. this includes ANSI terminal escape codes for colors, cursor movements etc. We need a parser for that: [2] (if we don't want to write our own)

run to install parser

   apt install ansifilter

clone the repository

run

  git clone https://codeberg.org/czkaa/tmux2web2print.git
  cd tmux2web2print

make scripts executable and set permissions

from inside the cloned repository:

   chmod +x scripts/*.sh

will give the tmux hooks the rights to execute the scripts

run

   echo "SITES_DIR=/path/to/folder" > scripts/.env

but replace with the path where your websites-per-session should go.

start a session

run from within the repository

   tmux -f tmux/tmux.conf -S (socket) new -s (session)

if you run this from any other location, it will still work if you adjust the path pointing to the tmux/tmux.conf. This file contains the hooks which execute scripts which will create webpages – and fill them with (almost) everything that happens in the session.

others can join the session as usual. don't forget to set rights and give access before!

style and print a session

you can edit the files in the template folder to change the styling for every future session. if you share the repository, rather edit the generated files in the folder of your session.

you can print from the html with ctrl+p

limitations & troubleshooting

this is very WIP. tmux allows to create multiple panes in one window. So far, this setup only captures the output of the first, original pane. also, it breaks if a user switch happens within a session.

it uses the command pipe-pane which sends all output from a terminal pane to a script – including coloring, removing keys etc. This output is sanitized with a plugin but does not catch everything. There will be artifacts from terminal interfaces e.g. when editing a file. also, every keystroke is captured so any misspelling is recorded – which may be intentional. beware: The script does not save passwords unless they are echoed. any other sensible information besides passwords which you type will be captured!

when creating a session does not create a new webpage, it is usually either permissions or a wrong path to the tmux config

styling and printing the fanzine

...

tmux cheatsheet

...

merged soul pedagogy

1. form group of max 4 persons. 2. you start a Tmux session together. 3. once we made sure that the setup is working for everyone. you have to first select at least 3 command that some people of the group don't know, and at least one person know about. 4. then the groups split in the space of the school. 5. the exercice is to teach or collaborate together, by showing how those command work inside of a Tmux session.

Warning 45min goes fast, try to not spend more than 15min on a command.

moving around

  • cd
  • ls

displaying stuff

  • echo
  • cat
  • tree
  • figlet

editing stuff

  • nano
  • chmod
  • chown

grabbing stuff

  • grep
  • history

network

  • ifconfig
  • ping
  • traceroute
  • curl

yours!

  • ...

zine printing and CSS!