Serving Gossips

From XPUB & Lens-Based wiki


Why a Tmux session 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.

Gossip round

  • did you ever used a server and have a story to tell about it, or heard some news about a server?
  • did you ever had an incident, or friction relating to a server, a moment where it became an obstacle, or displayed some socio-political problem?
  • is there a nice functionality, something either technical or social, that you'd like to share about server or using the terminal?

our gossips are here: https://pad.xpub.nl/p/19012026_ServingGossips

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 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)
    with our folder structure: tmux -f /home/xpub/tmux2web2print/tmux/tmux.conf -S /tmp/(socket) new -s (session)
  3. Kaa grant access to everyone
    chmod 777 -S /tmp/(socket)
    if it doesn't work then try: chmod 777 /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. Also, if you paste content with line breaks it will unfortunately only recognize the first line as user input.

quick starting guide

this the code this repository tmux2web2print 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
  β”‚   β”œβ”€β”€ .env 
  β”‚   β”œβ”€β”€ 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

quick starting guide

the code from the repository allows to

  • 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

start a session

we already cloned the repository, installed dependencies and set access right

start a session:

  tmux -f /home/xpub/tmux2web2print/tmux/tmux.conf -S /tmp/(socket) new -s (session)

allow others to join:

  chmod 777 tmp/(socket)
  tmux server-access -a (username)

this created a website folder at !!!path/where/websites/are/cerated/ with the title (socket)-(session with an index.html and style.css file inside. (alomst) everything that happens in the session will be appended to the index.html.

see tmux cheat sheet for more functionality

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 chmod nano chown

grabbing stuff

grep history

network

ifconfig ping traceroutecurl

Documentation

After posting about this session on mastodon (https://post.lurk.org/deck/@doriane/115944035594398542), Simon shared with us

Simon: From the XPUB class of 2020, a reflection on when we all suddenly had to do tmux in our prototyping classes because of COVID-19