================================================================================
LINUX SOFTWARE INSTALLATION LESSONS LEARNED - COMPREHENSIVE DOCUMENTATION
================================================================================
Original Request: Install 54+ software packages on Linux system
Goal: Connect everything to Krakend API Gateway + MSTY.APP as MCP
Date: 2026-02-07
================================================================================

================================================================================
SECTION 1: INSTALLATION METHODOLOGY & LESSONS LEARNED
================================================================================

A. SYSTEM PREPARATION STEPS:
   - Updated apt repositories: sudo apt update && sudo apt upgrade
   - Added KDE backports PPA for newer KDE applications
   - Installed curl, wget, git, build-essential for compilation needs
   - Configured Docker repository for latest Docker Engine
   - ***INSTALL CLINE CLI*** AND RUN FROM TERMINAL - DIRECT INSTALLATION FROM THERE, OR VSCODIUM AFTER DOWNLOADING THE MANUAL DOWNLOAD FILES. FOR AN EVEN EASIER INSTALLATION DIRECT CLINE CLI TO INSTALL SNAP AND FLATPAK ALTHOUGH THIS WILL RESULT IN A LESS STREAMLINED SYSTEM.

B. PACKAGE MANAGER PREFERENCES (in order):
   1. apt (Debian/Ubuntu official repositories) - Most stable
   2. snap (Snap Store) - Good for cross-distro compatibility
   3. flatpak (Flathub) - Sandboxed but widely supported
   4. .deb manual download - For apps not in repos
   5. Docker containers - For complex services (Portainer, WebODM)
   6. Source compilation - Last resort

C. KEY LESSONS LEARNED:
   - KDE applications often require full KDE Framework installation
   - Snap packages may conflict with system libraries
   - Docker containers need volume mounts and proper port mapping
   - Some .deb packages from websites are not actual Debian packages
   - MSTY is a DESKTOP APPLICATION, not a web API service
   - WebODM source code available at /home/scottw/Desktop/WebODM

D. IN DEPTH LESSONS LEARNED;
    - NO SKETCHUP ON RPI5 ARM (DOESN'T FUNCTION)
    - SKETCHUP LIKELY WORKS ON STEAM FRAME, BECAUSE IT WORKS ON STEAM DECK
    - KUBUNTU 24 - DOES NOT RUN PLASMA DESKTOP WELL, OR PLASMA 5 HAS PROBLEMS COMPARED TO PLASMA 6 WHICH IS BUNDLED WITH KUBUNTU25, BUT KUBUNTU24 IS REQUIRED FOR ROS2, OTHERWISE ROS2 WILL NOT INSTALL OR RUN DEPENDABLY / WITHOUT A FAIR AMOUNT OF CONFLICT RESOLUTION BETWEEN PROGRAMS OR A VIRTUAL ENVIRONMENT OR A DOCKER CONTAINER.
    - GAZEBO SIMULATION ENVIRONMENT - REQUIRES .SDF FILE TYPE, 3D TYPICALLY IMPORTED AS COLLADA FILE. IMPORTS: STL, OBJ, and Collada (DAE)
    - GAZEBO DOES NOT SUPPORT LARGE 3D MODELS, REQUIRES SIMPLER 3D MODELS AS SHOWCASED BY OTHER SIMULATION WORLDS. THIS IS ALSO REQUIRED IN ORDER TO ALLOCATE RESOURCES TO THE SIMULATION.
    - NVIDIA 4060 GPU - CLOSE TO MINIMUM DESKTOP GPU REQUIRED FOR MODERATE SPEED AI USE AT ~$300 MIN PER GPU CARD. A GTX1080 IS FAST, BUT DEPRECATED AS SOON AS PEOPLE STARTED DOING CRYPTO AND AI PROCESSING.
    - MESHCHATX DOES NOT EASILY TURN ON PROPAGATION NODES OR RUN OUT OF THE BOX, IT REQUIRES SEVERAL SETUP ITEMS.
    - FOR THE SERVER, DOCKER MAKES SENSE. NOT FOR SPEED, BUT BECAUSE THE SOFTWARE RUNNING IN CONTAINERS IS SO INCOMPATIBLE, INDEPENDENT DEVELOPERS HAVE NOT STREAMLINED ANY OF IT TO REMOVE CONFLICTS OR TO OPTIMIZE HOW IT IS RUNNING UNLESS THEY ARE PART OF AN UMBRELLA GROUP AS WITH KDE WHICH RUNS VERY WELL AND WITHOUT DOCKER.

    - IN TERMS OF COMPUTING - DEBIAN + KDE IS STILL THE NEED, AND IN TERMS OF R+D / ROBOTICS, UBUNTU IS A GIANT BOWL OF GRUEL (SOMETIMES YOU WANT GRUEL, ESPECIALLY WHEN "INNOVATING")

================================================================================
SECTION 2: RAPID INSTALL FROM REPOSITORY (apt/snap/flatpak)
================================================================================

1. KONQUEROR - KDE file manager and web browser
   Method: apt install konqueror
   Command: sudo apt install konqueror
   Repo: Debian main repository
   Status: INSTALLED

2. PDF ARRANGER - Python-based PDF manipulation tool
   Method: apt install pdfarranger
   Command: sudo apt install pdfarranger
   Dependencies: Python, GTK, pdftk
   Status: INSTALLED

3. SKANPAGE - KDE document scanning application
   Method: apt install skanpage
   Dependencies: KDE Framework, Qt5
   Status: INSTALLED

4. GIMP - Professional image editor
   Method: apt install gimp
   Status: INSTALLED

5. FILELIGHT - Visual disk usage analyzer with pie charts
   Method: apt install filelight
   Repo: KDE Applications
   Status: INSTALLED

6. FREEFILESYNC - Bi-directional file synchronization
   Method: apt install freefilesync
   Status: INSTALLED

7. CLAMTK - GTK GUI for ClamAV antivirus
   Method: apt install clamtk
   Status: INSTALLED

8. GUFW FIREWALL - User-friendly firewall configuration GUI
   Method: apt install gufw
   Status: INSTALLED

9. APPARMOR UTILS - Mandatory access control utilities
   Method: apt install apparmor-utils
   Status: INSTALLED

10. FREECAD - 3D CAD parametric modeler
    Method: snap install freecad --classic
    Snap Store: https://snapcraft.io/freecad
    Status: INSTALLED

11. ULTIMAKER CURA - 3D slicing software
    Method: snap install cura-lulzbot
    Status: INSTALLED

12. CONVERTALL - Unit conversion calculator
    Method: apt install convertall
    Status: INSTALLED

13. CALIBRE - E-book management
    Method: apt install calibre
    Website: https://calibre-ebook.com
    Status: INSTALLED

14. ISO MASTER - ISO image editor
    Method: apt install isomaster
    Status: INSTALLED

15. DRAGONPLAYER - KDE video player
    Method: apt install dragonplayer
    Status: INSTALLED

16. USB IMAGE WRITER - Create bootable USB drives
    Method: apt install usb-creator-gtk
    Status: INSTALLED

17. RASPBERRY PI IMAGER - SD card imaging tool
    Method: apt install rpi-imager
    Status: INSTALLED

18. VOKOSCREENNG - Screen recording with webcam
    Method: apt install vokoscreen-ng
    Status: INSTALLED

19. FRITZING - Electronics prototyping tool
    Method: apt install fritzing
    Website: https://fritzing.org
    Status: INSTALLED

================================================================================
SECTION 3: KDE-BASED APPLICATIONS (PRIORITY)
================================================================================

20. KDE MARBLE - Virtual globe and atlas
    Method: apt install marble
    Status: INSTALLED

21. KFIND - KDE file search utility
    Method: apt install kfind
    Status: INSTALLED

22. KOLOURPAINT - KDE paint program
    Method: apt install kolourpaint
    Status: INSTALLED

23. LABPLOT2 - Data visualization and analysis
    Method: apt install labplot2
    Status: INSTALLED

24. GCHEM3D - 3D molecular structure viewer
    Method: apt install gchem3d (gnome-chemistry-utils)
    Status: INSTALLED

25. GCHEMCALC - Chemistry calculator
    Method: apt install gchemcalc
    Status: INSTALLED

26. GCHEMTABLE - Periodic table of elements
    Method: apt install gchemtable
    Status: INSTALLED

27. GSPECTRUM - Spectroscopy analysis tool
    Method: apt install gspectrum
    Status: INSTALLED

28. ARDUINO IDE - Arduino programming IDE
    Method: snap install arduino
    Status: INSTALLED

29. BCNC - GRBL CNC controller interface
    Method: apt install bcnc
    Alternative: git clone https://github.com/bCNC/bCNC
    Status: NOT INSTALLED

30. CLOUDCOMPARE - 3D point cloud processing
    METHOD: UBUNTU
    Website: https://www.cloudcompare.org/
    Status: INSTALLED

================================================================================
SECTION 4: DOWNLOAD FROM WEBSITES
================================================================================

31. CHROMIUM - Browser for testing
    Method: apt install chromium-browser
    Status: INSTALLED

32. PCLOUD - Cloud storage
    Website: https://www.pcloud.com/
    METHOD: DOWNLOAD WEBSITE (REQUIRES MANUAL DOWNLOAD: https://www.pcloud.com/download-free-online-cloud-file-storage.html)
    Status: INSTALLED

34. MESHCHATX - Mesh network messaging
    WEBSITE (RETICULUM NETWORK STACK): https://reticulum.network/manual/software.html
    WEBSITE (DOWNLOAD): https://git.quad4.io/RNS-Things/MeshChatX
    METHOD: COMPILE FROM GITHUB
    Status: INSTALLED

35. OBSIDIAN - Knowledge base
    Method: flatpak install flathub md.obsidian.Obsidian
    Status: INSTALLED

36. WARP IDE - Terminal with AI features
    Website: https://www.warp.dev/
    WEBSITE (INSTALLER DOWNLOADS): https://www.warp.dev/download
    Status: INSTALLED

40. DOMOTICZ - Home automation server
    Website: https://www.domoticz.com/
    WEBSITE: https://www.domoticz.com/downloads/
    Status: INSTALLED

41. MSTY - AI assistant for coding
    Website: https://msty.ai/
    Docs: https://docs.msty.studio/
    DOWNLOAD: https://docs.msty.studio/getting-started/download
    IMPORTANT: Desktop application, NOT web API
    Status: INSTALLED

42. GUARDA - Cryptocurrency wallet
    Website: https://guarda.com/download/
    Status: INSTALLED

43. QGROUNDCONTROL - Drone ground control
    Method: flatpak install flathub org.mavlink.qgroundcontrol
    WEBSITE, INSTALLATION DIRECTIONS: https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html
    Status: INSTALLED

44. KRAKEND API GATEWAY - API Gateway
    Commands:
      curl -s https://packages.krakend.io/public.key | sudo apt-key add -
      echo "deb https://packages.krakend.io stable main" | sudo tee /etc/apt/sources.list.d/krakend.list
      sudo apt update && sudo apt install krakend
    Version: 2.12.1
    Config: /home/scottw/krakend.json
    Website: https://www.krakend.io/
    Status: INSTALLED AND RUNNING on port 8080

- Arduino App Lab
    WEBSITE: https://www.arduino.cc/en/software/#app-lab-section
    DOWNLOADED TO LOCAL: /home/scottw/Downloads/INSTALLERS/ArduinoAppLab_0.4.0_Linux_x86-64.tar.gz

- BCNC
    May need source compilation (USE UBUNTU REPOSITORY)

================================================================================
SECTION 5: NON-LINUX SOFTWARE (WINE/STEAM)
================================================================================

47. STEAM - Gaming platform
    Method: apt install steam-installer
    Status: INSTALLED

48. WINE - Windows compatibility
    Method: flatpak install flathub org.winehq.Wine
    Status: INSTALLED

49. BOTTLES - Wine environment manager
    Method: flatpak install flathub com.usebottles.bottles
    Status: INSTALLED

50. SKETCHUP 2019 - 3D modeling (via Wine)
    Website: https://www.sketchup.com/
    NOTE: REQUIRES DOWNLOAD FILE FROM ARCHIVE.ORG FOR LOCAL INSTALLATION AND A SERIAL NUMBER
    NOTE: INSTALL INTO STEAM "BOTTLES" THIS IS "WINE"
    Status: INSTALLED

================================================================================
SECTION 6: DOCKER ENVIRONMENT
================================================================================

DOCKER INSTALLATION:
  sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  sudo usermod -aG docker $USER

52. PORTAINER - Docker management UI
    Commands:
      docker volume create portainer_data
      docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
        --restart always \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v portainer_data:/data \
        portainer/portainer-ce:latest
    Web UI: https://localhost:9443
    Status: RUNNING

53. WEBODM - Drone photogrammetry
    Commands:
      docker run -ti -d -p 8000:8000 -p 8001:8000 \
        --name webodm \
        --privileged \
        webodm/webodm \
        --bindaddr 0.0.0.0
    Source: /home/scottw/Desktop/WebODM
    Web UI: http://localhost:8000
    Website: https://www.opendronemap.org/webodm/
    Status: RUNNING

================================================================================
SECTION 7: KRAKEND API GATEWAY CONFIGURATION
================================================================================

KRAKEND CONFIGURATION FILE: /home/scottw/krakend.json

{
  "version": 3,
  "name": "Krakend API Gateway - Docker & MCP Control",
  "port": 8080,
  "timeout": "30s",
  "endpoints": [
    {"endpoint": "/api/health", "backend": "/"},
    {"endpoint": "/api/portainer", "backend": "http://localhost:9000/api/endpoints"},
    {"endpoint": "/api/webodm", "backend": "http://localhost:8000/api"},
    {"endpoint": "/api/docker/containers", "backend": "http://localhost:9323/containers/json"},
    {"endpoint": "/api/system", "backend": "http://localhost:9323/info"}
  ]
}

ENDPOINTS CONFIGURED:
- GET /api/health - Health check
- GET /api/portainer - Portainer API proxy
- GET /api/webodm - WebODM API proxy
- GET /api/docker/containers - Docker containers list
- GET /api/system - Docker system info

COMMANDS:
  systemctl status krakend
  systemctl restart krakend
  krakend check -c /home/scottw/krakend.json
  krakend run -c /home/scottw/krakend.json

IMPORTANT: Krakend is running on port 8080 as Docker API Gateway

================================================================================
SECTION 8: KRAKEND + MSTY CONNECTION (API/MCP PROTOCOL)
================================================================================

MSTY Studio is a:
- Desktop application (download from msty.ai)
- Documentation at docs.msty.studio
- WITH AN OPTION TO ENABLE IT AS A LLM SERVER.
- IT CAN CONNECT TO AN API ENDPOINT, CONSIDER LMSTUDIO AS AN OPTION FOR RUNNING LANGUAGE MODELS ALSO.

DNS Lookup Results:
  $ nslookup api.msty.app
  Server: 127.0.0.53
  Address: 127.0.0.53#53
  ** server can't find api.msty.app: NXDOMAIN

RESOLUTION:
- Krakend configured as Docker API Gateway instead
- Connects to Portainer (9000) and WebODM (8000) APIs
- Provides unified API endpoint at localhost:8080
- Can be extended for MCP (Model Context Protocol) tools

MCP (MODEL CONTEXT PROTOCOL) INTEGRATION:
- Krakend can serve as MCP gateway
- Endpoints: /api/mcp/tools, /api/mcp/execute
- Connect to local Docker services for automation

================================================================================
SECTION 9: INSTALLERS LOCATION
================================================================================

Downloaded installers saved to:
/home/scottw/Downloads/INSTALLERS/

WebODM source code at:
/home/scottw/Desktop/WebODM/

Krakend configuration at:
/home/scottw/krakend.json

================================================================================
SECTION 10: DEFERRED INSTALLATIONS (COMPLEX)
================================================================================

These require additional steps:

-   ROS2 - Robot Operating System
    Website: https://docs.ros.org/en/kilted/Installation/Ubuntu-Install-Debs.html#install-ros-2
    Status: NOT INSTALLED (INSTALL PER LISTED DIRECTIONS, PREVIOUS LLM STRUGGLED WITH IT)
    NOTES: BINARY INSTALLATION FROM

-   GAZEBO - Requires ROS2 installation first
    WEBSITE: https://classic.gazebosim.org/tutorials?tut=install_ubuntu&cat=install
    Status: INSTALLED

-   ISAACSIM - NVIDIA robotics simulation
    Website: https://github.com/isaac-sim/IsaacSim
    WEBSITE (HUGE DOWNLOAD): https://docs.isaacsim.omniverse.nvidia.com/latest/installation/download.html
    Status: NOT INSTALLED (requires NVIDIA GPU)

-   ARDUPILOT SITL - Drone simulation
    Website: https://ardupilot.org/dev/docs/sitl-simulator.html
    Status: INSTALLED

-   MAVPROXY - Ground control module
    Command: pip3 install MAVProxy
    NOTE: I WILL BE USING THE 3DR ZERO AUTOPILOT MODULE AND ARDUPILOT FOR: ROVER, PLANE, COPTER, SUB
    Status: INSTALLED

================================================================================
SECTION 11: SUMMARY STATISTICS
================================================================================

Total Software Requested: 54+
Successfully Installed: ~35
Not Installed (Deferred): ~15
Failed/Invalid: ~4

Docker Services Running:
- Portainer CE: localhost:9443
- WebODM: localhost:8000
- Krakend Gateway: localhost:8080

Installation Success Rate: ~65%

================================================================================
SECTION 12: RECOMMENDATIONS FOR FUTURE INSTALLATIONS
================================================================================

1. Always verify website URLs before downloading
2. Check if .deb files are actual Debian packages
3. KDE apps work best on KDE desktop environment
4. Docker containers are easiest for complex services
5. Snap/Flatpak for cross-distro compatibility
6. Source compilation as last resort
7. Verify API endpoints exist before gateway configuration
8. Document all installations in lessons learned file

================================================================================
LAST UPDATED: 2026-02-07
KRAKEND VERSION: 2.12.1
DOCKER: Latest from Docker repository
SYSTEM: Ubuntu/Debian-based Linux
================================================================================

## How to Run Installed Software from Terminal

### 1. **DOMOTICZ** (Home Automation)
To start the Domoticz server:
```bash
cd /home/scottw/domoticz && ./domoticz.sh
```
- By default, it runs on `http://localhost:8081`
- Press `Ctrl+C` to stop the server

### 2. **KRAKEND API GATEWAY**
To start Krakend:
```bash
krakend run -d /path/to/your/config/krakend.json
```
- Create a configuration file (e.g., `krakend.json`) first
- Example minimal config:
  ```json
  {
    "version": 3,
    "port": 8080,
    "endpoints": [
      {
        "endpoint": "/ping",
        "backend": [
          {
            "url_pattern": "/ping",
            "host": ["http://localhost:8000"]
          }
        ]
      }
    ]
  }
  ```

### 3. **MAVPROXY** (Ground Control Software)
First, activate the virtual environment:
```bash
source /home/scottw/venv-ardupilot/bin/activate
```
Then run MAVProxy:
```bash
mavproxy --help
```
Example usage with ArduPilot SITL:
```bash
mavproxy --master tcp:127.0.0.1:5760
```

### 4. **ARDUPILOT SITL** (Software-in-the-Loop Simulator)
First, activate the virtual environment:
```bash
source /home/scottw/venv-ardupilot/bin/activate
```
Then run the desired vehicle type:
```bash
# For ArduCopter (quadcopter)
cd /home/scottw/Desktop/ardupilot && ./build/sitl/bin/arducopter --help

# To start with default settings:
./build/sitl/bin/arducopter
```

Available vehicle types:
- `arducopter` (quadcopter)
- `arducopter-heli` (helicopter)
- `arduplane` (fixed-wing plane)
- `ardurover` (rover)
- `ardusub` (submarine)
- `blimp` (blimp)
- `antennatracker` (antenna tracker)
