24.03.2023
Installed bpytop to look at the temperature of rosa
Cut one of the fans that was making a lot of noise
Temperature today with one fan: 35 degrees

28 October 2022
At Constant, Rue du Fort with Mara, Wendy, and Michael


6 October 2022
trying to fix etherpump!

error while running sh cron.sh


We renamed the folder /srv/etherpump/pads/ to /srv/etherpump/pads.bak/, to force etherpump to download all the pads again.
This made the error go away.

We ran the etherpump cron.sh script again, and it did work now!
So for next time: removing the "pads" folder is a work around for this error.

With one error though...


We think it is because the Etherpad API is overloaded  with the amount of requests that are being made to the API.
Things that are using the Etherpad API: etherpump, foldbot.
The index works again though!

We also checked how often etherpump is running in the crontab:



Etherpump is running every 5 minutes, which is maybe a bit too much.
We changed the timing of both etherpump and distribusi to run every 60 minutes.
During events we can change this timing if needed.

We also check how often the foldbot is running.


At the bottom, there is a sleep(60), which means it runs every 60 seconds.
We changed it to 3600, meaning it will run every hour from now on.

1 October 2022
etherpump is not working (already since Feminist Hack Meetings)


10th June 2022

we couldn't get rosa to speak but if it could (we could!),
-- sound card not working out of the box
-- wy installed ? alsa-...
-- sound interface ? 

become root
$ sudo su

$ cat /proc/asound/cards    
 0 [ALSA           ]: bcm2835_alsa - bcm2835 ALSA 
                      bcm2835 ALSA 
 1 [vc4hdmi0       ]: vc4-hdmi - vc4-hdmi-0 
                      vc4-hdmi-0 
 2 [vc4hdmi1       ]: vc4-hdmi - vc4-hdmi-1 
                      vc4-hdmi-1

List the audio devices. You will see the internal audio device ( audio card for mini Jack + hdmi) 
$ aplay -L
// from then list of audio cards after you run then aply command, we chose plughw:CARD=ALSA,DEV=0 --> you have to include aplay -D plughw:CARD=ALSA,DEV=0 in a pipe to have sound on rosa in the current set-up

$ espeak 192.168.1.1 --stdout | aplay // this probaly does not work

An example to read out loud the syslog
$ sudo cat /var/log/syslog | espeak  --stdout | aplay -D plughw:CARD=ALSA,DEV=0

If you want to add your personal user to the audio group (so you don't have to be root to play)
$ sudo adduser <username> audio
To make it work login and logout!!

$ espeak 192.168.1.121 --stdout | aplay -D plughw:CARD=ALSA,DEV=0

$ cat /var/log/syslog | espeak  --stdout | aplay -D plughw:CARD=ALSA,DEV=0 
//Rosa reading a log

Espeak can have different ways of talking .e. 
$ espeak --stdout -ven+f3 "we are the borg" | aplay -D plughw:CARD=ALSA,DEV=0 
// so called female voice

$ espeak --stdout -vfr+f2 -g50 -p99 "Rosa @ 192.168.1.122" | aplay -D plughw:CARD=ALSA,DEV=0
// in French, femal voice 2, slowed down with gaps between words -p higher pitch

http://espeak.sourceforge.net/languages.html
espeak --voices=variant

gender  <gender> [<age>]
This attribute is only a label for use in voice selection.  It doesn't change the sound of the voice. <gender> may be  male, female, or unknown.

there was this script below that would figure out
if there is an ip address, then the idea was to speak it out
so as to help this moment of local discovery

#!/bin/bash 
while : 
  do  
    ip=$(hostname -I | awk '{print $1}')
    if [ -z "$ip" ]
      then
        echo "we are not ip"
      else
        echo "we are ip: $ip"
    fi
    sleep 2
done 

Let's try to do a choral - and all play at the same time the script
sh /home/decentral1se/ipspeak

if you wanna run a choir but you're alone, use parallel:
    parallel sh ::: ipspeak ipwhisper

chatting locally
sudo apt install inspircd weechat
anyone can type weechat
 /server add localhost 127.0.0.1     (only one time)
 /connect localhost
 /join #thecafe
then you can chat wit whoever is in
/quit to leave

how to send a mail to other people
mail -t
ls /home to see the usernames
ctrl-d on an empty line to finish the email

where to customise the messages that the etherpad shows
/srv/etherpad-lite/src/locales/...

for instance, if you want to change the messages in english:
    sudo nano en.json
change the messages that are written in between the ""

friend@rosa:/srv/etherpad-lite/src$ grep -iR "WHAT IS TIME"
. ./templates/pad.html:          WHAT IS TIME.... 
./locales/en.json:  "pad.loading": "WHAT IS TIME",
./locales/en-gb.json:   "pad.loading": "WHAT IS TIME...", 

Custom 404 and 50x pages
Changed the 404 and 50x pages by adding custom_404.html and custom_50x.html here: /usr/share/nginx/html/

This is added to the nginx config file which is here = /etc/nginx/sites-enabled/default
error_page 404 /custom_404.html;
location = /custom_404.html {
    internal;
    }
error_page 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
    internal;
    }

Only later realised that there was also a custom 404 already in /var/www/htnl for instance unavailable.html and lol.html
Tested if the config file parses correctly with: sudo nginx -t
Restarted nginx: sudo service nginx reload

Installed:
    alsa, oss, pulseaudio

LOGGING INTO ROSA
To log into Rosa, there are two ways, a simple one and a more complex one. The simple one gives you access to the Rosa server while you are on the same network (so only when you are in Varia or in the next physical location of Rosa), and the more complex one gives you access on any network you find yourself on.

The simple version:
    What is ssh
  >  https://project.xpub.nl/img/xpub_logo_2020.svg
    SSH is a command that gives you access to another computer from the terminal.

Open your terminal and run:
$ ssh friend@<LOCAL IP ADDRESS OF ROSA>
Ask the key holders at the table for the password.
To find out the ip, someone who is logged in runs:
    $ sudo ifconfig

In esc: 192.168.123.121
To scan the local network
sudo arp-scan --interface=<name of network device where Rosa is one> --localnet
For the moment Rosa is an unknown device

The more complex version:
you will first need to either have to generate an rsa key.
To do this, run:
    $ ssh-keygen (only if you don't hava an rsa key already, or if you want to make a new rsa key) - skip the filename
    $ cd ~/.ssh/
    $ cat ~/.ssh/id_rsa.pub

Copy the output and ask one of the key holders at the table to add your public rsa key to the Varia server.

email the key to alice.strt@gmail.com

Edit the following file ~/.ssh/config using nano to include:
$ nano ~/.ssh/config

host varia_hub
         Hostname vvvvvvaria.org
         User jump
         Port 12345
         ForwardAgent yes
         IdentityFile ~/.ssh/id_rsa

host rosa
         Hostname 10.5.1.2
         User friend
         Port 22
         ForwardAgent yes
         ProxyJump varia_hub

N.B. that the key path/name should be made specific to your own situation 

With the above config you can now do run the following command:
    $ ssh rosa


Changing the maximum upload size for the Tiny File Manager on Rosa:
    Filesize limit is 1mb! Make sure your images are smaller.
    ERROR  / 413 error Request entity too large ...
    we edited the max upload value in /var/www/html/files.php
    we tried to change the file /etc/php/7.4/fpm/php.ini


what was missing:
    edit /etc/nginx/nginx.conf: 
        $ sudo nano /etc/nginx/nginx.conf
to include: "client_max_body_size 100M;" in the html section

NOW IT WORKS!!!!






login welcome messages
change messages:
    randomized welcome message/ Message Of The Day (MOTD)
    $ sudo nano /etc/update-motd.d/00-welcome

    message when ssh
    $ nano ~/.bashrc

    message when you access rpi with a monitor:
    $ sudo nano /etc/issue 



May 25th
Tried again to fix the file manager, followed the commands documented by ccl and Sergiu:
    IT WORKS!


April 14
To update the distribusi folders (which visualises the files on the server which you can see on the bottom of the main rosa site), go to /srv/distribusi/distribusi-go and run
Backup exploration
Systerserver uses borg and backs up
/etc
/root
/opt
/var

We could do similar and add
/home

ezn and ccl are adapting the systerserver borg configs for rosa:


https://git.bleu255.com/stagit/file/scripts/README.html


========================== install Borg

-- Borg needs to be installed on both servers

sudo apt install borgbackup

========================== create borguser

-- create a borguser user && group as root

useradd borguser

-- add borguser to sudoers

usermod -aG sudo borguser

-- to have run.sh script owned by borguser [user and group]

chown borguser:borguser /etc/backups/run.sh

-- to make sure borguser can execute a borg create command in run.sh script without needing a password we created a borguser file in sudoers.d directory

touch /etc/sudoers.d/borguser

vi /etc/sudoers.d/borguser

borguser ALL=(ALL) NOPASSWD: /bin/bash /etc/backups/run.sh

chmod 0440 /etc/sudoers.d/borguser

-- for a borguser to have access to a remote backup server create an ssh key pair and copy a public key contents to ~/.ssh/authorized_keys file on a remote server

ssh-keygen

========================== initiate Borg repo
-- we can initiate borg repo on leverburns either locally or remotely from adele. we chose the latter

borg init --encryption=repokey ssh://ccl@<remote_IP>:portnumber/home/ccl/rosabackup

========================== automate Borg backups

-- we've made a backups dir in etc on adele. created a backup script run.sh inside the backups dir.

mkdir /etc/backups

we modified the following run.sh script

#!/bin/bash -ue

sleep 5

set -e
PASSWORD_FILE=/etc/backups/.borgpwd

#
# Script configuration
#
# This is the location of the Borg repository
TARGET=ssh://ccl@<remote_IP>:portnumber/home/ccl/rosabackup

# Archive name schema
DATE=$(date --iso-8601)-$(hostname)

#
# Create backups
#

BORG_BASE_DIR="/etc/backups"
#BORG_CACHE_DIR="/.cache/borg"
BORG_FILES_CACHE_TTL=60
# Options for borg create
#BORG_OPTS="--stats --progress --compression lz4 --checkpoint-interval 86400"
BORG_OPTS="--stats --progress --compression lz4 --checkpoint-interval 300 --remote-ratelimit 8000"


# Options for borg create
BORG_OPTS="--stats --progress --compression lz4 --checkpoint-interval 86400"

# Set BORG_PASSPHRASE or BORG_PASSCOMMAND somewhere around here, using export,
# if encryption is used.
export BORG_PASSPHRASE=$(cat $PASSWORD_FILE)

# No one can answer if Borg asks these questions, it is better to just fail quickly
# instead of hanging.
export BORG_RELOCATED_REPO_ACCESS_IS_OK=no
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=no

# Log Borg version
borg --version
echo "Starting backup for $DATE"

# This is just an example, change it however you see fit
borg create $BORG_OPTS $TARGET::$DATE-$$ /home/ /etc/ /root/ /var/

-- to make run.sh executable:

chmod +x run.sh

-- to automate the backups, we created a timer and service files with the same name in /lib/systemd/system/ directory

touch automatic-backup.service
touch automatic-backup.timer

-- automatic-backup.service executes a run.sh script once

[Service]
Type=oneshot
ExecStart=/bin/bash /etc/backups/run.sh

[Install]
WantedBy=multi-user.target


-- and automatic-backup.timer triggers automatic-backup.service once a day at 4 am

[Unit]
Description=Run borgbackup daily at 4 am

[Timer]
OnCalendar=04:00
Unit=automatic-backup.service

[Install]
WantedBy=timers.target


-- to activate the changes when editing or creating a service file

systemctl daemon-reload

-- you only need to enable and start automatic-backup.timer

systemctl enable --now automatic-backup.timer

-- to check the status

sudo journalctl -fu automatic-backup
or
sudo systemctl status automatic-backup

========================== Borg action

-- our run.sh script does the backups once a day at 4 am and saves each iteration by this template $(date --iso-8601)-$(hostname)-$$. for example: 2021-11-29-adele.mur.at-14087.

-- we can check the contents of this archive by running the following command:
sudo borg list /home/leverburns/peertube-backup/::2021-11-29-adele.mur.at-14087

-- to see a list of all archives of the repo

sudo borg list /home/leverburns/peertube-backup/

-- to extract 2021-11-29-adele.mur.at-14087 archive in your current dir, run:

sudo borg extract /home/leverburns/peertube-backup/::2021-11-29-adele.mur.at-14087

-- to delete the repo:

sudo borg delete /home/leverburns/peertube-backup/

-- similarly, we can delete a particular archive

sudo borg delete /home/leverburns/peertube-backup/::2021-11-29-adele.mur.at-14087

========================== Cache time



To run it manually
sudo /bin/bash /etc/backups/run.sh

April 13
Fixing the Tiny File Manager
Sergiu and ccl somehow fix it but don't know how...
Some commands that were run

April 6
Uploading files in the file manager does not work
Changing the ownership of the files resolved this.

Does the fold bot still work?
And if yes, how often does it work?
Yes it works, but it would be good to keep an eye on it, to understand if the bot does not have too much impact on the etherpads. 
Currently there are multiple tools relying on the etherpad:
* us using etherpads
* octomode uses 2 etherpads for each environment + makes 2 etherpad requests to render the HTML or PDF view
* the etherpump index makes multiple requests to the etherpad:
* the folding bot makes 1 request for each pad every 60 seconds (see below how to change this rhythm) + if there is a new chat message, it makes 1 more request for this pad

To see this activity, you can run:
And to see which requests fail, because there are too many requests being made at the same time:

To adjust the rhythm of the folding bot:
As user friend:
Then restart the folding bot:
March 25
Changing the time of Rosa to the current timezone

Nice it worked

Etherpump async (agetjson) returns Failed to download
the api request `createDiffHTML` bumps into "failed to download"

Is there an API limit that can be changed?
Trying...

Hmm, no. Stuck.

Installing nload 
to be close to Rosa's capacities, specifically their network bandwith:
To use it:

Struggling with missing trailing slashes in distribusi
With `try_files $uri $uri/index.html $uri =404;`:

The links break because the `try_files` does not rewrite the URL to add a trailing slash, but it just loads the page...
Can `try_files` be combined with `rewrite`?

This looked promising: https://stackoverflow.com/questions/40264617/using-try-files-alongside-rewrite-in-nginx-location-block
But does not work...

Installing distribusi with pip3 and edit the code does not work: installation breaks on pillow dependency.
Installing distribusi from the git and edit the code does not work: installation breaks on pillow dependency.
Opened an issue in the distribusi-go repo: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/16

Maybe rewrite can be used to add "index.html" to the uri?

... hmm no

In the end, adding one trailing slash to distribusi-go did the job. 
Recompiled distribusi-go, and now it works!
Submitted the change on the issue tracker: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/16

Scary attempt: change the distribusi-go code
From: https://git.vvvvvvaria.org/decentral1se/distribusi-go

Install go
"You'll need Go >= 1.11 installed."
https://go.dev/
https://go.dev/doc/install

Install distribusi-go
"Run make to build a new ./distribusi executable."
Where is the code?
Oh, found the template here!
An option B is to hack the trailing slash with javascript......
But first, where can the trailing slash be added to all links in the code?
And here:

Running make to generate a new distribusi executable
Testing if it works
Works!!!

A custom 404 message
While trying out all sorts of try_files `$uri $uri/index.html $uri/` combinations,
i bumped into a way to set a custom 404 page!
       location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a custom 404.
                try_files $uri/index.html $uri/ $uri /unavailable.html;
        }
There is a custom 404 page now here: 
To see it, visit a link does not exist, such as this one: https://hub.vvvvvvaria.org/rosa/rrrrr

March 24
Distribusi does not add a trailing slash to links...
This breaks the URL with the hub setup
See if the trailing slash issue can be resolved in the nginx setup... 
It seems to work by adding: 
to Varia's nginx config of the hub.
Ths breaks pads now...
Adding it to the /chapters/ links only...
In the nginx config:
This does not work...
Hmm...

This is helpful to understand the regex used in the nginx config: https://regex101.com/r/vP4cA4/1

Trying another way to add a trailing slash:


Works for https://hub.vvvvvvaria.org/rosa/chapters/varia but rewrites "varia" in the URL for links to subfolders...

Being confused by etherpump...
Since we added diffhtml to the etherpump index, it raises an error: 
The error disappeared
The error appears again sometimes
Confusing!

Changing the color scheme of the pads
The stylesheet of the etherpads is here:

Making sure that etherpad does not install dependencies at each restart
Many etherpad sessions were running....
Stopping all the processes of the etherpad-lite user.

It made us suspicious if etherpad is not running multiple times...
And well, actually yes!
In this folder:
There is both
and

Merging these two files into one, using the server.js and not the run.js:


After changing a .service file, reload the deamon.

Installing the headless/command line version of paged.js
To add a "save" function to octomode, saving a PDF to the system directly.
https://pagedjs.org/documentation/2-getting-started-with-paged.js/#command-line-version
To install it:
Error:

Following the suggestions:
"After this operation, 506 MB of additional disk space will be used."
"E: Package 'chromium-browser' has no installation candidate"

Trying to install pagedjs again:
Trying to install the latest version of puppeteer, but npm is a totally new environment, so it's a bit like moving around blindly...
Returns:


So nothing changed, stuck here.

March 23
Install etherpad plugin for headers/fonts/colors
https://www.npmjs.com/package/ep_headings2
How to install plugins?
https://github.com/ether/etherpad-lite/wiki/Available-Plugins
First become the etherpad-lite user
Then go to the folder where etherpad is installed:
Then install the plugin with 
...
The plugin seems to break etherpad.

It would be nice to learn how to read logs better...
Log reading resonates somehow quite a lot with the listening workshop we will do on Sunday.
How to practice reading each others logs?

As the user etherpad-lite...
running the initial install script...
to see if the responses will give any more info.
... 
no, same error.

Found a recommondation in the etherpad-lite issue tracker to run
Restarting etherpad again with the run.sh command....
...
Hmm... no.
Let's uninstall the plugin.

Instead, maybe we can use a monospace font on the etherpad?

Install fan controller for pi
Following this tutorial: https://howchoo.com/g/ote2mjkzzta/control-raspberry-pi-fan-temperature-python

git clone https://github.com/Howchoo/pi-fan-controller.git

running
sudo pip3 install -r pi-fan-controller/requirements.txt   <<-- runs into errors so I installed the requirements separately
sudo pip3 install RPi.GPIO
sudo pip3 install gpiozero

cd pi-fan-controller/script
run ./install
cd back
run python3 fancontrol.py  <<-- gives the following error

RuntimeError: Mmap of GPIO registers failed

stuck here

making aliases for commands we use a lot - available for one user only 
to make a new alias, change to user friend
sudo su friend

to add a new alias into the file
sudo nano .bash_aliases

after you save and close, run begin to make your alias available for the user friend

March 22
ccl digs to find some refs on feminist publishing:
https://femme-type.com/radical-feminist-publishing-interview-with-co-conspirator-press/
https://womeninprint.wordpress.com/
https://www.dropbox.com/s/3tw7fjgk8y9tc3j/a_press_of_our_own_barbara_smith.pdf?dl=0
https://arena-attachments.s3.amazonaws.com/1368913/ccf42e4faa915f90010bd7a2880e8b42.pdf?1508993458
http://www.sinisterwisdom.org/archive
https://futuress.org/
https://discovery.ucl.ac.uk/id/eprint/1348866/1/327545.pdf

March 21
Made changes to octomode + etherpump: you can open pads "in octomode" now.
Octomode does not make pads with an extension anymore, it just keeps the filename. 

Also installed https://git.vvvvvvaria.org/decentral1se/distribusi-go at /srv/distribusi + added it to the crontab of user friend, updates every 5 min.
To edit the crontab:
    1. become the friend user: $ sudo su friend
    2. edit the crontab: $ crontab -e
Also added an iframe to the main rosa page: (as friend) $ nano /srv/etherpump/templates/index.html
The iframe points to: https://hub.vvvvvvaria.org/rosa/chapters/
However, distribusi seems not to be able to run recursively?
This means that new folders in the chapter folder are not turned into distribusi pages... hmm.
Opened an issue about this: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/14
Another issue is that distribusi creates links without trailing slash.... which makes links break because of the /rosa/ setup......
Next step: install the regular distribusi (not the go version) to work recursively + see if the trailing slash issue can be resolved in the nginx setup...
Update: distribusi does run recursively actually, it was the URL issue that breaks the links...
Next step: look into the trailing slash situation

March 17 2022

- finish buzzbot (renamed to folding.py)
- make changes to octomode that we discussed yesterday

folds bot .service details

March 16 2022 - installing etherpump
https://git.vvvvvvaria.org/varia/etherpump
Install pip first.
Make a virtual environment.
Try running etherpump
Returns: ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/srv/etherpump/venv/lib/python3.9/site-packages/markupsafe/__ init __.py)
To resolve this, downgrade markupsafe
Try to run etherpump again
works!
Copying the cron.sh file to make a script for etherpump to run every 10 minutes
https://git.vvvvvvaria.org/varia/etherpump/src/branch/main/cron.sh
This cron.sh script is used to generate the etherpump index.
The index is saved to /var/www/html/index.html.

March 15 - installing etherpad plugin linkify
Oh.... spotted in the settings.json that we're running etherpad with dirty.db, which "should only be used for testing and development"!!
Switching to mysql/mariadb...

Install mysql
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
$ sudo apt update
$ sudo apt install wget -y
$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.18-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.18-1_all.deb
$ sudo apt install mysql-server

Adding the gpg of the mysql apt repo:
https://techglimpse.com/update-gpg-key-mysql-repo-debian-ubuntu/
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 467B942D3A79BD29

Installing mysql/mariadb
https://github.com/Tob1asDocker/rpi-mariadb
Make a "friend" user
Make a database for the etherpad
Give permissions to the user friend to write to this db
Close mysql

Hmm.... 
Switching to a sqlite database, as that is what is used by the varia server...
$ sudo apt install sqlite3
$ cd /srv/etherpad-lite/src/
$ sudo npm install sqlite3
In settings.json
  "dbType": "sqlite",
  "dbSettings": {
    "filename": "var/sqlite.db"
  },

Not sure which database is the best to use and why?
Would be interesting to learn about this, conversations around such questions are hard to find online.

------

How to install an etherpad plugin?
https://github.com/ether/etherpad-lite/wiki/Available-Plugins
  1. Enable Admin interface (edit settings.json)
  2. Login in to admin interface (yourpad.com/admin)
  3. Use admin interface http://youretherpad/admin/plugins

Installed: linkify2 
for the [[anotherpad]] internal link function!
(we should test if it works)
--> it breaks the etherpad installation.

March 13 2022 
thinking about storage options
OPTIONS
- https://github.com/coderaiser/cloudcmd file manager + editor + console
- https://github.com/filebrowser/filebrowser file manager + editor + console
- https://github.com/prasathmani/tinyfilemanager file manager (demo https://tinyfilemanager.github.io/demo/)
- https://github.com/redhog/ep_fileupload etherpad plugin for built-in file upload

NOTES
- something torrent based? (because downloading/uploading eats bandwidth of the rpi!!)
- something p2p? (to not make rosa the only central node, and stimulate promicuous file exchange?)
- wild thought: what if file uploads go through a chat environment + logbot? https://relearn2021.vvvvvvaria.org/
- federated file sharing? one folder hosted at rosa, shared/synces/mirrored/??? at a few other servers? (TINC can be used to safely exchange files automatically)
- wow bittorrents + rss feeds!?! https://en.wikipedia.org/wiki/Broadcatching
- an atnofs network of webtorrents! https://webtorrent.io/ https://btorrent.xyz/

trying filebrowser
https://filebrowser.org/installation
Installation worked, but the application did not load.

trying tinyfilemanager
https://github.com/prasathmani/tinyfilemanager
needs php
so first: install php
https://linuxize.com/post/how-to-install-php-on-debian-10/
add this to the nginx config:
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        listen = 127.0.0.1:9000
    }
Also edit the php config file
comment this line out with a ";":
add this line
and reload nginx + restart phttps://hub.vvvvvvaria.org/rosa/octomode/publication_Rosa/pad/hp
then try tinyfilemanager
https://hub.vvvvvvaria.org/rosa/files.php?p=
-- hmm, redirects during use to https://hub.vvvvvvaria.org/files.php?p= .......
-- and does not correctly links to files......

trying cloudcmd
https://github.com/coderaiser/cloudcmd
to run it
Now it runs at port 8000
config file: /home/mb/.cloudcmd.json
http://192.168.178.58:8000/ works
https://hub.vvvvvvaria.org/rosa/files/ works but css links are broken...

Going for tinyfilemanager in the end.


March 10
installing octomode
Step 1
Download the octomode code from the Varia git.
First go to the location where you want to install octomode. This should be outside of the public webserver folders, as we will have to save an API key of the etherpad at some point, and you don't want to share that key in public. Also, switch to the root user for this step.
`$ cd /srv/`
`$ sudo su`
`# git clone https://git.vvvvvvaria.org/varia/octomode.git`

Step 2
We will make an "octomode" user on the server to run octomode with this user. In this way we can restrict the access of this user to the rest of the server. It's a way to make sure that the pads in octomode cannot be used to write code in a specific way, that it can be executed on the server.
Make a system user called "octomode".
`# useradd --system --no-create-home --shell=/sbin/nologin octomode`
Give read and write access + ownership to the `/srv/octomode` folder to the octomode user.
`# chown -R octomode:octomode /srv/octomode`
`# chmod -R u+rw /srv/octomode`

To handle the limited folder access, i'm not sure what to do. 
Maybe a so called `chroot` can be used? 
Asking for advice here: https://git.vvvvvvaria.org/varia/octomode/issues/2#issuecomment-757

Step 3
Install the dependencies that octomode uses.
First make sure that `pip3` and `pandoc` is installed. On debian you can install it by running: 
`$ sudo apt install python3-venv pandoc`
There is a Makefile in the octomode folder, which can be used to install the dependencies. First navigate to the octomode folder and then run `make setup`.
`# cd /srv/octomode`
`# make setup`
Change the ownership of the installed dependencies to octomode.
`# chown -R octomode:octomode .venv`

Step 4
Get the API key of the etherpad you want to use. This can be a local one which is running on the same server, or an etherpad that is running somewhere else.
`# cat /srv/etherpad-lite/APIKEY.txt`
Copy the key and save it in the file `/srv/octomode/config.py` as "PAD_API_KEY".
`# cd /srv/octomode/`
`# nano config.py`
Also change the "PAD_URL" and "PAD_API_URL".
You can also change the "PORTNUMBER", this is the port at which octomode will be running. You can change it to any port number that is not used yet on the server.
Close and save the `config.py` file with `[CTRL+X]`, `[Y]`, `[ENTER]`.

Step 5
Try to run octomode, to see if it works!
`# make run`
If you are currently in the same local network as rosa, you can visit rosa's ip address on port 5001. http://192.168.178.58:5001
Try to visit all the different "modes": `pad`, `stylesheet`, `html` and `pdf`, to make sure that they all work.
You can stop the application with [CTRL+C].

Step 6
Run octomode as a background service.
Octomode is written in Flask, a python library to make web applications. It needs to run all the time in order to be available for people to use.
We will make a system d `.service` file for this.
https://blog.miguelgrinberg.com/post/running-a-flask-application-as-a-service-with-systemd
Make a `.service` file for octomode:
# nano /etc/systemd/system/octomode.service
Paste the following configurations in the file:
Reload the systemd daemon:
# systemctl daemon-reload
And start the octomode service.
# systemctl start octomode
Check if it works by visiting http://192.168.178.58:5001/ again!

Step 7
Connect octomode to an URL.
To access octomode through an URL, like https://rosa.vvvvvvaria.org/octomode/, a mapping is needed to route octomode's port 5001 to the URL that will be used.
In nginx, we can use a proxy_jump for this.
Open the nginx configuration file.
# cd /etc/nginx/sites-enabled
# nano default
Add the following setting to the nginx file.
    location /octomode { 
        proxy_pass         http://127.0.0.1:5001;
    }
    # Serve the /static/ folder nginx (instead of Flask)
    # as this Flask installation runs outside the root URL
    location ^~ /static/  {
        alias /srv/octomode/static/;
    }
Change the permissions of the `/srv/octomode/static/` folder, as this folder will be served by nginx.
# chown -R www-data:www-data /srv/octomode/static/
# chmod -R g+w /srv/octomode/static/
Check if you configuarion is oke.
# nginx -t
If so, then reload nginx.
# service nginx reload
See if it works by visiting http://192.168.178.58/octomode/ or https://rosa.vvvvvvaria.org/octomode/pad/.
(because https://rosa.vvvvvvaria.org/octomode/ gets redirected currently, but that is work in progress).


Thursday 24 FEB (evening)
layers, logging, resonance, disguise

About publishing as layering: 
About questioning the act of layering

In relation to resonance and imagining forms non-romantic togetherness, to speculate on infrastructures that are based on various modes of relation:
homework from p_p

homework from strt
Thinking of layers in what it brings up in my mind - can be positive, like warm layers of clothing or layers of ingredients in a sandwich, and also less positive like layers of dust over forgotten or untouched objects, a layer of mould growing in a jar of jam, layers of bureaucracy that are hard to untangle. Yesterday we talked about alternatives to layers, which are linear - piles? A bundle? A bundle wrapped in layers of fabric.

The layers of communication/insight we give when writing on a pad, represented in a friendly bot sharing a short summary of whatt you can encounter in that pad.

Disguise in the form a surprises?

Wednesday 23 FEB 
(infrastructure day)
Poll for license: https://framadate.org/jScMDwqQnLRIk1PY
Port 80 - webserver (for everything on the web)
Port 22 - ssh into the server
p - to select a port
cd [enter] - get home

To add your own computer's key to Rosa, so you don't need to write your password when you log in.
First you need to generate a ssh key on your own computer:
This generates two keys: a public one and a private one


how to make a config file to connect to rosa:
    ls [means listing files]
    la [means long list]
    ls /
    cat[space+filename] = to display what is in a file
    nano config [opens a txt file]
    then you can write:

Host rosa
  Hostname 45.83.233.82
  User [write your username]
  Port 150822
  IdentityFile ~/.ssh/id_rsa


notes from conversation:
space for each chapter
(notes from last time - Welcome pack: A place to document what is there to see at the different locations, a tour guide, a map? restaurants? local recipes? travel suggestions? speech to text tools?)

consent to:
- publish
- alter (open license is consent to reuse)
- touch
- ...

Adding another language to the server's mode of address around permissions.
CC4R
Amy: We did a workshop with Elodie around the CC4R license at APASS. We were reading Glissant: nothing is yours. you are an accumilation to a bunch of other things. we had to write about an artwork that we liked. and we had to write a license to say how we would like this work to be reused. the license is trying to do this i think, to be aware of minorities and the sources that you take from, but also to not be so protective about what you make.
Constant refigured the Free Art License and made it more complicated.

Installing tmux to work in a shared terminal session
https://tmuxcheatsheet.com/

First we all switch to the friend user
One of us makes a new session
Attach to new session
Installing etherpad
How? Is there documentation close to us that we can use?
remember: rosa uses debian bullseye
https://etherpad.org/doc/v1.8.16/
https://github.com/ether/etherpad-lite#installation
curl = downloading something from the internet
Rosa doesn't have curl and git, so we will install it first:
Then we follow the quick install:

Now we need to connect the port where Etherpad is 9001.
https://gist.github.com/aaronpk/7307172

On XPUB1's Soupboat, an etherpad is installed in the same way as we need it: 
https://hub.xpub.nl/soupboat/pad/

proxy_pass http://localhost:9001/ ;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $http_host;
            proxy_http_version 1.1;
            proxy_redirect off;
            proxy_buffering off;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_read_timeout 86400;
        }

We can add this to the nginx config file
We add the config above.
Then we save it with CTRL+X and Y and [enter].
Then we test if the configs were oke syntaxwise.
And then we reload the nginx service.
Oke....
Then we run the etherpad run.sh script again:
    cd ~/etherpad-lite/
    src/bin/run.sh
And we go to http://45.83.233.82/pad/

I reinstalled etherpad-lite 
fixing the error Error: The module at "ep_etherpad-lite/static/js/rjquery" does not exist.

src/bin/run.sh was failing to install the node modules

running separately 
npm install ep_etherpad-lite

getting the error that python is not found, so installing python and running again

tried changing the nginx configuration from here

https://stackoverflow.com/questions/70651975/nginx-with-etherpad-in-a-subdirectory

no luck... perhaps trying to downgrade to an older version of etherpad next

---
04.03 tried to install again using below instructions, no luck so far

http://eth.leverburns.blue/p/--alice--

getting this error

npm WARN old lockfile     at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:743:9) {
npm WARN old lockfile   code: 'EACCES',
npm WARN old lockfile   errno: 'EACCES',
npm WARN old lockfile   syscall: 'mkdir',
npm WARN old lockfile   path: '/srv/etherpad',
npm WARN old lockfile   type: 'system'
npm WARN old lockfile }
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /srv/etherpad
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/srv/etherpad'
npm ERR!  [Error: EACCES: permission denied, mkdir '/srv/etherpad'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/srv/etherpad'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Can we change the background image of the pads?
YES!!! 
https://vvvvvvaria.org:5281/upload/LIwFmOt8z6SrSxXX/rpi.jpeg


Run etherpad all the time in the background as a "service":
"debian bullseye how to run etherpad-lite as service"
https://github.com/ether/etherpad-lite/wiki/How-to-deploy-Etherpad-Lite-as-a-service#debian-8-jessie--systemd

1. Create a user called etherpad-lite adduser --system --home=/srv/etherpad-lite --group etherpad-lite
2. Ensure the etherpad-lite user has full access to the etherpad-lite source
3. Create a new file etherpad-lite.service in /etc/systemd/system/
4. Run systemctl enable etherpad-lite to enable the service on boot.
5. Run systemctl start etherpad-lite to start the service. 


If you change the etherpad.service file, you need to reload the systemd deamon to make the changes.
tried to get the latest version on git 

Next time - make aliases
https://linuxize.com/post/how-to-create-bash-aliases/


Notes for Session 17 FEB
Feminist publishing infrastructure imaginations
mb leaving a trail of thought around a possible feminist publishing infrastructure (FPI, to make it easier to repeat this long name):
+ in terms of content, the following snippets are helpful to imagine what will be there:

from p_p
maybe too old, binary and obvious a reference, https://hub.vvvvvvaria.org/rosa/octomode/publication_Rosa/pad/ut I have been reading Sadie Plant, The Future Looms, and there are some terms and passages that I find helpful for thinking about what feminist technologies might be / what is feminist them.

- an interface is something that we want for display, but it also hides
- we make technologies to be our messenger, for a possibility of communication.
- In FPI how do you show gratitude to the messenger?

"Indeed, if woman is[they are] anything, she is[they are] the very possibility of mimesis, the one who weaves her[their] own disguises. The veil is her[their] oppression, but "she[they] may still draw from from it what she[they] needs to mark the folds, seams, and dress making of her[their] garments and dissimulations." (Irigaray 1991, p116) ... she is[they are] more than which she[they] imitate. Woman[Oppressed people], like the computer, appears at different times as whatever man requires of her[them]. She[they] learns how to imitate; she[they] learns simulation. And, like the computer, she[they] become very good at it, so good, in fact, that she[they] too, can mimic any function. As Irigaray suggests: "Truth and appearances, and reality, power... she is[they are] - through her[their] inexhaustible aptitude for mimicry - the living foundation for the whole staging of the world."
- what is rosa wearing?
- does rosa have a costume?
- is rosa singular?

"Software, in other words, has its screens as well: it too has a user-friendly face it turns to [the client]man, and for it, as for [the worker]woman, this is only its camouflage."

- camouflage, FPI that allows you to share in disguise
- FPI that has options to conceal, to de-publish
> different layers of visibility and privacy, and that the users can change this for themselves
> making space for speculative/fiction, "disguise in untruth"

"There is for Irigaray another side to the screens which "already moves beyond and stops short of appearance, and has no veil. It wafts out, like a harmony that sub-tends, envelopes and subtly 'fills' everything seen, before the caesura of its forms and in time to a movement other than scansion of syncopations. Continuity from which the veil itself will borrow the matter-foundation of its fabric."(Irigary, 1991, p116) This fabric, and its fabrication is the virtual materiality of the feminine; home to no-one and no thing, the passage into the virtual is nevertheless not a return to the void. This affirmation is "without subject or object", but "does not, for all that, go to the abyss." The blind immateriality of the black hole was simply projected by man, who had to believe that there was nothingness and lack behind the veil."

- think about how to undo binary ideas such as 0 1
- find it helpful to think about performative aspect of screens, they frame an activity to which you give attention. what questions of framing enter FPI?


I imagine a feminist infrastructure:
- as the corner shop in your neighborhood - you kinda depend on them - to get fresh eggs, milk and tomatos - you also know when they are open or close - so you go there when it’s good for both - and you know that one day - they might get sick or something - and because you go there every other day - and make conversation while picking lemons from the basket - you and them are sort of friends - maybe not bffs - but friendly enough - to care - and help out - whenever necessary - however you can - maybe ask what’s up - offer some soup or to look out for the kids for a while - or call some other neighbor - cuz you know maybe you are not skilled to solve everything - and that’s fine - there are others like you  - and different than you - and together you can make it work again - maybe not fully - not same - but open again and shared - with oranges for all of you around it - and that might meant you get less flour one day - and a lots of coffee beans some others - it might depend on the weather - or on the providers - that are also other neighbors  - like you with the ropes and shoe laces - and sometimes other things come from a far - and that’s also nice - cuz you can try berries you didn’t know - and make uses you didn’t think of before - sometimes things are send away too - or someone travels - or both - and as things and knowledges are helpful elsewhere - when back - they might bring new ones - maybe partnerships are build this way - in these comes and go’s - so the neighborhood feels a bit bigger - expanded - kinda flexible - diverse - supported - and connected - in a way - as you rely on the shop  - y’all  rely on each other - knowing that nothing is permanent - or perfect - or stable - but it’s there while it’s there - and that’s good knowing

We're making a way to collect materials & make them visible to each other
Are we making categories? Maybe something softer.
logging as a way to collect materials before you forget them
https://vvvvvvaria.org/logs/atnofs-varia/
logs work in chronological order
"this happened this happened this happened this happened this happened"
logs are difficult to read, logs are unedited objects
what if we see the log as something that operates in parallel with another text
you never read a log from top to bottom, you search for something specific and filter it
alt text workshops - https://alt-text-as-poetry.net/
how could logging work for everyone, practically speaking? for relearn we used the browser

can we cross protocols? to not force people to use our tools? 
RSS can be our shared protocol: Mastodon and logbot both "speak" RSS

marks as tools to layer the logs: certain marks will allow a post to go to the publication
layering the logs: what kind of layers can we add to the logs?
how can we connect the logs with the texts?

10 FEB

Publishing infrastructure
documentation of different traces of the project
Amy: something instruction based for others to be able to pick up, 

evening meeting
Julia shares Sara Ahmed

In response to this quote, Cristina mentions a Katherine McKittrick's position to work with what we have in order to reach liberation (this is super paraphrased, would be nice to have a quote here?)

Cristina shares this web page in which the word "resonance" is mentioned in relation to publishing, by Stevphen Shukaitis: https://transversal.at/transversal/0614/shukaitis/en

Manetta leaves some snippets here for 10 February, this one felt useful for us in regards to positioning towards receiving funding. I found this in the Glossary of Undisciplined Design book that i borrowed from Cristina: 


amy's thoughts on feminist publishing


amy's thoughts about intersectional feminism?

amy's links for permacomputing
Manetta's thoughts about feminist publishing: 
+ Something that is on my mind these days is to think about the overlap and difference between: 
    "networked publishing" {?} 
    (blurring a technical understanding of networks with a social one), 
    "promiscuous publishing" { Constant—Femke Snelting https://constantvzw.org/wefts/webpublications.en.html
    (where inputs and outputs are processed by multiplicity of tools and processes),
    and "resonant publishing" { ? } 
    (where editorial roles are blurred + publishing happens while-we-go)...

And thoughts about feminist infrastructure, from Underneath and on the sidelines: Sustaining feminist infrastructures using speculative fiction by Spideralex: 
And about (intersectional, even though this word is not used) feminism by Susan Leigh Star in Misplaced Concretism and Concrete Situations: Feminism, Method, and Information Technology (1994): (this author also cited in first book I brought in)

[we are reading very fast from here on]

... she continues to further unpack feminism as a method, which is a snippet that i encountered through the Vernaculars come to matter book where Michael Murtaugh referred to it in his text on vernacular software. So again the following words are from Susan Leigh Star:

cristina's links to discuss in the meeting
[server time now!!]
STEP 1
$ sudo nano /etc/ssh/sshd_config
$ sudo service --status-all
$ sudo service ssh start

Now from the laptop:
$ ssh mb@rosa
> returns: "ssh: connect to host rosa port 22: Connection refused"

but!

$ ssh mb@rosa.local -p 1508
> works

STEP 2
Opening the ports on the router

Log into the router. On the browser: http://192.168.178.1/
We opened port 1508 on the router and mapped it to rosa's port 1508.

NOW
We prepare the "friend" account for Roel
so he can login to rosa for the 

STEP 3
$ cd /etc/nginx/sites-available
make copy of an existing config file:
$ sudo cp radio.poel.casa.conf rosa.poel.casa.conf
make a symlink between this file above and its omolog in sites-enabled:
$ sudo ln -s ../sites-available/rosa.poel.casa.conf .
edit the file:
$ sudo nano rosa.poel.casa.conf

$ sudo nginx -t
$ sudo service nginx reload

https://rosa.poel.casa/ works!
But we don't have a web server running on Rosa yet ;).

STEP 4
We need to install nginx on the rosa server!
$ sudo apt install nginx

$ sudo systemctl status nginx 
it runs!

We will make a small web page for Rosa now.
$ cd /var/www/html
$ sudo nano index.html

And now we change permission of the /var/www/html folder, so we all can write in this folder

$ sudo chmod -R g+w /var/www/html
$ sudo chown -R www-data:www-data /var/www/html

And we add ourselves to the www-data group, so we can all edit the page.

$ sudo addgroup USERNAME www-data

Rosa has a web page!!
https://rosa.poel.casa/

STEP 5
Close the laptop!

STEP 6 (next day)
Port 1508 does not work anymore:
$ ssh user@rosa -p 1508
returns: "ssh: connect to host rosa port 1508: Connection refused"

It seems that the ssh service is not started after a reboot.
Apparantly, debian runs two ssh services: one for handling general ssh sessions, and another one for custom configurations of the ssh connections. This is made like this, so you can restart the ssh service without loosing your ssh session. Also, when you have errors in your ssh config file, this means that you still can ssh into your machine... (if there would have been one one ssh service you would have lost all access to the machine).

To enable this, run:
$ sudo systemctl enable ssh

...

Hmm, when trying to use the port 1508 now, it returns: "ssh_exchange_identification: read: Connection reset by peer"
And with the default port 22 is returns: "ssh: connect to host rosa port 22: Connection refused"

...

An online source advices to reboot Rosa.
https://phoenixnap.com/kb/fix-connection-reset-by-peer-ssh-error

but...
$ ssh user@rosa -p 1508
ssh: connect to host rosa port 1508: Connection refused
$ ssh user@rosa
works again, so it seems that the "enable" command did not work.

Another attempt: maybe it helps to first start the service... and then enable it?
$ sudo service ssh start
$ sudo systemctl enable ssh
$ sudo reboot

No.

So.... how can we start the ssh service when we reboot Rosa?

...

Maybe these logs can help us out...
$ tail -f /var/log/auth.log | grep ssh
When keeping that open in a second terminal... and log out from the first terminal, and trying to log in again using port 1508... 
The terminal returns: "ssh_exchange_identification: read: Connection reset by peer"
The log returns: "fatal: Missing privilege separation directory: /run/sshd"
Following this: http://realtechtalk.com/Linux_Ubuntu_Debian_Missing_privilege_separation_directory_varrunsshd-2236-articles
$ mkdir -p /run/sshd
Would make this directory
$ ssh user@rosa -p 1508
Oh it works now!

STEP 6 -- AGAIN

On March 10 we bumped into the same error. Suddenly we could not login with ssh anymore, as the ssh.service had stopped running. After starting it, we ended up in the same loop as above... Once someone opened a second ssh connection to rosa, the ssh configs somehow got reverted. All ssh connections are blocked, both on port 22 and 1508... So i did a manual reboot by unplugging and replugging rosa.

I searched again online to see if there are more clues out there why this happens, and found this, describing exactly our situation: https://unix.stackexchange.com/questions/675370/why-ssh-service-doesn-t-start-automatically-during-boot-despite-being-enabled-by

Following this reply to the first answer, might work for us too: 
But hmm... what does it mean to "disable this unit"...

Let's go back to the default port 22.....

$ sudo nano /etc/ssh/sshd_config
Comment out the line: Port 1508
Save the file.
Reboot the server.

STEP 7
Disable root login

$ sudo vim /etc/ssh/sshd_config
PermitRootLogin no

$ sudo systemctl restart ssh

STEP 8 
resolve the locales error
https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/2

$ sudo apt policy locales
$ sudo apt install locales

"Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, date and time, etc. Make sure you set locales generating UTF-8 locales. Other character sets can be set for backwards compatibility with older systems and software."
https://www.cyberciti.biz/faq/perl-warning-setting-locale-failed-in-debian-ubuntu/

$ locale
To set the locale to US English and UTF-8
$ sudo locale-gen en_US.UTF-8

This seem to have resolved it.

Session 3 February
think about our questions: