This document details the procedure for setting up Epoptes in a computer lab using mDNS name resolution (Avahi). This method allows interconnection between devices in networks with dynamic IP addressing (DHCP), eliminating the need to configure static IPs.

Operating Scheme
- Server (In this example, we’ll assume it has this name: tux0): Acts as the central controller and is advertised on the network through Avahi.
- Name Resolution: Devices are located using the .local suffix (tux0.local).
- Clients: Connect to the server’s name, validate the security certificate, and start the service automatically on each startup.
Host Name Management
Since the IP is dynamic and can change, the host name is the only reliable identifier on the network. For the system to work, the server must have a unique and recognizable name.
Procedure to Change the Host Name
If your server or clients do not have the correct name, you need to modify it in the following files:
- /etc/hostname file: This file contains only the host name.
sudo nano /etc/hostname(Delete the current name and typetux0) - /etc/hosts file: You must update the line associated with the loopback to match the new name.
sudo nano /etc/hostsModify the line:127.0.1.1 old_nameto127.0.1.1 tux0 - Apply without rebooting:
sudo hostnamectl set-hostname tux0
STEP 1: Server Configuration
The server is the station from which classroom control is exercised.
- Identify the network interface: To check the network status, use the command:
ip a - Installation and configuration script: Create the
server_setup.shfile and run it with superuser privileges:
#!/bin/bash
if [ "$EUID" -ne 0 ]; then echo "Error: run with sudo"; exit 1; fi
# Package installation
apt update && apt install -y epoptes avahi-daemon
# Ensure host name
hostnamectl set-hostname tux0
# User permission management
# Add the user who launched the script to the epoptes group
REAL_USER=${SUDO_USER:-$USER}
gpasswd -a "$REAL_USER" epoptes
echo "Server configuration completed. Reboot the device."
STEP 2: Client Configuration
This must be executed on each student’s station.
- System path correction: If the system does not locate binaries in /sbin, add them to the user’s PATH:
echo 'export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin' >> ~/.bashrc && source ~/.bashrc - Client setup script: Create the
client_setup.shfile with the following content:
#!/bin/bash
if [ "$EUID" -ne 0 ]; then echo "Error: run with sudo"; exit 1; fi
# The client will search for the server by its mDNS name
SERVER_NAME="tux0.local"
# Dependency installation
apt update && apt install -y epoptes-client avahi-daemon
# Client file configuration
# Set the SERVER variable to point to the server's hostname
if [ -f /etc/default/epoptes-client ]; then
sed -i "s/^#SERVER=.*/SERVER=$SERVER_NAME/" /etc/default/epoptes-client
sed -i "s/^SERVER=.*/SERVER=$SERVER_NAME/" /etc/default/epoptes-client
else
echo "SERVER=$SERVER_NAME" > /etc/default/epoptes-client
fi
# Security certificate download (Requires the server to be active)
echo "Obtaining certificate from $SERVER_NAME..."
epoptes-client -c
# Service persistence
systemctl enable epoptes-client
systemctl restart epoptes-client
echo "Client configuration completed."
STEP 3: Connection Verification
- On the Server: Start the graphical interface by running
epoptesor searching for the application in the Education menu. - On the Client: Check that the service is running with the command
systemctl status epoptes-client. - Troubleshooting: If the client does not appear, verify mDNS connectivity by pinging:
ping tux0.localIf it responds but does not connect, repeat the certificate download:sudo epoptes-client -c.
