Smart Cities - Low Carbon Computing Future: Difference between revisions
| (13 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
=ICT Infrastructure required for Off-Line Computing= | |||
If the internet and mobile phone communication were to go down for several years, ICT software and hardware could play a critical role in supporting community resilience by enabling local communication, resource management, education, and essential services. These tools would need to be designed for offline operation, energy efficiency, and decentralized use to meet the needs of isolated communities. | |||
Good Applications for ICT in a Long-Term Offline Scenario | |||
==1. Local Communication Systems== | |||
Mesh Networks: | |||
* Use devices like Raspberry Pi, ESP32, or smartphones to create a local wireless communication network. | |||
* Software: Mesh networking protocols like BATMAN, CJDNS, or LibreMesh. | |||
* Use Cases: Text messaging, file sharing, and emergency alerts within the community. | |||
Digital Radio Communication: | |||
* Leverage amateur radio or long-range radio protocols (e.g., LoRa) for low-bandwidth communication. | |||
* Software: FLDigi for text-based communication over radio waves. | |||
* Use Cases: Long-distance messaging, disaster coordination, and information exchange. | |||
==2. Resource Management and Distribution== | |||
Local Databases: | |||
* Use Raspberry Pi or similar devices to host offline databases for inventory, water usage, food distribution, and medical supplies. | |||
* Software: SQLite, Airtable (offline mode), or custom Python-based tools. | |||
* Use Cases: Track and manage resources, prevent shortages, and ensure equitable distribution. | |||
Energy Monitoring: | |||
* Deploy IoT devices to monitor and optimize renewable energy systems like solar panels or microgrids. | |||
* Software: Open-source platforms like Node-RED or Home Assistant. | |||
* Use Cases: Monitor battery levels, manage load balancing, and maximize efficiency of limited power supplies. | |||
==3. Education and Knowledge Sharing== | |||
Offline Content Servers: | |||
* Set up offline servers with educational content and community resources. | |||
* Software: Kolibri (educational content platform), Kiwix (offline Wikipedia), or MediaWiki for custom knowledge repositories. | |||
* Use Cases: Teach skills, provide technical manuals, and share local knowledge. | |||
Skill Training Simulations: | |||
* Use laptops or Raspberry Pi systems with offline tools for vocational training (e.g., farming, repair skills). | |||
* Software: Offline coding environments like Scratch or Geogebra for mathematics. | |||
==4. Health and Medical Support== | |||
Local Health Records: | |||
* Deploy local, encrypted health databases for tracking patient records and community health trends. | |||
* Software: OpenMRS (offline mode) or custom offline databases. | |||
* Use Cases: Manage vaccinations, track disease outbreaks, and prioritize medical resources. | |||
Diagnostic Tools: | |||
* Use portable medical devices with offline diagnostic software. | |||
* Hardware: Raspberry Pi or Arduino for simple health monitoring tools (e.g., heart rate monitors). | |||
* Use Cases: Provide basic diagnostics and monitor chronic conditions. | |||
==5. Local Governance and Decision-Making== | |||
Community Voting and Planning Systems: | |||
* Use Raspberry Pi to host local web apps for community decision-making and governance. | |||
* Software: Offline-capable platforms like Polls (Nextcloud app) or Etherpad for collaborative planning. | |||
* Use Cases: Organize meetings, vote on resource allocation, and track action plans. | |||
Mapping and GIS Tools: | |||
* Deploy offline geographic information systems (GIS) for land management and disaster response. | |||
* Software: QGIS (offline mode), OpenStreetMap (local instance). | |||
* Use Cases: Plan evacuation routes, allocate agricultural land, and monitor environmental changes. | |||
==6. Entertainment and Community Engagement== | |||
Offline Media Centers: | |||
* Host local servers with movies, music, and books for community entertainment. | |||
* Software: Plex, Jellyfin, or VLC for streaming and playback. | |||
* Use Cases: Provide recreation and maintain morale during extended isolation. | |||
Gaming Platforms: | |||
* Set up local multiplayer games or board game simulations for communal activities. | |||
* Software: LAN-based games or retro gaming emulators. | |||
==7. Disaster Preparedness and Recovery== | |||
Early Warning Systems: | |||
* Use sensors and IoT devices for monitoring weather, floods, or fires. | |||
* Hardware: LoRa-based sensors or Arduino weather stations. | |||
* Software: Custom Python scripts or tools like Grafana for visualizing sensor data. | |||
* Use Cases: Alert the community to imminent dangers and track environmental risks. | |||
Repair and Maintenance Manuals: | |||
* Host digital libraries of repair guides and engineering schematics. | |||
* Software: PDF repositories or offline Wikis with searchable content. | |||
* Use Cases: Enable DIY repairs for critical infrastructure like water pumps, vehicles, and electronics. | |||
==Recommended Hardware for Offline Resilience== | |||
* Raspberry Pi: Versatile for servers, communication hubs, or educational tools. | |||
* ESP32 or Arduino: Low-power IoT devices for sensors and local automation. | |||
* LoRa Modules: For long-range, low-bandwidth communication. | |||
* Solar-Powered Chargers: To ensure devices can operate without grid electricity. | |||
* External Storage: SSDs or hard drives for storing data, media, and software repositories. | |||
* Portable Laptops: Energy-efficient laptops for running software and performing tasks locally. | |||
==Core Principles for ICT Resilience== | |||
* Energy Efficiency: Design systems to operate on minimal power, prioritizing renewable energy. | |||
* Decentralization: Avoid single points of failure by distributing hardware and software systems. | |||
* Modularity and Repairability: Choose hardware and software that are easy to repair and upgrade locally. | |||
* Simplicity and Usability: Ensure tools are easy to use and require minimal technical expertise. | |||
* Scalability: Design systems to grow with the community’s needs, from a few users to a larger network. | |||
==Conclusion== | |||
ICT software and hardware can play a transformative role in supporting community resilience during prolonged internet and communication outages. By leveraging local networks, offline computing, and low-power devices, communities can sustain essential functions like communication, education, health, and resource management. Teaching these principles and deploying scalable systems will strengthen local resilience and self-reliance. | |||
=Student Project: Building a Low-Carbon, Low-Energy ICT Infrastructure for an Offline Future= | =Student Project: Building a Low-Carbon, Low-Energy ICT Infrastructure for an Offline Future= | ||
This project challenges students to design and implement an ICT infrastructure that functions efficiently without internet access, using Linux, old laptops, and Raspberry Pi devices. The project emphasizes sustainability, resourcefulness, and essential services for a community. | This project challenges students to design and implement an ICT infrastructure that functions efficiently without internet access, using Linux, old laptops, and Raspberry Pi devices. The project emphasizes sustainability, resourcefulness, and essential services for a community. | ||
| Line 130: | Line 232: | ||
This project not only teaches technical skills but also fosters creativity, problem-solving, and an understanding of sustainable practices in ICT. It prepares students to think critically about how technology can serve communities under resource-constrained conditions. | This project not only teaches technical skills but also fosters creativity, problem-solving, and an understanding of sustainable practices in ICT. It prepares students to think critically about how technology can serve communities under resource-constrained conditions. | ||
=Lightweight Linux Distributions and Software= | |||
Using an old laptop with Linux is a great way to reduce electronic waste and optimize performance for basic tasks. Here’s a guide to lightweight Linux software that can handle email, word processing, reading PDFs, and watching DVDs effectively: | |||
==1. Linux Distribution== | |||
Choose a lightweight Linux distribution designed for older hardware: | |||
* Lubuntu: Based on Ubuntu, uses the LXQt desktop, light on resources. | |||
* Linux Mint XFCE Edition: User-friendly and lightweight. | |||
* Puppy Linux: Ultra-lightweight for very old hardware. | |||
* MX Linux XFCE: Lightweight with good out-of-the-box functionality. | |||
==2. Software Recommendations== | |||
Email | |||
* Thunderbird: A full-featured email client, supports offline email management and calendars. | |||
* Geary: Lightweight email client with a clean interface. | |||
* Mailspring: Modern and efficient, though slightly heavier than others. | |||
Word Processing | |||
* LibreOffice: Comprehensive office suite for word processing, spreadsheets, and presentations. | |||
* Install only LibreOffice Writer if disk space is limited. | |||
* AbiWord: Lightweight word processor for basic needs. | |||
Reading PDFs | |||
* Evince: Simple and lightweight PDF viewer. | |||
* Okular: Feature-rich PDF viewer, also handles eBooks and other formats. | |||
* MuPDF: Extremely lightweight, great for very old systems. | |||
Watching DVDs | |||
* VLC Media Player: Plays DVDs, videos, and other multimedia formats without additional codecs. | |||
* MPV Media Player: Lightweight, powerful, and works well with older hardware. | |||
==3. Additional Tools== | |||
* Firefox or Brave (tune settings to reduce resource use). | |||
* Midori or Falkon for lighter browsing. | |||
* File Management: Use the default file manager in your Linux distribution (e.g., Thunar for XFCE). | |||
* Install tools like Stacer to monitor system performance. | |||
* Use BleachBit for cleaning unnecessary files. | |||
==Enabling DVD Playback== | |||
To play DVDs: | |||
* Install VLC or MPV. | |||
* Add libdvdcss for decoding encrypted DVDs: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update | |||
sudo apt install libdvd-pkg | |||
sudo dpkg-reconfigure libdvd-pkg | |||
</syntaxhighlight> | |||
=Burn Disk ISO Image to USB Memory Stick= | |||
Burning an ISO disk image onto a USB memory stick using a Raspberry Pi is straightforward and can be done using command-line tools or graphical applications. Here’s a step-by-step guide: | |||
==Using the Command Line== | |||
==1. Insert the USB Memory Stick== | |||
* Connect your USB memory stick to the Raspberry Pi. | |||
* Identify the device name of the USB stick using: | |||
<syntaxhighlight lang="bash"> | |||
lsblk | |||
</syntaxhighlight> | |||
Example output: | |||
<syntaxhighlight lang="bash"> | |||
sda 8:0 1 16G 0 disk | |||
└─sda1 8:1 1 16G 0 part /media/pi/USB | |||
</syntaxhighlight> | |||
Here, /dev/sda is the USB device (do not use /dev/sda1). | |||
==2. Unmount the USB Stick== | |||
* Unmount the USB drive if it is automatically mounted: | |||
<syntaxhighlight lang="bash"> | |||
sudo umount /dev/sda1 | |||
</syntaxhighlight> | |||
==3. Write the ISO to the USB Stick== | |||
* Use the dd command to burn the ISO image to the USB stick: | |||
<syntaxhighlight lang="bash"> | |||
sudo dd if=/path/to/image.iso of=/dev/sda bs=4M status=progress | |||
</syntaxhighlight> | |||
* Replace /path/to/image.iso with the full path to your ISO file. | |||
* Replace /dev/sda with the correct device name of your USB stick. | |||
* Important: Be very careful with the of argument, as using the wrong device name can overwrite your Raspberry Pi’s storage. | |||
==4. Sync and Eject== | |||
* Sync the data to ensure all writes are completed: | |||
<syntaxhighlight lang="bash"> | |||
sudo sync | |||
</syntaxhighlight> | |||
* Safely eject the USB stick: | |||
<syntaxhighlight lang="bash"> | |||
sudo eject /dev/sda | |||
</syntaxhighlight> | |||
==Using a Graphical Tool== | |||
If you have a graphical desktop environment on your Raspberry Pi, you can use tools like Balena Etcher. | |||
==1. Install Balena Etcher== | |||
* Download and install Balena Etcher: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update | |||
sudo apt install balena-etcher-electron | |||
</syntaxhighlight> | |||
==2. Burn the ISO== | |||
* Open Balena Etcher. | |||
* Select the ISO file. | |||
* Choose the USB stick as the target. | |||
* Click “Flash” to write the ISO to the USB stick. | |||
Verify the Process To confirm that the ISO was successfully burned: | |||
* Reinsert the USB stick. | |||
* Check the partitions created on it using: | |||
<syntaxhighlight lang="bash"> | |||
lsblk | |||
</syntaxhighlight> | |||
==3. Test the USB stick by booting another computer or device from it.== | |||
This process ensures the ISO is properly burned and ready for use. | |||
=Using Knoppix to Erase a Hard Drive on a Laptop= | |||
Using Knoppix or another Linux-based tool to securely erase a hard drive is an effective way to ensure that data cannot be recovered. Here’s a detailed guide: | |||
Steps to Securely Erase a Hard Drive Using Knoppix | |||
==1. Prepare Knoppix== | |||
* Download Knoppix: Download the Knoppix ISO file from the official website. | |||
* Create a Bootable USB/DVD: | |||
* Use tools like Rufus (Windows) or Etcher (Linux/Mac) to create a bootable USB stick or burn the ISO to a DVD. | |||
==2. Boot into Knoppix== | |||
* Insert the bootable USB/DVD into the laptop. | |||
* Restart the laptop and boot from the USB/DVD (change the boot order in the BIOS/UEFI if needed). | |||
* Select the default Knoppix Live mode to load the operating system. | |||
==3. Identify the Hard Drive== | |||
* Open a terminal in Knoppix. | |||
* List all storage devices using the command: | |||
<syntaxhighlight lang="bash"> | |||
sudo fdisk -l | |||
</syntaxhighlight> | |||
* Note the identifier of the drive you want to erase (e.g., /dev/sda, /dev/sdb). | |||
==4. Securely Erase the Hard Drive== | |||
* Use one of the following tools/methods: | |||
===Method 1: Using dd Command=== | |||
* Overwrite the entire drive with zeros: | |||
<syntaxhighlight lang="bash"> | |||
sudo dd if=/dev/zero of=/dev/sdX bs=1M | |||
</syntaxhighlight> | |||
Replace sdX with the appropriate drive identifier (e.g., /dev/sda). | |||
* To overwrite with random data (stronger security): | |||
<syntaxhighlight lang="bash"> | |||
sudo dd if=/dev/urandom of=/dev/sdX bs=1M | |||
</syntaxhighlight> | |||
* This process can take a while depending on the drive size. | |||
===Method 2: Using shred=== | |||
* shred overwrites the disk multiple times with random data: | |||
<syntaxhighlight lang="bash"> | |||
sudo shred -v -n 3 /dev/sdX | |||
</syntaxhighlight> | |||
* -v: Show progress. | |||
* -n 3: Overwrite the disk 3 times (you can increase the number for greater security). | |||
* sdX: Replace with your drive identifier. | |||
===Method 3: Using hdparm for Secure Erase=== | |||
* If your hard drive supports Secure Erase (common in modern drives): | |||
1. Unlock the drive: | |||
<syntaxhighlight lang="bash"> | |||
sudo hdparm --user-master u --security-set-pass password /dev/sdX | |||
</syntaxhighlight> | |||
2. Start the Secure Erase process: | |||
<syntaxhighlight lang="bash"> | |||
sudo hdparm --user-master u --security-erase password /dev/sdX | |||
</syntaxhighlight> | |||
Replace password with a temporary password (e.g., “1234”) and sdX with your drive identifier. | |||
After Erasing the Drive verify the drive is empty by running: | |||
<syntaxhighlight lang="bash"> | |||
sudo hexdump -C /dev/sdX | head | |||
</syntaxhighlight> | |||
3. Shutdown Knoppix: | |||
* Safely power down the system: | |||
<syntaxhighlight lang="bash"> | |||
sudo shutdown -h now | |||
</syntaxhighlight> | |||
=Low Carbon Computing= | |||
Using computers mostly offline in a low-carbon future involves optimizing technology for energy efficiency, reducing dependence on the internet, and using local resources effectively. Here’s how: | |||
==1. Optimize Hardware for Efficiency== | |||
* Energy-efficient devices: Use low-power computers such as Raspberry Pi, solar-powered laptops, or energy-efficient desktop setups. | |||
* Upgrade instead of replace: Extend the life of devices through upgrades rather than buying new ones. | |||
* Power management: Configure power-saving settings like sleep mode and low-power usage modes. | |||
==2. Minimize Internet Use== | |||
* Download resources: Download software, educational materials, and data for offline use, reducing the need for constant internet connectivity. | |||
* Local networks: Set up intranets or local networks for sharing files and collaboration without external internet access. | |||
* Periodic synchronization: Synchronize only essential updates or data during planned internet access times. | |||
==3. Local Computing and Data Storage== | |||
* Local processing: Run applications directly on devices rather than relying on cloud computing. | |||
* Offline software: Use software that doesn’t require constant internet access, such as LibreOffice for productivity or locally installed databases. | |||
* External storage: Use external drives or local servers for data storage and backups. | |||
==4. Use Renewable Energy Sources== | |||
* Solar-powered setups: Power computers with solar panels or other renewable energy sources. | |||
* Shared resources: Establish community-powered computing hubs to centralize energy usage and reduce individual consumption. | |||
==5. Leverage Low-Carbon Digital Tools== | |||
* Efficient programming: Use lightweight software and avoid bloatware to reduce energy consumption. | |||
* Efficient file formats: Work with text-based or low-size formats (e.g., CSV instead of heavy spreadsheets, vector graphics instead of raster images). | |||
* Offline alternatives: Use pre-installed libraries for coding, learning, or simulations without needing cloud-based tools. | |||
==6. Encourage Shared Use== | |||
* Shared computing: Use shared computers or libraries where multiple users can access resources efficiently. | |||
* Local collaboration: Foster teamwork using shared devices, reducing the need for every individual to own a separate device. | |||
==7. Educate Users== | |||
* Train people to work efficiently offline by teaching them: | |||
* How to manage files and organise resources. | |||
* Alternatives to cloud-based tools, like offline maps or local development environments. | |||
==Example Setup for a Low-Carbon Future:== | |||
* Hardware: Raspberry Pi with a solar panel, a small monitor, and efficient peripherals. | |||
* Software: Open-source operating systems (e.g., Linux) with offline productivity and programming tools. | |||
* Power Source: Solar charger or a communal renewable energy source. | |||
* Connectivity: Occasional internet use via a community access point for updates or large file transfers. | |||
By combining these practices, computers can continue to support productivity and learning while maintaining a minimal carbon footprint. | |||
=Installing and Removing Software using Terminal= | =Installing and Removing Software using Terminal= | ||
| Line 183: | Line 556: | ||
* Customizability: Advanced options like installing specific versions or debugging are easier via the terminal. | * Customizability: Advanced options like installing specific versions or debugging are easier via the terminal. | ||
* Lubuntu’s terminal-based software installation method is identical to other Ubuntu flavors, making it straightforward and efficient. | * Lubuntu’s terminal-based software installation method is identical to other Ubuntu flavors, making it straightforward and efficient. | ||
=DHCP and DNS Server for Low Carbon Future = | =DHCP and DNS Server for Low Carbon Future = | ||
| Line 300: | Line 672: | ||
By setting up a Raspberry Pi as a DHCP and DNS server, communities can create robust, low-carbon networks that provide critical services locally. This approach not only reduces energy consumption but also builds resilience and independence, ensuring ICT resources remain accessible in challenging scenarios. | By setting up a Raspberry Pi as a DHCP and DNS server, communities can create robust, low-carbon networks that provide critical services locally. This approach not only reduces energy consumption but also builds resilience and independence, ensuring ICT resources remain accessible in challenging scenarios. | ||
=Python inbuilt HTTP server for sharing Files= | |||
Python’s built-in HTTP server is a simple way to share files over a network. It works by starting a local HTTP server in a specified directory, which can then be accessed by other devices on the same network using a web browser or tools like wget or curl. | |||
Here’s a detailed guide with a worked example: | |||
==1. Prerequisites== | |||
* Python installed on your computer (Python 3.x recommended). | |||
* Files you want to share in a specific folder. | |||
==2. Steps to Share Files== | |||
* Prepare the Directory | |||
* Choose or create a directory with the files you want to share. | |||
* Example: | |||
<syntaxhighlight lang="bash"> | |||
mkdir ~/shared_files | |||
cp /path/to/your/files/* ~/shared_files | |||
</syntaxhighlight> | |||
==Step 2.2: Start the HTTP Server== | |||
Navigate to the directory containing the files and start Python’s HTTP server: | |||
<syntaxhighlight lang="bash"> | |||
cd ~/shared_files | |||
python3 -m http.server 8000 | |||
</syntaxhighlight> | |||
* 8000 is the port number; you can choose a different port if needed. | |||
* The terminal will display something like: | |||
* Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... | |||
==Step 2.3: Find Your IP Address== | |||
You need the IP address of the device running the server to share the files. Use the following command to find it: | |||
<syntaxhighlight lang="bash"> | |||
hostname -I | |||
</syntaxhighlight> | |||
This will return your local IP address (e.g., 192.168.1.100). | |||
==3. Access the Shared Files== | |||
* From a Web Browser, on another device connected to the same network, open a web browser and enter the address: | |||
<syntaxhighlight lang="bash"> | |||
http://<IP_ADDRESS>:8000 | |||
</syntaxhighlight> | |||
For example: | |||
<syntaxhighlight lang="bash"> | |||
http://192.168.1.100:8000 | |||
</syntaxhighlight> | |||
* This will display a file listing of the ~/shared_files directory, and you can download files by clicking on them. | |||
* From the Command Line you can use tools like wget or curl to download files. | |||
Example using wget: | |||
<syntaxhighlight lang="bash"> | |||
wget http://192.168.1.100:8000/filename | |||
</syntaxhighlight> | |||
Example using curl: | |||
<syntaxhighlight lang="bash"> | |||
curl -O http://192.168.1.100:8000/filename | |||
</syntaxhighlight> | |||
==4. Stopping the Server== | |||
* To stop the server, press Ctrl+C in the terminal where the server is running. | |||
==1. Create a Directory and Add Files:== | |||
<syntaxhighlight lang="bash"> | |||
mkdir ~/shared_files | |||
echo "Hello, this is a test file." > ~/shared_files/test.txt | |||
</syntaxhighlight> | |||
==2. Start the Server:== | |||
<syntaxhighlight lang="bash"> | |||
cd ~/shared_files | |||
python3 -m http.server 8000 | |||
</syntaxhighlight> | |||
Output: | |||
<syntaxhighlight lang="bash"> | |||
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... | |||
</syntaxhighlight> | |||
==3. Get the IP Address:== | |||
<syntaxhighlight lang="bash"> | |||
hostname -I | |||
</syntaxhighlight> | |||
Output: | |||
<syntaxhighlight lang="bash"> | |||
192.168.1.100 | |||
</syntaxhighlight> | |||
==4. Access the Server:== | |||
* From a Browser: Open http://192.168.1.100:8000 in a browser to see test.txt. | |||
* From Command Line: | |||
<syntaxhighlight lang="bash"> | |||
wget http://192.168.1.100:8000/test.txt | |||
</syntaxhighlight> | |||
This downloads the file test.txt to your current directory. | |||
==5. Stop the Server:== | |||
Press Ctrl+C in the terminal where the server is running. | |||
==6. Notes== | |||
* Port Conflicts: If port 8000 is in use, choose a different port (e.g., python3 -m http.server 8080). | |||
* Firewall: Ensure that your firewall allows traffic on the chosen port. | |||
* Access Control: This server does not provide authentication or encryption, so use it only on trusted networks. | |||
This is a quick and easy way to share files on a local network using Python! | |||
=Setting Up Nextcloud on Raspberry Pi= | =Setting Up Nextcloud on Raspberry Pi= | ||
| Line 415: | Line 916: | ||
* Connect to your server using its local IP. | * Connect to your server using its local IP. | ||
* Sync files across devices. | * Sync files across devices. | ||
=How to Install AbiWord using Offline Resources= | =How to Install AbiWord using Offline Resources= | ||
| Line 661: | Line 1,160: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==deb [trusted=yes] file:/home/pi/local-repo ./== | |||
This line is part of an APT sources list configuration in Linux systems like Ubuntu or Debian. It specifies a local software package repository for the Advanced Package Tool (APT). | |||
Breakdown of the Line | Breakdown of the Line | ||
* deb: Indicates that this line refers to a Debian binary package repository. APT will look for .deb files in the specified location. | * deb: Indicates that this line refers to a Debian binary package repository. APT will look for .deb files in the specified location. | ||
* [trusted=yes]: Tells APT to trust the repository without requiring a GPG (GNU Privacy Guard) signature for package verification. | * [trusted=yes]: Tells APT to trust the repository without requiring a GPG (GNU Privacy Guard) signature for package verification. This is useful for local repositories where you control the source and don't want to manage GPG keys. | ||
This is useful for local repositories where you control the source and don't want to manage GPG keys. | * file:/home/pi/local-repo: Specifies the path to the local repository. Here, it points to /home/pi/local-repo on the local filesystem. APT will look in this directory for a Packages index file and the .deb package files. | ||
* file:/home/pi/local-repo: Specifies the path to the local repository. Here, it points to /home/pi/local-repo on the local filesystem. | |||
APT will look in this directory for a Packages index file and the .deb package files. | |||
* ./: Represents the distribution/component to look for within the repository. The ./ indicates the current directory within local-repo. | * ./: Represents the distribution/component to look for within the repository. The ./ indicates the current directory within local-repo. | ||
| Line 674: | Line 1,173: | ||
* It allows APT to treat the directory /home/pi/local-repo as a package repository. | * It allows APT to treat the directory /home/pi/local-repo as a package repository. | ||
* Packages from this directory can be installed using sudo apt install <package-name> after running sudo apt update. | * Packages from this directory can be installed using sudo apt install <package-name> after running sudo apt update. | ||
=How to install Evince from another computer on the same network= | |||
To install Evince (a document viewer) on a Raspberry Pi and distribute it offline to other Raspberry Pi computers on the same network, you can follow these steps: | |||
==1. Prepare the Raspberry Pi with Internet Access== | |||
Use a Raspberry Pi with internet access to download the required packages for Evince and its dependencies. | |||
==Step 1.1: Update the Package List== | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update | |||
</syntaxhighlight> | |||
==Step 1.2: Download Evince and Dependencies== | |||
Use the apt package manager to download Evince and its dependencies without installing them directly. This ensures all required files are available for offline distribution. | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-get install --download-only evince | |||
</syntaxhighlight> | |||
The downloaded .deb files will be stored in the directory /var/cache/apt/archives. | |||
==Step 1.3: Copy the Files to a Shared Location== | |||
Create a shared directory (e.g., shared_packages) and copy the downloaded files: | |||
<syntaxhighlight lang="bash"> | |||
mkdir ~/shared_packages | |||
sudo cp /var/cache/apt/archives/*.deb ~/shared_packages | |||
</syntaxhighlight> | |||
Compress the directory for easier sharing if needed: | |||
<syntaxhighlight lang="bash"> | |||
tar -czvf shared_packages.tar.gz ~/shared_packages | |||
</syntaxhighlight> | |||
==2. Share the Files Over the Network== | |||
There are several methods to make the files accessible to other Raspberry Pi devices on the same network: | |||
==Option 2.1: Use a Simple Web Server== | |||
You can serve the files using Python’s built-in HTTP server: | |||
<syntaxhighlight lang="bash"> | |||
cd ~/shared_packages | |||
python3 -m http.server 8000 | |||
</syntaxhighlight> | |||
Other Raspberry Pi devices can access the files via http://<IP_ADDRESS>:8000. | |||
==Option 2.2: Use an SMB (Samba) or NFS Share== | |||
Set up a file-sharing service like Samba or NFS to share the ~/shared_packages folder with other Raspberry Pi devices. | |||
==Option 2.3: Use SCP or USB== | |||
Manually transfer the shared_packages directory to the other Raspberry Pi devices using SCP: | |||
<syntaxhighlight lang="bash"> | |||
scp -r ~/shared_packages pi@<TARGET_PI_IP>:~ | |||
</syntaxhighlight> | |||
==3. Install Evince on Other Raspberry Pi Devices== | |||
On the Raspberry Pi devices without internet access, follow these steps: | |||
==Step 3.1: Transfer the Files== | |||
Ensure the .deb files are available on the target Raspberry Pi (via SCP, USB, or the shared folder). | |||
==Step 3.2: Install the Packages== | |||
Navigate to the directory containing the .deb files: | |||
<syntaxhighlight lang="bash"> | |||
cd ~/shared_packages | |||
</syntaxhighlight> | |||
Install the packages using dpkg: | |||
<syntaxhighlight lang="bash"> | |||
sudo dpkg -i *.deb | |||
</syntaxhighlight> | |||
==Step 3.3: Fix Missing Dependencies (If Any)== | |||
If there are unmet dependencies, use apt to resolve them locally: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-get install -f | |||
</syntaxhighlight> | |||
==4. Automate Installation with a Local Repository (Optional)== | |||
If you plan to frequently share packages, set up a local APT repository: | |||
==Step 4.1: Create a Local Repository== | |||
Install the dpkg-dev package: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-get install dpkg-dev | |||
</syntaxhighlight> | |||
Set up the repository: | |||
<syntaxhighlight lang="bash"> | |||
mkdir ~/myrepo | |||
cp ~/shared_packages/*.deb ~/myrepo | |||
cd ~/myrepo | |||
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz | |||
</syntaxhighlight> | |||
==Step 4.2: Share the Repository== | |||
Use a web server or file-sharing method to share the myrepo directory. | |||
==Step 4.3: Add the Repository on Other Devices== | |||
On the other Raspberry Pi devices, add the repository to /etc/apt/sources.list: | |||
<syntaxhighlight lang="bash"> | |||
echo "deb [trusted=yes] http://<SERVER_IP>:8000/ ./" | sudo tee -a /etc/apt/sources.list | |||
</syntaxhighlight> | |||
Update the package list: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update | |||
</syntaxhighlight> | |||
==Install Evince:== | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install evince | |||
</syntaxhighlight> | |||
This method ensures that all Raspberry Pi computers on the network can install Evince without requiring individual internet connections. | |||
=How to install LUbuntu on USB Memory Stick using Mac Terminal= | |||
To burn a copy of Lubuntu onto a USB memory stick for installation on a laptop using a Mac computer, follow these steps: | |||
==Step 1: Download the Lubuntu Disk Image== | |||
* Visit the Lubuntu official website and download the latest .iso file for Lubuntu. | |||
* Save the file to a known location, such as your Downloads folder. | |||
==Step 2: Prepare the USB Drive== | |||
* Insert the USB memory stick into your Mac. | |||
* Open Disk Utility (search for it using Spotlight or find it in Applications > Utilities). | |||
* Select your USB drive from the list on the left. | |||
* Click Erase and configure the following: | |||
<syntaxhighlight lang="bash"> | |||
Format: MS-DOS (FAT32) | |||
Scheme: Master Boot Record (MBR) | |||
</syntaxhighlight> | |||
Click Erase to format the USB stick. | |||
==Step 3: Convert the ISO to a DMG (Optional)== | |||
* Mac's built-in tools handle .iso files, but some tools may prefer .dmg. To convert: | |||
* Open the Terminal. | |||
* Run this command: | |||
<syntaxhighlight lang="bash"> | |||
hdiutil convert -format UDRW -o ~/Downloads/lubuntu.img ~/Downloads/lubuntu.iso | |||
</syntaxhighlight> | |||
Rename the output file to have a .dmg extension if required for installation on an old Mac | |||
<syntaxhighlight lang="bash"> | |||
mv ~/Downloads/lubuntu.img.dmg ~/Downloads/lubuntu.dmg | |||
</syntaxhighlight> | |||
==Step 4: Write the Disk Image to the USB Drive== | |||
In the Terminal, identify your USB drive: | |||
<syntaxhighlight lang="bash"> | |||
diskutil list | |||
</syntaxhighlight> | |||
Locate your USB drive by its name (e.g., /dev/disk2). | |||
Unmount the USB drive: | |||
<syntaxhighlight lang="bash"> | |||
diskutil unmountDisk /dev/diskN | |||
</syntaxhighlight> | |||
* Replace /dev/diskN with the identifier for your USB drive (e.g., /dev/disk2). | |||
* Write the ISO to the USB: | |||
<syntaxhighlight lang="bash"> | |||
sudo dd if=/Users/edmond/Downloads/lubuntu.iso of=/dev/rdiskN bs=1m | |||
</syntaxhighlight> | |||
* Replace /dev/rdiskN with your USB drive identifier. The r in rdiskN speeds up the process. Enter your password when prompted. | |||
* Wait for the process to complete. This might take several minutes, and there will be no progress indicator. Once done, you'll see the command prompt return. | |||
==Step 5: Verify and Eject== | |||
* Eject the USB drive: | |||
<syntaxhighlight lang="bash"> | |||
diskutil eject /dev/diskN | |||
</syntaxhighlight> | |||
Remove the USB from your Mac. | |||
==Step 6: Install Lubuntu== | |||
* Insert the USB drive into the laptop where you want to install Lubuntu. | |||
* Boot from the USB: Access the boot menu (usually by pressing Esc, F12, or another key during startup, depending on your laptop model). | |||
* Select the USB drive as the boot device. | |||
* Follow the Lubuntu installation instructions. | |||
Notes | |||
* Use Etcher (Optional): If you prefer a graphical tool, download Balena Etcher, which simplifies creating bootable USB drives. | |||
* Backup Data: Writing an image will erase all data on the USB drive. Ensure you’ve backed up any important files. | |||
* Mac Users with M1/M2 Chips: Bootable USBs can still be created using the same process, but installation on ARM laptops may require an ARM-compatible OS version. | |||
=What is Kolibri= | |||
Kolibri is an open-source educational platform developed by Learning Equality. It is designed to provide offline access to high-quality educational resources, making it particularly useful in areas with limited or no internet connectivity. Kolibri can host a variety of content, including interactive lessons, videos, quizzes, and textbooks, and is widely used in schools, community centers, and informal learning environments. | |||
==Key Features of Kolibri:== | |||
* Offline Access: Operates without the need for an active internet connection after the content has been downloaded. | |||
* Curated Content: Offers educational resources from renowned providers such as Khan Academy, CK-12, and PhET. | |||
* Multi-User Support: Provides role-based access for learners, educators, and administrators. | |||
* Customizable Lessons: Allows educators to create and assign lessons tailored to the needs of their students. | |||
* Analytics: Offers tools to track student progress and engagement. | |||
* Lightweight: Designed to run on low-powered devices, including the Raspberry Pi. | |||
==Using Kolibri on a Raspberry Pi== | |||
Kolibri is ideal for deployment on a Raspberry Pi, enabling it to act as a local server for offline educational access in classrooms or community learning centers. | |||
Requirements: | |||
* A Raspberry Pi 3, 4, or later (Raspberry Pi 4 is recommended for better performance). | |||
* A power supply and storage device (SD card or external storage) with at least 16GB capacity for content. | |||
* Optional: A Wi-Fi router to enable learners to connect to the Kolibri server on the Raspberry Pi. | |||
Steps to Install and Use Kolibri on Raspberry Pi: | |||
* Prepare the Raspberry Pi: Install a compatible operating system, such as Raspberry Pi OS. | |||
* Ensure the system is updated: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update && sudo apt upgrade -y | |||
</syntaxhighlight> | |||
2. Install Kolibri: | |||
* Add the Learning Equality repository: | |||
<syntaxhighlight lang="bash"> | |||
echo "deb [trusted=yes] https://learningequality.org/r/debian/ ./" | sudo tee /etc/apt/sources.list.d/learningequality.list | |||
</syntaxhighlight> | |||
* Install Kolibri: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt update | |||
sudo apt install kolibri | |||
</syntaxhighlight> | |||
3. Start the Kolibri Server: | |||
* Launch Kolibri: | |||
<syntaxhighlight lang="bash"> | |||
kolibri start | |||
</syntaxhighlight> | |||
* Access Kolibri in a browser by navigating to http://<Raspberry_Pi_IP_Address>:8080. | |||
==4. Download Content:== | |||
* Use the Kolibri interface to import educational content. This can be done from: | |||
* Kolibri Studio (online repository). | |||
* Local storage if content has been pre-downloaded. | |||
==5. Set Up the Learning Environment:== | |||
* Configure user roles for teachers and students. | |||
* Teachers can create lessons, assign resources, and monitor student progress. | |||
==6. Enable Offline Connectivity:== | |||
* If deploying in a classroom, connect the Raspberry Pi to a Wi-Fi router. | |||
* Learners can access Kolibri by connecting their devices to the same network and entering the Raspberry Pi’s IP address in a browser. | |||
==Use Cases:== | |||
* Schools in Remote Areas: Acts as a self-contained learning system where students and teachers access resources locally. | |||
* Libraries or Community Centers: Provides access to a wide array of educational materials to the public. | |||
* Disaster Recovery and Emergency Education: Serves as a portable, robust solution for education in emergencies. | |||
Kolibri on a Raspberry Pi provides a powerful, affordable, and scalable way to deliver quality education anywhere. | |||
=Downloading content for Kolibri= | |||
The amount of content you need to download depends on the specific educational materials and subjects you wish to include. Kolibri allows you to selectively download content from Kolibri Studio or other repositories. Here are some general content sizes: | |||
* Basic Collections: | |||
* Khan Academy Lite: Approximately 30–50 GB for a full collection, but smaller subsets (e.g., Math for Grades 1–6) might only be a few GB. | |||
* CK-12 Foundation: Modules typically range from hundreds of MB to several GB. | |||
* PhET Simulations: A complete set might be around 1 GB. | |||
* Custom Downloads: Kolibri Studio allows you to choose specific topics, grades, or even individual resources. This can significantly reduce storage requirements if only targeted content is needed. | |||
==Storing Content on an External Storage Device== | |||
Kolibri can store its content on an external storage device, which is particularly useful for managing larger content libraries without overloading the Raspberry Pi’s SD card. Here’s how you can configure Kolibri to use external storage: | |||
Steps to Configure External Storage: | |||
* Attach the External Storage Device: Connect a USB drive or external hard drive to the Raspberry Pi. | |||
* Ensure it is formatted with a compatible file system (e.g., ext4, FAT32, or NTFS). | |||
* Find the Mount Path: Check the device’s mount path using: | |||
<syntaxhighlight lang="bash"> | |||
lsblk | |||
</syntaxhighlight> | |||
* Example: /media/pi/your_drive_name. | |||
3. Stop Kolibri: Before changing the storage location, stop the Kolibri server: | |||
<syntaxhighlight lang="bash"> | |||
kolibri stop | |||
</syntaxhighlight> | |||
4. Update Kolibri’s Configuration: | |||
* Edit the Kolibri options file: | |||
<syntaxhighlight lang="bash"> | |||
sudo nano /home/pi/.kolibri/options.ini | |||
</syntaxhighlight> | |||
* Add or update the CONTENT_STORAGE_DIR parameter to point to the external storage location. For example: | |||
<syntaxhighlight lang="bash"> | |||
[Paths] | |||
CONTENT_STORAGE_DIR = /media/pi/your_drive_name/kolibri_content | |||
</syntaxhighlight> | |||
5. Move Existing Content (if necessary): | |||
* If you’ve already downloaded content, move it to the new location: | |||
<syntaxhighlight lang="bash"> | |||
mv /home/pi/.kolibri/content /media/pi/your_drive_name/kolibri_content | |||
</syntaxhighlight> | |||
6. Restart Kolibri: Start the Kolibri server again: | |||
<syntaxhighlight lang="bash"> | |||
kolibri start | |||
</syntaxhighlight> | |||
Advantages of Using External Storage: | |||
* Scalability: Easily upgrade to larger drives as needed. | |||
* Performance: High-speed external drives can improve response times when serving content to multiple users. | |||
* Preservation: External storage can be moved between devices or used as a backup. | |||
By storing content on an external device, you ensure that the Raspberry Pi’s internal storage remains free for system operations while accommodating extensive educational materials. | |||
Latest revision as of 01:42, 28 December 2024
ICT Infrastructure required for Off-Line Computing
If the internet and mobile phone communication were to go down for several years, ICT software and hardware could play a critical role in supporting community resilience by enabling local communication, resource management, education, and essential services. These tools would need to be designed for offline operation, energy efficiency, and decentralized use to meet the needs of isolated communities.
Good Applications for ICT in a Long-Term Offline Scenario
1. Local Communication Systems
Mesh Networks:
- Use devices like Raspberry Pi, ESP32, or smartphones to create a local wireless communication network.
- Software: Mesh networking protocols like BATMAN, CJDNS, or LibreMesh.
- Use Cases: Text messaging, file sharing, and emergency alerts within the community.
Digital Radio Communication:
- Leverage amateur radio or long-range radio protocols (e.g., LoRa) for low-bandwidth communication.
- Software: FLDigi for text-based communication over radio waves.
- Use Cases: Long-distance messaging, disaster coordination, and information exchange.
2. Resource Management and Distribution
Local Databases:
- Use Raspberry Pi or similar devices to host offline databases for inventory, water usage, food distribution, and medical supplies.
- Software: SQLite, Airtable (offline mode), or custom Python-based tools.
- Use Cases: Track and manage resources, prevent shortages, and ensure equitable distribution.
Energy Monitoring:
- Deploy IoT devices to monitor and optimize renewable energy systems like solar panels or microgrids.
- Software: Open-source platforms like Node-RED or Home Assistant.
- Use Cases: Monitor battery levels, manage load balancing, and maximize efficiency of limited power supplies.
3. Education and Knowledge Sharing
Offline Content Servers:
- Set up offline servers with educational content and community resources.
- Software: Kolibri (educational content platform), Kiwix (offline Wikipedia), or MediaWiki for custom knowledge repositories.
- Use Cases: Teach skills, provide technical manuals, and share local knowledge.
Skill Training Simulations:
- Use laptops or Raspberry Pi systems with offline tools for vocational training (e.g., farming, repair skills).
- Software: Offline coding environments like Scratch or Geogebra for mathematics.
4. Health and Medical Support
Local Health Records:
- Deploy local, encrypted health databases for tracking patient records and community health trends.
- Software: OpenMRS (offline mode) or custom offline databases.
- Use Cases: Manage vaccinations, track disease outbreaks, and prioritize medical resources.
Diagnostic Tools:
- Use portable medical devices with offline diagnostic software.
- Hardware: Raspberry Pi or Arduino for simple health monitoring tools (e.g., heart rate monitors).
- Use Cases: Provide basic diagnostics and monitor chronic conditions.
5. Local Governance and Decision-Making
Community Voting and Planning Systems:
- Use Raspberry Pi to host local web apps for community decision-making and governance.
- Software: Offline-capable platforms like Polls (Nextcloud app) or Etherpad for collaborative planning.
- Use Cases: Organize meetings, vote on resource allocation, and track action plans.
Mapping and GIS Tools:
- Deploy offline geographic information systems (GIS) for land management and disaster response.
- Software: QGIS (offline mode), OpenStreetMap (local instance).
- Use Cases: Plan evacuation routes, allocate agricultural land, and monitor environmental changes.
6. Entertainment and Community Engagement
Offline Media Centers:
- Host local servers with movies, music, and books for community entertainment.
- Software: Plex, Jellyfin, or VLC for streaming and playback.
- Use Cases: Provide recreation and maintain morale during extended isolation.
Gaming Platforms:
- Set up local multiplayer games or board game simulations for communal activities.
- Software: LAN-based games or retro gaming emulators.
7. Disaster Preparedness and Recovery
Early Warning Systems:
- Use sensors and IoT devices for monitoring weather, floods, or fires.
- Hardware: LoRa-based sensors or Arduino weather stations.
- Software: Custom Python scripts or tools like Grafana for visualizing sensor data.
- Use Cases: Alert the community to imminent dangers and track environmental risks.
Repair and Maintenance Manuals:
- Host digital libraries of repair guides and engineering schematics.
- Software: PDF repositories or offline Wikis with searchable content.
- Use Cases: Enable DIY repairs for critical infrastructure like water pumps, vehicles, and electronics.
Recommended Hardware for Offline Resilience
- Raspberry Pi: Versatile for servers, communication hubs, or educational tools.
- ESP32 or Arduino: Low-power IoT devices for sensors and local automation.
- LoRa Modules: For long-range, low-bandwidth communication.
- Solar-Powered Chargers: To ensure devices can operate without grid electricity.
- External Storage: SSDs or hard drives for storing data, media, and software repositories.
- Portable Laptops: Energy-efficient laptops for running software and performing tasks locally.
Core Principles for ICT Resilience
- Energy Efficiency: Design systems to operate on minimal power, prioritizing renewable energy.
- Decentralization: Avoid single points of failure by distributing hardware and software systems.
- Modularity and Repairability: Choose hardware and software that are easy to repair and upgrade locally.
- Simplicity and Usability: Ensure tools are easy to use and require minimal technical expertise.
- Scalability: Design systems to grow with the community’s needs, from a few users to a larger network.
Conclusion
ICT software and hardware can play a transformative role in supporting community resilience during prolonged internet and communication outages. By leveraging local networks, offline computing, and low-power devices, communities can sustain essential functions like communication, education, health, and resource management. Teaching these principles and deploying scalable systems will strengthen local resilience and self-reliance.
Student Project: Building a Low-Carbon, Low-Energy ICT Infrastructure for an Offline Future
This project challenges students to design and implement an ICT infrastructure that functions efficiently without internet access, using Linux, old laptops, and Raspberry Pi devices. The project emphasizes sustainability, resourcefulness, and essential services for a community.
Goals
Design a Sustainable ICT Infrastructure:
- Minimize energy consumption.
- Use repurposed or low-energy hardware.
Provide Basic ICT Services:
- Communication, knowledge access, and resource management.
- Prepare for Internet Loss:
- Preload essential software and content.
- Plan for long-term, local operations.
Project Steps
1. Understand the Community’s Needs
Key Questions:
- What essential ICT services are required (e.g., communication, education, record-keeping)?
- How can technology address basic needs like water, food, and energy management?
Potential Services:
- Local communication (text-based chat, email).
- Offline libraries (Wikipedia, medical guides).
- Environmental monitoring (water levels, air quality).
- Collaborative tools (file sharing, project management).
- Educational resources.
2. Choose and Prepare Hardware
Use Existing Equipment:
- Old laptops as servers and workstations.
- Raspberry Pis for lightweight tasks like networking or automation.
Hardware Considerations:
- Low power consumption.
- Compatibility with Linux.
- Potential for solar or battery-powered operation.
Pre-Setup Steps:
- Test hardware and replace failing components.
- Install lightweight Linux distributions (e.g., Ubuntu Server, Raspbian Lite, or Lubuntu).
3. Set Up Essential ICT Services
Local Network (No Internet):
- Use a Raspberry Pi as a DHCP and DNS server.
- Set up a Wi-Fi router for local communication.
Offline File Sharing:
- Install Nextcloud on a Raspberry Pi for local file hosting and collaboration.
Offline Libraries:
- Download and host offline versions of:
- Kiwix for Wikipedia and other content.
- OpenStreetMap for navigation.
- Localized educational materials (Khan Academy).
Messaging and Email:
- Set up a local email server (e.g., Postfix).
- Use lightweight chat systems (e.g., Matrix or Rocket.Chat) for local messaging.
Environmental Monitoring:
- Use Arduino or Raspberry Pi with sensors to monitor environmental data (e.g., temperature, water levels).
4. Implement Energy-Efficient Practices
Low Power Consumption:
- Use old laptops and Raspberry Pis in low-power mode.
- Disconnect unnecessary peripherals (e.g., monitors when not in use).
Renewable Power:
- Integrate solar panels or manual chargers for energy independence.
5. Create Local Automation Systems
Water Management:
- Use IoT devices to automate irrigation or monitor water tanks.
Community Bulletin Board:
- Set up a local website for news, announcements, and resource coordination.
Backup Systems:
- Implement regular data backups on external drives.
6. Prepare for Internet Loss
Preloaded Content:
- Download essential tools, software repositories, and manuals (e.g., Linux documentation, open-source software).
Skill Development:
- Train students in using Linux, basic programming, and networking.
Redundant Systems:
- Test systems to ensure reliability and redundancy in services.
Project Evaluation
Energy Efficiency:
- Measure power consumption and compare it to traditional setups.
Functionality:
- Demonstrate the ICT services provided (e.g., messaging, file sharing).
Resilience:
- Evaluate how well the system operates in a simulated internet-free scenario.
Sustainability:
- Assess the environmental impact (e.g., use of repurposed hardware, renewable energy).
Example Scenario
Hardware Setup:
- A Raspberry Pi acts as a local server hosting Nextcloud and Kiwix.
- Old laptops connect to the Pi via Wi-Fi for accessing services.
Services Provided:
- Students can access offline Wikipedia, download educational content, and communicate using a local chat system.
Energy Source:
- A small solar panel array powers the Raspberry Pi and a shared laptop.
Community Benefit: Students and community members can continue learning, sharing resources, and managing local projects without internet access.
Preparations Before Internet Goes Down
- Pre-download essential resources and software.
- Train students in Linux, networking, and hardware maintenance.
- Test the system in a simulated offline environment.
- Document the setup process for future reference.
This project not only teaches technical skills but also fosters creativity, problem-solving, and an understanding of sustainable practices in ICT. It prepares students to think critically about how technology can serve communities under resource-constrained conditions.
Lightweight Linux Distributions and Software
Using an old laptop with Linux is a great way to reduce electronic waste and optimize performance for basic tasks. Here’s a guide to lightweight Linux software that can handle email, word processing, reading PDFs, and watching DVDs effectively:
1. Linux Distribution
Choose a lightweight Linux distribution designed for older hardware:
- Lubuntu: Based on Ubuntu, uses the LXQt desktop, light on resources.
- Linux Mint XFCE Edition: User-friendly and lightweight.
- Puppy Linux: Ultra-lightweight for very old hardware.
- MX Linux XFCE: Lightweight with good out-of-the-box functionality.
2. Software Recommendations
- Thunderbird: A full-featured email client, supports offline email management and calendars.
- Geary: Lightweight email client with a clean interface.
- Mailspring: Modern and efficient, though slightly heavier than others.
Word Processing
- LibreOffice: Comprehensive office suite for word processing, spreadsheets, and presentations.
- Install only LibreOffice Writer if disk space is limited.
- AbiWord: Lightweight word processor for basic needs.
Reading PDFs
- Evince: Simple and lightweight PDF viewer.
- Okular: Feature-rich PDF viewer, also handles eBooks and other formats.
- MuPDF: Extremely lightweight, great for very old systems.
Watching DVDs
- VLC Media Player: Plays DVDs, videos, and other multimedia formats without additional codecs.
- MPV Media Player: Lightweight, powerful, and works well with older hardware.
3. Additional Tools
- Firefox or Brave (tune settings to reduce resource use).
- Midori or Falkon for lighter browsing.
- File Management: Use the default file manager in your Linux distribution (e.g., Thunar for XFCE).
- Install tools like Stacer to monitor system performance.
- Use BleachBit for cleaning unnecessary files.
Enabling DVD Playback
To play DVDs:
- Install VLC or MPV.
- Add libdvdcss for decoding encrypted DVDs:
sudo apt update
sudo apt install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg
Burn Disk ISO Image to USB Memory Stick
Burning an ISO disk image onto a USB memory stick using a Raspberry Pi is straightforward and can be done using command-line tools or graphical applications. Here’s a step-by-step guide:
Using the Command Line
1. Insert the USB Memory Stick
- Connect your USB memory stick to the Raspberry Pi.
- Identify the device name of the USB stick using:
lsblk
Example output:
sda 8:0 1 16G 0 disk
└─sda1 8:1 1 16G 0 part /media/pi/USB
Here, /dev/sda is the USB device (do not use /dev/sda1).
2. Unmount the USB Stick
- Unmount the USB drive if it is automatically mounted:
sudo umount /dev/sda1
3. Write the ISO to the USB Stick
- Use the dd command to burn the ISO image to the USB stick:
sudo dd if=/path/to/image.iso of=/dev/sda bs=4M status=progress
- Replace /path/to/image.iso with the full path to your ISO file.
- Replace /dev/sda with the correct device name of your USB stick.
- Important: Be very careful with the of argument, as using the wrong device name can overwrite your Raspberry Pi’s storage.
4. Sync and Eject
- Sync the data to ensure all writes are completed:
sudo sync
- Safely eject the USB stick:
sudo eject /dev/sda
Using a Graphical Tool
If you have a graphical desktop environment on your Raspberry Pi, you can use tools like Balena Etcher.
1. Install Balena Etcher
- Download and install Balena Etcher:
sudo apt update
sudo apt install balena-etcher-electron
2. Burn the ISO
- Open Balena Etcher.
- Select the ISO file.
- Choose the USB stick as the target.
- Click “Flash” to write the ISO to the USB stick.
Verify the Process To confirm that the ISO was successfully burned:
- Reinsert the USB stick.
- Check the partitions created on it using:
lsblk
3. Test the USB stick by booting another computer or device from it.
This process ensures the ISO is properly burned and ready for use.
Using Knoppix to Erase a Hard Drive on a Laptop
Using Knoppix or another Linux-based tool to securely erase a hard drive is an effective way to ensure that data cannot be recovered. Here’s a detailed guide:
Steps to Securely Erase a Hard Drive Using Knoppix
1. Prepare Knoppix
- Download Knoppix: Download the Knoppix ISO file from the official website.
- Create a Bootable USB/DVD:
- Use tools like Rufus (Windows) or Etcher (Linux/Mac) to create a bootable USB stick or burn the ISO to a DVD.
2. Boot into Knoppix
- Insert the bootable USB/DVD into the laptop.
- Restart the laptop and boot from the USB/DVD (change the boot order in the BIOS/UEFI if needed).
- Select the default Knoppix Live mode to load the operating system.
3. Identify the Hard Drive
- Open a terminal in Knoppix.
- List all storage devices using the command:
sudo fdisk -l
- Note the identifier of the drive you want to erase (e.g., /dev/sda, /dev/sdb).
4. Securely Erase the Hard Drive
- Use one of the following tools/methods:
Method 1: Using dd Command
- Overwrite the entire drive with zeros:
sudo dd if=/dev/zero of=/dev/sdX bs=1M
Replace sdX with the appropriate drive identifier (e.g., /dev/sda).
- To overwrite with random data (stronger security):
sudo dd if=/dev/urandom of=/dev/sdX bs=1M
- This process can take a while depending on the drive size.
Method 2: Using shred
- shred overwrites the disk multiple times with random data:
sudo shred -v -n 3 /dev/sdX
- -v: Show progress.
- -n 3: Overwrite the disk 3 times (you can increase the number for greater security).
- sdX: Replace with your drive identifier.
Method 3: Using hdparm for Secure Erase
- If your hard drive supports Secure Erase (common in modern drives):
1. Unlock the drive:
sudo hdparm --user-master u --security-set-pass password /dev/sdX
2. Start the Secure Erase process:
sudo hdparm --user-master u --security-erase password /dev/sdX
Replace password with a temporary password (e.g., “1234”) and sdX with your drive identifier.
After Erasing the Drive verify the drive is empty by running:
sudo hexdump -C /dev/sdX | head
3. Shutdown Knoppix:
- Safely power down the system:
sudo shutdown -h now
Low Carbon Computing
Using computers mostly offline in a low-carbon future involves optimizing technology for energy efficiency, reducing dependence on the internet, and using local resources effectively. Here’s how:
1. Optimize Hardware for Efficiency
- Energy-efficient devices: Use low-power computers such as Raspberry Pi, solar-powered laptops, or energy-efficient desktop setups.
- Upgrade instead of replace: Extend the life of devices through upgrades rather than buying new ones.
- Power management: Configure power-saving settings like sleep mode and low-power usage modes.
2. Minimize Internet Use
- Download resources: Download software, educational materials, and data for offline use, reducing the need for constant internet connectivity.
- Local networks: Set up intranets or local networks for sharing files and collaboration without external internet access.
- Periodic synchronization: Synchronize only essential updates or data during planned internet access times.
3. Local Computing and Data Storage
- Local processing: Run applications directly on devices rather than relying on cloud computing.
- Offline software: Use software that doesn’t require constant internet access, such as LibreOffice for productivity or locally installed databases.
- External storage: Use external drives or local servers for data storage and backups.
4. Use Renewable Energy Sources
- Solar-powered setups: Power computers with solar panels or other renewable energy sources.
- Shared resources: Establish community-powered computing hubs to centralize energy usage and reduce individual consumption.
5. Leverage Low-Carbon Digital Tools
- Efficient programming: Use lightweight software and avoid bloatware to reduce energy consumption.
- Efficient file formats: Work with text-based or low-size formats (e.g., CSV instead of heavy spreadsheets, vector graphics instead of raster images).
- Offline alternatives: Use pre-installed libraries for coding, learning, or simulations without needing cloud-based tools.
- Shared computing: Use shared computers or libraries where multiple users can access resources efficiently.
- Local collaboration: Foster teamwork using shared devices, reducing the need for every individual to own a separate device.
7. Educate Users
- Train people to work efficiently offline by teaching them:
- How to manage files and organise resources.
- Alternatives to cloud-based tools, like offline maps or local development environments.
Example Setup for a Low-Carbon Future:
- Hardware: Raspberry Pi with a solar panel, a small monitor, and efficient peripherals.
- Software: Open-source operating systems (e.g., Linux) with offline productivity and programming tools.
- Power Source: Solar charger or a communal renewable energy source.
- Connectivity: Occasional internet use via a community access point for updates or large file transfers.
By combining these practices, computers can continue to support productivity and learning while maintaining a minimal carbon footprint.
Installing and Removing Software using Terminal
Yes, you can install software on Lubuntu (a lightweight Ubuntu variant) using the sudo apt install command in the terminal. Lubuntu uses the same package management system as Ubuntu, so you can leverage the Advanced Package Tool (APT) for software installation.
Step-by-Step Instructions
- Open the Terminal:Press Ctrl + Alt + T or find "Terminal" in your application menu.
- Update the Package List:Before installing software, ensure your package list is up to date:
sudo apt update
Install the Software: Use the sudo apt install command followed by the software package name. For example, to install the VLC media player:
sudo apt install vlc
- Confirm Installation: If prompted, press Y to confirm the installation.
- Run the Installed Software:
- Once installed, you can launch the software from the application menu or by typing its name in the terminal. For example:
vlc
Notes Checking Availability: To check if a package is available, use:
apt-cache search <software-name>
Uninstalling Software: To remove a package:
sudo apt remove <software-name>
Full Removal: To remove the package and its configuration files:
sudo apt purge <software-name>
Why Use the Terminal?
- Efficiency: Faster and more direct than using graphical package managers.
- Dependency Management: APT handles dependencies automatically.
- Customizability: Advanced options like installing specific versions or debugging are easier via the terminal.
- Lubuntu’s terminal-based software installation method is identical to other Ubuntu flavors, making it straightforward and efficient.
DHCP and DNS Server for Low Carbon Future
Setting up a Raspberry Pi as a DHCP and DNS server is a critical step in building a local network for a community, especially in a low-carbon future where internet access might be limited or unavailable. Here's how to set it up, its importance, use cases, coverage, and recommendations for deployment.
How to Set Up a Raspberry Pi as a DHCP and DNS Server
Step 1: Prepare Your Raspberry Pi
- Install a lightweight Linux distribution, such as Raspberry Pi OS Lite.
- Ensure the Pi has a static IP address for consistent identification in the network.
Step 2: Install the Required Software
Update the Pi:
sudo apt update && sudo apt upgrade
Install dnsmasq, which combines DHCP and DNS functionality:
sudo apt install dnsmasq
Step 3: Configure DHCP Services
Edit the dnsmasq configuration file:
sudo nano /etc/dnsmasq.conf
Add the following lines to define the DHCP range and DNS behaviour:
interface=wlan0 # Replace with your network interface
dhcp-range=192.168.1.50,192.168.1.150,24h
domain-needed
bogus-priv
expand-hosts
- dhcp-range: Specifies the range of IP addresses to assign dynamically.
- domain-needed: Ensures only valid domain names are queried.
- expand-hosts: Expands the local hostname with a domain.
Restart the dnsmasq service to apply changes:
sudo systemctl restart dnsmasq
Step 4: Enable Static IP on the Raspberry Pi
Edit the network configuration file:
sudo nano /etc/dhcpcd.conf
Add:
interface wlan0
static ip_address=192.168.1.1/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
Restart the Pi to apply changes:
sudo reboot
Why is a DHCP and DNS Server Needed in a Low-Carbon Future?
1. Localized Networks:
- A local DHCP server assigns IP addresses to devices in a local network, eliminating dependency on external ISPs.
- A DNS server resolves domain names locally, enabling offline access to hosted services (e.g., file sharing, offline Wikipedia).
2. Resource Efficiency:
- Reduces energy use by keeping data local and avoiding power-intensive internet infrastructure.
- Raspberry Pi is highly energy-efficient compared to traditional servers.
3. Resilience:
- Supports essential ICT services like communication, file sharing, and automation in scenarios where global connectivity is down.
How Do People Use It?
- Education: - Access offline educational content hosted locally, such as Wikipedia and Khan Academy materials.
- Communication: - Provide local messaging services using systems like Matrix or Rocket.Chat.
- Resource Management:- Monitor and automate local resources, such as water and energy systems.
- Collaboration: - Use tools like Nextcloud for file sharing and project management.
- Entertainment: - Serve media content locally (e.g., movies, books).
Coverage
- Typical Range: - The Raspberry Pi, combined with a Wi-Fi router, covers approximately 30-50 meters indoors and 100-200 meters outdoors, depending on obstacles and interference.
- Range can be extended using repeaters or mesh networks.
- Scalability: - For larger communities, multiple Raspberry Pis can be interconnected to create subnetworks.
Where Should It Be Based?
- Centralized Location: - Place the Raspberry Pi in a central location within the community to ensure even Wi-Fi signal coverage.
- Ensure it has access to a reliable power source (solar or battery backup).
- Near Users: - Ideally close to the main areas where users access services (e.g., schools, community centers).
Additional Considerations
Security: - Secure the network with WPA2 encryption.
- Use firewalls (e.g., ufw) to prevent unauthorized access.
- Backups: - Regularly back up the Raspberry Pi's configuration to prevent data loss.
- Power Backup: - Pair with solar panels or power banks for uninterrupted service.
By setting up a Raspberry Pi as a DHCP and DNS server, communities can create robust, low-carbon networks that provide critical services locally. This approach not only reduces energy consumption but also builds resilience and independence, ensuring ICT resources remain accessible in challenging scenarios.
Python inbuilt HTTP server for sharing Files
Python’s built-in HTTP server is a simple way to share files over a network. It works by starting a local HTTP server in a specified directory, which can then be accessed by other devices on the same network using a web browser or tools like wget or curl.
Here’s a detailed guide with a worked example:
1. Prerequisites
- Python installed on your computer (Python 3.x recommended).
- Files you want to share in a specific folder.
- Prepare the Directory
- Choose or create a directory with the files you want to share.
- Example:
mkdir ~/shared_files
cp /path/to/your/files/* ~/shared_files
Step 2.2: Start the HTTP Server
Navigate to the directory containing the files and start Python’s HTTP server:
cd ~/shared_files
python3 -m http.server 8000
- 8000 is the port number; you can choose a different port if needed.
- The terminal will display something like:
- Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
Step 2.3: Find Your IP Address
You need the IP address of the device running the server to share the files. Use the following command to find it:
hostname -I
This will return your local IP address (e.g., 192.168.1.100).
- From a Web Browser, on another device connected to the same network, open a web browser and enter the address:
http://<IP_ADDRESS>:8000
For example:
http://192.168.1.100:8000
- This will display a file listing of the ~/shared_files directory, and you can download files by clicking on them.
- From the Command Line you can use tools like wget or curl to download files.
Example using wget:
wget http://192.168.1.100:8000/filename
Example using curl:
curl -O http://192.168.1.100:8000/filename
4. Stopping the Server
- To stop the server, press Ctrl+C in the terminal where the server is running.
1. Create a Directory and Add Files:
mkdir ~/shared_files
echo "Hello, this is a test file." > ~/shared_files/test.txt
2. Start the Server:
cd ~/shared_files
python3 -m http.server 8000
Output:
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
3. Get the IP Address:
hostname -I
Output:
192.168.1.100
4. Access the Server:
- From a Browser: Open http://192.168.1.100:8000 in a browser to see test.txt.
- From Command Line:
wget http://192.168.1.100:8000/test.txt
This downloads the file test.txt to your current directory.
5. Stop the Server:
Press Ctrl+C in the terminal where the server is running.
6. Notes
- Port Conflicts: If port 8000 is in use, choose a different port (e.g., python3 -m http.server 8080).
- Firewall: Ensure that your firewall allows traffic on the chosen port.
- Access Control: This server does not provide authentication or encryption, so use it only on trusted networks.
This is a quick and easy way to share files on a local network using Python!
Setting Up Nextcloud on Raspberry Pi
Setting up Nextcloud on a Raspberry Pi is a great way to create a private cloud server for file sharing, collaboration, and data storage. Here's a step-by-step guide on how to set it up and use it.
Step 1: Prepare the Raspberry Pi
- Install Raspberry Pi OS: Use Raspberry Pi OS Lite for a minimal installation.
- Flash the OS to an SD card using tools like Raspberry Pi Imager.
- Update and Upgrade the System:
sudo apt update && sudo apt upgrade -y
Set a Static IP Address: Edit /etc/dhcpcd.conf and assign a static IP to the Raspberry Pi (important for consistent access).
Step 2: Install Prerequisites
Install Apache and PHP:
sudo apt install apache2 libapache2-mod-php php7.4 php7.4-{cli,zip,xml,gd,curl,mbstring,common,bz2,intl,sqlite3} -y
Install MariaDB (MySQL Alternative):
sudo apt install mariadb-server php7.4-mysql -y
Secure MariaDB:
sudo mysql_secure_installation
Set a strong root password and remove unnecessary defaults. Install Additional Dependencies:
sudo apt install unzip wget -y
Step 3: Install Nextcloud
Download Nextcloud:
wget https://download.nextcloud.com/server/releases/latest.zip
Unzip and Move Files:
unzip latest.zip
sudo mv nextcloud /var/www/html/
Set Permissions:
sudo chown -R www-data:www-data /var/www/html/nextcloud
sudo chmod -R 755 /var/www/html/nextcloud
Enable Apache Modules:
sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2
Step 4: Configure the Database
Access MariaDB:
sudo mysql -u root -p
Create Database and User:
CREATE DATABASE nextcloud;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'securepassword';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 5: Complete the Setup in a Browser
- Open a browser on a device connected to the same network.
- Navigate to the Raspberry Pi's IP address followed by /nextcloud, e.g., http://192.168.1.100/nextcloud.
- Follow the on-screen instructions:
- Create an admin account.
- Enter database details:
- Database user: nextclouduser
- Database name: nextcloud
- Password: securepassword
- Finish the setup, and Nextcloud will be ready for use.
Using Nextcloud - Accessing Nextcloud
- Open a browser and enter the Raspberry Pi's IP address (e.g., http://192.168.1.100/nextcloud).
- Log in with the admin account.
- Uploading Files
- After logging in, click on Files.
- Drag and drop files into the browser interface or use the upload button.
Sharing Files
- Right-click on a file and select Share.
- Set permissions for the shared file (e.g., view-only, editing).
- Share via a local link or generate a download link.
Syncing with Devices
- Install the Nextcloud client on your computer or smartphone.
- Connect to your server using its local IP.
- Sync files across devices.
How to Install AbiWord using Offline Resources
To prepare offline resources for installing AbiWord on a Raspberry Pi prior to losing internet access, follow these step-by-step instructions:
Step 1: Understand Dependencies
AbiWord requires various dependencies and libraries to function. Ensuring you have all the required files is crucial for offline installation.
Step 2: Set Up a Working Raspberry Pi
- Prepare a Raspberry Pi with Internet Access:
- Install Raspberry Pi OS on your Pi.
- Ensure it is up-to-date:
sudo apt update
sudo apt upgrade
Install the Required Tools: Install apt-offline to help manage downloading packages for offline use:
sudo apt install apt-offline
Step 3: Gather Information About AbiWord
Check the package details:
apt-cache show abiword
Verify the dependencies:
apt-cache depends abiword
Note all the required dependencies and their versions.
Step 4: Use apt-offline to Prepare for Download
Create an Offline Signature File: Generate a signature file that contains the list of required packages for AbiWord:
apt-offline set abiword.sig --install-packages abiword
- This will create a file named abiword.sig in your current directory.
- Transfer the Signature File to a Computer with Internet Access:
- Use a USB drive or network file sharing to move abiword.sig to an internet-enabled machine.
Step 5: Download Packages on an Internet-Enabled Machine
Install apt-offline on the Other Machine: If using Linux, install apt-offline:
sudo apt install apt-offline
Download the Required Packages: Use apt-offline to download the packages specified in abiword.sig:
apt-offline get abiword.sig --bundle abiword-bundle.zip
This creates a .zip file containing all necessary packages.
Step 6: Transfer and Install Packages
- Transfer the .zip File to the Raspberry Pi: Use a USB drive or network file sharing to move abiword-bundle.zip to your Pi.
- Install the Packages: Use apt-offline to install the packages from the bundle:
apt-offline install abiword-bundle.zip
Verify Installation: Ensure AbiWord is installed correctly:
abiword --version
Step 7: Store and Document the Offline Resources
- Archive the Packages: Save the downloaded .zip file to a dedicated folder for offline resources, e.g., /home/pi/offline-resources/abiword.
- Include Additional Documentation: Save relevant installation guides and AbiWord documentation in the same folder for future reference.
Step 8: Optional - Create a Local Package Repository
Set Up a Local Repository: Create a directory to store packages:
mkdir -p /home/pi/local-repo
Extract the .zip contents:
unzip abiword-bundle.zip -d /home/pi/local-repo
Add the repository to your system:
sudo nano /etc/apt/sources.list.d/local-repo.list
Add this line:
deb [trusted=yes] file:/home/pi/local-repo ./
Update the package list:
sudo apt update
Install AbiWord Using the Local Repository: Install from the local repository without an internet connection:
sudo apt install abiword
How to install Evince using Offline Resources
Here are step-by-step instructions to prepare offline resources for installing Evince (a lightweight PDF reader) on a Raspberry Pi before losing internet access. The process ensures all necessary files and dependencies are downloaded and stored for future offline installation.
Step 1: Prepare the Raspberry Pi
Update the System: Ensure your Raspberry Pi is up-to-date:
sudo apt update
sudo apt upgrade
Install Required Tools: Install apt-offline to manage offline package downloads:
sudo apt install apt-offline
Step 2: Gather Information About Evince
Check the Package Details: Use apt-cache to view package details:
apt-cache show evince
List Dependencies: Identify the dependencies for Evince:
apt-cache depends evince
Note all dependencies and their versions.
Step 3: Create an Offline Signature File
Generate the Signature File: Create a signature file listing the packages required for Evince:
apt-offline set evince.sig --install-packages evince
- This creates a file named evince.sig.
- Transfer the Signature File: Move the evince.sig file to a computer with internet access using a USB drive or network sharing.
Step 4: Download the Packages on an Internet-Enabled Machine
Install apt-offline: On the computer with internet access, ensure apt-offline is installed:
sudo apt install apt-offline
Download the Packages: Use apt-offline to fetch all required packages:
apt-offline get evince.sig --bundle evince-bundle.zip
This creates a .zip file containing all the necessary packages.
Step 5: Transfer and Install Packages
- Transfer the .zip File: Copy evince-bundle.zip back to the Raspberry Pi.
- Install the Packages Offline: Use apt-offline to install the packages from the bundle:
apt-offline install evince-bundle.zip
Verify Installation: Check that Evince is installed and working:
evince --version
Step 6: Store Offline Resources
Archive the Packages: Save the .zip file to a dedicated folder for offline resources:
mkdir -p /home/pi/offline-resources/evince
mv evince-bundle.zip /home/pi/offline-resources/evince
Include Additional Documentation: Save Evince documentation and installation guides in the same folder for future reference.
Step 7: Optional - Create a Local Package Repository
Set Up a Local Repository: Create a directory for the local repository:
mkdir -p /home/pi/local-repo
Extract the .zip contents into the directory:
unzip /home/pi/offline-resources/evince/evince-bundle.zip -d /home/pi/local-repo
Add the repository to the package sources list:
sudo nano /etc/apt/sources.list.d/local-repo.list
Add this line:
deb [trusted=yes] file:/home/pi/local-repo ./
Update the Package List: Refresh the package list to include the local repository:
sudo apt update
Install Evince Using the Local Repository: Install Evince offline from the local repository:
sudo apt install evince
deb [trusted=yes] file:/home/pi/local-repo ./
This line is part of an APT sources list configuration in Linux systems like Ubuntu or Debian. It specifies a local software package repository for the Advanced Package Tool (APT).
Breakdown of the Line
- deb: Indicates that this line refers to a Debian binary package repository. APT will look for .deb files in the specified location.
- [trusted=yes]: Tells APT to trust the repository without requiring a GPG (GNU Privacy Guard) signature for package verification. This is useful for local repositories where you control the source and don't want to manage GPG keys.
- file:/home/pi/local-repo: Specifies the path to the local repository. Here, it points to /home/pi/local-repo on the local filesystem. APT will look in this directory for a Packages index file and the .deb package files.
- ./: Represents the distribution/component to look for within the repository. The ./ indicates the current directory within local-repo.
What This Line Does
- It allows APT to treat the directory /home/pi/local-repo as a package repository.
- Packages from this directory can be installed using sudo apt install <package-name> after running sudo apt update.
How to install Evince from another computer on the same network
To install Evince (a document viewer) on a Raspberry Pi and distribute it offline to other Raspberry Pi computers on the same network, you can follow these steps:
1. Prepare the Raspberry Pi with Internet Access
Use a Raspberry Pi with internet access to download the required packages for Evince and its dependencies.
Step 1.1: Update the Package List
sudo apt update
Step 1.2: Download Evince and Dependencies
Use the apt package manager to download Evince and its dependencies without installing them directly. This ensures all required files are available for offline distribution.
sudo apt-get install --download-only evince
The downloaded .deb files will be stored in the directory /var/cache/apt/archives.
Create a shared directory (e.g., shared_packages) and copy the downloaded files:
mkdir ~/shared_packages
sudo cp /var/cache/apt/archives/*.deb ~/shared_packages
Compress the directory for easier sharing if needed:
tar -czvf shared_packages.tar.gz ~/shared_packages
There are several methods to make the files accessible to other Raspberry Pi devices on the same network:
Option 2.1: Use a Simple Web Server
You can serve the files using Python’s built-in HTTP server:
cd ~/shared_packages
python3 -m http.server 8000
Other Raspberry Pi devices can access the files via http://<IP_ADDRESS>:8000.
Set up a file-sharing service like Samba or NFS to share the ~/shared_packages folder with other Raspberry Pi devices.
Option 2.3: Use SCP or USB
Manually transfer the shared_packages directory to the other Raspberry Pi devices using SCP:
scp -r ~/shared_packages pi@<TARGET_PI_IP>:~
3. Install Evince on Other Raspberry Pi Devices
On the Raspberry Pi devices without internet access, follow these steps:
Step 3.1: Transfer the Files
Ensure the .deb files are available on the target Raspberry Pi (via SCP, USB, or the shared folder).
Step 3.2: Install the Packages
Navigate to the directory containing the .deb files:
cd ~/shared_packages
Install the packages using dpkg:
sudo dpkg -i *.deb
Step 3.3: Fix Missing Dependencies (If Any)
If there are unmet dependencies, use apt to resolve them locally:
sudo apt-get install -f
4. Automate Installation with a Local Repository (Optional)
If you plan to frequently share packages, set up a local APT repository:
Step 4.1: Create a Local Repository
Install the dpkg-dev package:
sudo apt-get install dpkg-dev
Set up the repository:
mkdir ~/myrepo
cp ~/shared_packages/*.deb ~/myrepo
cd ~/myrepo
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Use a web server or file-sharing method to share the myrepo directory.
Step 4.3: Add the Repository on Other Devices
On the other Raspberry Pi devices, add the repository to /etc/apt/sources.list:
echo "deb [trusted=yes] http://<SERVER_IP>:8000/ ./" | sudo tee -a /etc/apt/sources.list
Update the package list:
sudo apt update
Install Evince:
sudo apt install evince
This method ensures that all Raspberry Pi computers on the network can install Evince without requiring individual internet connections.
How to install LUbuntu on USB Memory Stick using Mac Terminal
To burn a copy of Lubuntu onto a USB memory stick for installation on a laptop using a Mac computer, follow these steps:
Step 1: Download the Lubuntu Disk Image
- Visit the Lubuntu official website and download the latest .iso file for Lubuntu.
- Save the file to a known location, such as your Downloads folder.
Step 2: Prepare the USB Drive
- Insert the USB memory stick into your Mac.
- Open Disk Utility (search for it using Spotlight or find it in Applications > Utilities).
- Select your USB drive from the list on the left.
- Click Erase and configure the following:
Format: MS-DOS (FAT32)
Scheme: Master Boot Record (MBR)
Click Erase to format the USB stick.
Step 3: Convert the ISO to a DMG (Optional)
- Mac's built-in tools handle .iso files, but some tools may prefer .dmg. To convert:
- Open the Terminal.
- Run this command:
hdiutil convert -format UDRW -o ~/Downloads/lubuntu.img ~/Downloads/lubuntu.iso
Rename the output file to have a .dmg extension if required for installation on an old Mac
mv ~/Downloads/lubuntu.img.dmg ~/Downloads/lubuntu.dmgStep 4: Write the Disk Image to the USB Drive
In the Terminal, identify your USB drive:
diskutil listLocate your USB drive by its name (e.g., /dev/disk2).
Unmount the USB drive:
diskutil unmountDisk /dev/diskN- Replace /dev/diskN with the identifier for your USB drive (e.g., /dev/disk2).
- Write the ISO to the USB:
sudo dd if=/Users/edmond/Downloads/lubuntu.iso of=/dev/rdiskN bs=1m- Replace /dev/rdiskN with your USB drive identifier. The r in rdiskN speeds up the process. Enter your password when prompted.
- Wait for the process to complete. This might take several minutes, and there will be no progress indicator. Once done, you'll see the command prompt return.
Step 5: Verify and Eject
- Eject the USB drive:
diskutil eject /dev/diskNRemove the USB from your Mac.
Step 6: Install Lubuntu
- Insert the USB drive into the laptop where you want to install Lubuntu.
- Boot from the USB: Access the boot menu (usually by pressing Esc, F12, or another key during startup, depending on your laptop model).
- Select the USB drive as the boot device.
- Follow the Lubuntu installation instructions.
Notes
- Use Etcher (Optional): If you prefer a graphical tool, download Balena Etcher, which simplifies creating bootable USB drives.
- Backup Data: Writing an image will erase all data on the USB drive. Ensure you’ve backed up any important files.
- Mac Users with M1/M2 Chips: Bootable USBs can still be created using the same process, but installation on ARM laptops may require an ARM-compatible OS version.
What is Kolibri
Kolibri is an open-source educational platform developed by Learning Equality. It is designed to provide offline access to high-quality educational resources, making it particularly useful in areas with limited or no internet connectivity. Kolibri can host a variety of content, including interactive lessons, videos, quizzes, and textbooks, and is widely used in schools, community centers, and informal learning environments.
Key Features of Kolibri:
- Offline Access: Operates without the need for an active internet connection after the content has been downloaded.
- Curated Content: Offers educational resources from renowned providers such as Khan Academy, CK-12, and PhET.
- Multi-User Support: Provides role-based access for learners, educators, and administrators.
- Customizable Lessons: Allows educators to create and assign lessons tailored to the needs of their students.
- Analytics: Offers tools to track student progress and engagement.
- Lightweight: Designed to run on low-powered devices, including the Raspberry Pi.
Using Kolibri on a Raspberry Pi
Kolibri is ideal for deployment on a Raspberry Pi, enabling it to act as a local server for offline educational access in classrooms or community learning centers.
Requirements:
- A Raspberry Pi 3, 4, or later (Raspberry Pi 4 is recommended for better performance).
- A power supply and storage device (SD card or external storage) with at least 16GB capacity for content.
- Optional: A Wi-Fi router to enable learners to connect to the Kolibri server on the Raspberry Pi.
Steps to Install and Use Kolibri on Raspberry Pi:
- Prepare the Raspberry Pi: Install a compatible operating system, such as Raspberry Pi OS.
- Ensure the system is updated:
sudo apt update && sudo apt upgrade -y2. Install Kolibri:
- Add the Learning Equality repository:
echo "deb [trusted=yes] https://learningequality.org/r/debian/ ./" | sudo tee /etc/apt/sources.list.d/learningequality.list- Install Kolibri:
sudo apt update
sudo apt install kolibri3. Start the Kolibri Server:
- Launch Kolibri:
kolibri start- Access Kolibri in a browser by navigating to http://<Raspberry_Pi_IP_Address>:8080.
4. Download Content:
- Use the Kolibri interface to import educational content. This can be done from:
- Kolibri Studio (online repository).
- Local storage if content has been pre-downloaded.
5. Set Up the Learning Environment:
- Configure user roles for teachers and students.
- Teachers can create lessons, assign resources, and monitor student progress.
6. Enable Offline Connectivity:
- If deploying in a classroom, connect the Raspberry Pi to a Wi-Fi router.
- Learners can access Kolibri by connecting their devices to the same network and entering the Raspberry Pi’s IP address in a browser.
Use Cases:
- Schools in Remote Areas: Acts as a self-contained learning system where students and teachers access resources locally.
- Libraries or Community Centers: Provides access to a wide array of educational materials to the public.
- Disaster Recovery and Emergency Education: Serves as a portable, robust solution for education in emergencies.
Kolibri on a Raspberry Pi provides a powerful, affordable, and scalable way to deliver quality education anywhere.
Downloading content for Kolibri
The amount of content you need to download depends on the specific educational materials and subjects you wish to include. Kolibri allows you to selectively download content from Kolibri Studio or other repositories. Here are some general content sizes:
- Basic Collections:
- Khan Academy Lite: Approximately 30–50 GB for a full collection, but smaller subsets (e.g., Math for Grades 1–6) might only be a few GB.
- CK-12 Foundation: Modules typically range from hundreds of MB to several GB.
- PhET Simulations: A complete set might be around 1 GB.
- Custom Downloads: Kolibri Studio allows you to choose specific topics, grades, or even individual resources. This can significantly reduce storage requirements if only targeted content is needed.
Storing Content on an External Storage Device
Kolibri can store its content on an external storage device, which is particularly useful for managing larger content libraries without overloading the Raspberry Pi’s SD card. Here’s how you can configure Kolibri to use external storage:
Steps to Configure External Storage:
- Attach the External Storage Device: Connect a USB drive or external hard drive to the Raspberry Pi.
- Ensure it is formatted with a compatible file system (e.g., ext4, FAT32, or NTFS).
- Find the Mount Path: Check the device’s mount path using:
lsblk- Example: /media/pi/your_drive_name.
3. Stop Kolibri: Before changing the storage location, stop the Kolibri server:
kolibri stop4. Update Kolibri’s Configuration:
- Edit the Kolibri options file:
sudo nano /home/pi/.kolibri/options.ini- Add or update the CONTENT_STORAGE_DIR parameter to point to the external storage location. For example:
[Paths]
CONTENT_STORAGE_DIR = /media/pi/your_drive_name/kolibri_content5. Move Existing Content (if necessary):
- If you’ve already downloaded content, move it to the new location:
mv /home/pi/.kolibri/content /media/pi/your_drive_name/kolibri_content6. Restart Kolibri: Start the Kolibri server again:
kolibri startAdvantages of Using External Storage:
- Scalability: Easily upgrade to larger drives as needed.
- Performance: High-speed external drives can improve response times when serving content to multiple users.
- Preservation: External storage can be moved between devices or used as a backup.
By storing content on an external device, you ensure that the Raspberry Pi’s internal storage remains free for system operations while accommodating extensive educational materials.