From cc3adf7e4edfb1ca316b3441dddbb1c61aca6873 Mon Sep 17 00:00:00 2001 From: nearxos Date: Fri, 9 Jan 2026 09:57:35 +0200 Subject: [PATCH] Add KDE Plasma installation guide and revert documentation --- chromium-setup/KDE-INSTALLATION-GUIDE.md | 258 ++++++++++++++++++ chromium-setup/KDE-INSTALLATION-SUMMARY.md | 210 ++++++++++++++ chromium-setup/TOUCHSCREEN-DESKTOP-OPTIONS.md | 256 +++++++++++++++++ chromium-setup/revert-to-lxde.sh | 46 ++++ 4 files changed, 770 insertions(+) create mode 100644 chromium-setup/KDE-INSTALLATION-GUIDE.md create mode 100644 chromium-setup/KDE-INSTALLATION-SUMMARY.md create mode 100644 chromium-setup/TOUCHSCREEN-DESKTOP-OPTIONS.md create mode 100755 chromium-setup/revert-to-lxde.sh diff --git a/chromium-setup/KDE-INSTALLATION-GUIDE.md b/chromium-setup/KDE-INSTALLATION-GUIDE.md new file mode 100644 index 0000000..0e56f84 --- /dev/null +++ b/chromium-setup/KDE-INSTALLATION-GUIDE.md @@ -0,0 +1,258 @@ +# KDE Plasma Installation and Revert Guide for reTerminal DM4 + +## Device Information +- **Model**: Raspberry Pi Compute Module 4 (CM4) +- **CPU**: Cortex-A72 (4 cores) +- **RAM**: 8GB +- **Current Desktop**: LXDE with Openbox +- **Display**: 10-inch, 1280x800 + +## Pre-Installation State + +### Current Desktop Packages +- libobrender32v5 +- libobt2v5:arm64 +- lxsession +- lxsession-data +- lxsession-logout +- openbox +- pcmanfm + +### Current Session Manager +- Default: `/usr/bin/startx-rpd` (priority 90) +- Available: `/usr/bin/lxsession` (priority 49) +- Available: `/usr/bin/openbox-session` (priority 40) +- Current mode: auto (points to startx-rpd) + +### Available Desktop Sessions +- lightdm-xsession.desktop +- openbox.desktop +- rpd-x.desktop + +### Installation Date +- Date: 2026-01-09 + +--- + +## Installation Steps + +### Step 1: Update System +```bash +sudo apt-get update +sudo apt-get upgrade -y +``` + +### Step 2: Install KDE Plasma +```bash +# Install KDE Plasma desktop (lightweight version) +sudo apt-get install -y kde-plasma-desktop + +# Install on-screen keyboard for touchscreen +sudo apt-get install -y maliit-keyboard + +# Install additional KDE utilities +sudo apt-get install -y kde-standard +``` + +### Step 3: Configure Default Desktop + +**Option A: Switch at Login (Recommended - Safest)** +1. Log out of current session +2. At login screen, click on the session/desktop selector (usually in top-right corner) +3. Select "Plasma (X11)" or "plasmax11" +4. Log in + +**Option B: Set as Default** +```bash +# Set KDE as default desktop session +sudo update-alternatives --config x-session-manager +# Select: /usr/bin/startplasma-x11 (priority 40) +``` + +**Note**: KDE Plasma X11 session is available at `/usr/share/xsessions/plasmax11.desktop` + +### Step 4: Configure Touchscreen Settings + +After logging into KDE: + +1. **Enable On-Screen Keyboard:** + - System Settings > Input Devices > Virtual Keyboard + - Enable "Show on-screen keyboard when needed" + +2. **Adjust Touch Settings:** + - System Settings > Input Devices > Touchpad/Touchscreen + - Adjust touch sensitivity + - Enable tap-to-click + +3. **UI Scaling for Touch:** + - System Settings > Display and Monitor + - Set scale to 125% or 150% for better touch targets + +4. **Disable Heavy Effects (for better performance):** + - System Settings > Workspace Behavior > Desktop Effects + - Disable resource-intensive effects + - Keep basic animations enabled + +### Step 5: Reboot +```bash +sudo reboot +``` + +--- + +## Post-Installation Verification + +After reboot, verify KDE is working: +```bash +echo $XDG_CURRENT_DESKTOP +# Should show: KDE or plasma + +ps aux | grep -i plasma +# Should show KDE processes running +``` + +--- + +## Reverting to LXDE + +### Method 1: Switch at Login Screen (Easiest) + +1. Log out of current session +2. At the login screen, click on the session/desktop selector (usually top-right) +3. Select "Openbox" or "RPD-X" session +4. Log in + +### Method 1b: Use Revert Script + +A revert script is provided: `revert-to-lxde.sh` +```bash +# Copy script to device and run +./revert-to-lxde.sh +``` + +### Method 2: Change Default Session + +```bash +# Set LXDE as default +sudo update-alternatives --config x-session-manager +# Select LXDE option (usually /usr/bin/startlxde or similar) +``` + +### Method 3: Remove KDE (Complete Revert) + +If you want to completely remove KDE: + +```bash +# Remove KDE packages +sudo apt-get remove --purge kde-plasma-desktop kde-standard +sudo apt-get autoremove -y +sudo apt-get autoclean + +# Restore LXDE as default +sudo update-alternatives --config x-session-manager +# Select LXDE + +# Reboot +sudo reboot +``` + +### Method 4: Reinstall LXDE (if removed) + +If LXDE was accidentally removed: + +```bash +sudo apt-get update +sudo apt-get install --reinstall lxde +sudo update-alternatives --config x-session-manager +``` + +--- + +## Troubleshooting + +### KDE Won't Start +```bash +# Check if KDE is installed +dpkg -l | grep kde-plasma + +# Check available sessions +ls /usr/share/xsessions/ + +# Try starting KDE manually +startplasma-wayland +# or +startplasma-x11 +``` + +### Performance Issues +- Disable desktop effects in System Settings +- Reduce animation duration +- Use X11 instead of Wayland (if Wayland is causing issues) + +### Touchscreen Not Working +```bash +# Check touchscreen device +xinput list + +# Calibrate touchscreen +sudo apt-get install xinput-calibrator +xinput_calibrator +``` + +### Chromium Autostart Issues +Your existing Chromium autostart configuration should work with KDE. +If it doesn't, check: +```bash +cat ~/.config/autostart/chromium-kiosk.desktop +``` + +--- + +## Performance Notes + +- **Expected RAM Usage**: 400-800MB for KDE Plasma +- **Expected CPU Usage**: Low to moderate (Cortex-A72 handles it well) +- **Boot Time**: Slightly longer than LXDE (~10-15 seconds more) + +--- + +## Files Modified/Created + +- `/usr/share/xsessions/` - Desktop session files +- `~/.config/plasma-org.kde.plasma.desktop-appletsrc` - KDE panel configuration +- `~/.config/kwinrc` - Window manager settings +- `~/.config/plasmarc` - Plasma settings + +--- + +## Backup Before Installation + +To create a backup of current desktop settings: +```bash +# Backup current desktop configuration +mkdir -p ~/desktop-backup +cp -r ~/.config/lx* ~/desktop-backup/ 2>/dev/null +cp -r ~/.config/openbox ~/desktop-backup/ 2>/dev/null +``` + +--- + +## Rollback Checklist + +If you need to revert: +- [ ] Switch session at login screen (easiest) +- [ ] Change default session via update-alternatives +- [ ] Remove KDE packages if needed +- [ ] Verify LXDE is working +- [ ] Check Chromium autostart still works +- [ ] Verify touchscreen calibration + +--- + +## Support + +If you encounter issues: +1. Check system logs: `journalctl -xe` +2. Check X/Wayland logs: `~/.xsession-errors` +3. Verify packages: `dpkg -l | grep kde` +4. Check available sessions: `ls /usr/share/xsessions/` diff --git a/chromium-setup/KDE-INSTALLATION-SUMMARY.md b/chromium-setup/KDE-INSTALLATION-SUMMARY.md new file mode 100644 index 0000000..0403d70 --- /dev/null +++ b/chromium-setup/KDE-INSTALLATION-SUMMARY.md @@ -0,0 +1,210 @@ +# KDE Plasma Installation Summary + +## Installation Status: ✅ COMPLETE + +**Date**: 2026-01-09 +**Device**: Raspberry Pi Compute Module 4 (8GB RAM) +**Previous Desktop**: LXDE with Openbox +**New Desktop**: KDE Plasma (X11) + +--- + +## What Was Installed + +### Core Packages +- ✅ `kde-plasma-desktop` - KDE Plasma desktop environment +- ✅ `maliit-keyboard` - On-screen keyboard for touchscreen +- ✅ Additional KDE components and dependencies + +### Available Sessions +- ✅ **Plasma (X11)** - `/usr/share/xsessions/plasmax11.desktop` +- ✅ **LXDE/Openbox** - Still available for revert +- ✅ **RPD-X** - Original Raspberry Pi desktop + +--- + +## Current System State + +### Session Manager Status +- **Current Default**: `/usr/bin/startx-rpd` (LXDE - unchanged) +- **KDE Available**: `/usr/bin/startplasma-x11` (priority 40) +- **LXDE Available**: `/usr/bin/lxsession` (priority 49) + +### Backup Created +- ✅ Desktop configuration backed up to: `~/desktop-backup/` +- ✅ Session manager configuration saved + +--- + +## How to Use KDE Plasma + +### First Time Setup + +1. **Log out of current session** + ```bash + # Or simply reboot + sudo reboot + ``` + +2. **At login screen:** + - Look for session/desktop selector (usually top-right corner) + - Click and select **"Plasma (X11)"** or **"plasmax11"** + - Enter credentials and log in + +3. **First boot into KDE:** + - KDE will initialize (may take 30-60 seconds first time) + - You may see a welcome screen - you can skip it + - Desktop will appear with KDE panel + +4. **Configure for Touchscreen:** + - System Settings > Input Devices > Virtual Keyboard + - Enable "Show on-screen keyboard when needed" + - System Settings > Display and Monitor + - Set scale to 125% or 150% for better touch targets + - System Settings > Workspace Behavior > Desktop Effects + - Disable heavy effects for better performance + +--- + +## Chromium Autostart + +Your existing Chromium autostart configuration will work with KDE: +- ✅ File: `~/.config/autostart/chromium-kiosk.desktop` +- ✅ Script: `~/start-chromium.sh` + +Chromium will start automatically when KDE desktop loads. + +--- + +## Reverting to LXDE + +### Quick Method (Recommended) +1. Log out +2. At login screen, select "Openbox" or "RPD-X" session +3. Log in + +### Using Revert Script +```bash +# Copy revert-to-lxde.sh to device +scp revert-to-lxde.sh pi@10.130.60.253:~/ +ssh pi@10.130.60.253 "chmod +x ~/revert-to-lxde.sh && ~/revert-to-lxde.sh" +``` + +### Manual Revert +```bash +sudo update-alternatives --config x-session-manager +# Select: /usr/bin/startx-rpd or /usr/bin/lxsession +``` + +--- + +## Performance Expectations + +### RAM Usage +- **LXDE**: ~200-300MB +- **KDE Plasma**: ~400-800MB +- **Available**: ~6.7GB (plenty of headroom) + +### CPU Usage +- **Idle**: Low (< 5%) +- **Active**: Moderate (10-30%) +- **Heavy tasks**: May see some lag on Cortex-A72 + +### Boot Time +- **LXDE**: ~20-30 seconds +- **KDE Plasma**: ~30-45 seconds (first boot may be longer) + +--- + +## Troubleshooting + +### KDE Won't Start +```bash +# Check if installed +dpkg -l | grep kde-plasma + +# Check available sessions +ls /usr/share/xsessions/ + +# Try manual start (if logged in via SSH) +DISPLAY=:0 startplasma-x11 +``` + +### Performance Issues +- Disable desktop effects: System Settings > Workspace Behavior > Desktop Effects +- Reduce animations: System Settings > Workspace Behavior > General Behavior +- Use X11 (already configured) instead of Wayland + +### Touchscreen Issues +```bash +# Check touchscreen device +xinput list + +# Calibrate if needed +sudo apt-get install xinput-calibrator +xinput_calibrator +``` + +### Chromium Not Starting +- Check autostart file: `cat ~/.config/autostart/chromium-kiosk.desktop` +- Check script: `cat ~/start-chromium.sh` +- Manual test: `DISPLAY=:0 ~/start-chromium.sh` + +--- + +## Files and Locations + +### Configuration Files +- KDE config: `~/.config/plasma*` +- KDE panel: `~/.config/plasma-org.kde.plasma.desktop-appletsrc` +- Window manager: `~/.config/kwinrc` +- Session: `/usr/share/xsessions/plasmax11.desktop` + +### Backup Location +- `~/desktop-backup/` - Original LXDE configuration + +### Documentation +- `KDE-INSTALLATION-GUIDE.md` - Full installation and revert guide +- `revert-to-lxde.sh` - Automated revert script +- `TOUCHSCREEN-DESKTOP-OPTIONS.md` - Desktop environment comparison + +--- + +## Next Steps + +1. ✅ **Reboot the device** + ```bash + ssh pi@10.130.60.253 "sudo reboot" + ``` + +2. ✅ **Select KDE at login** + - Choose "Plasma (X11)" from session selector + +3. ✅ **Configure touchscreen settings** + - Enable on-screen keyboard + - Adjust UI scaling + - Disable heavy effects + +4. ✅ **Test Chromium autostart** + - Verify Chromium starts in fullscreen + - Check if it properly fills the screen + +--- + +## Support + +If you encounter issues: +1. Check logs: `journalctl -xe` +2. Check X session: `~/.xsession-errors` +3. Verify packages: `dpkg -l | grep kde` +4. Review documentation: `KDE-INSTALLATION-GUIDE.md` + +--- + +## Notes + +- KDE Plasma is installed but **not set as default** - you choose at login +- LXDE is still available and can be selected at any time +- All original configurations are backed up +- Chromium autostart will work with both desktops +- Performance should be acceptable on Pi 4 with 8GB RAM diff --git a/chromium-setup/TOUCHSCREEN-DESKTOP-OPTIONS.md b/chromium-setup/TOUCHSCREEN-DESKTOP-OPTIONS.md new file mode 100644 index 0000000..80ad9b3 --- /dev/null +++ b/chromium-setup/TOUCHSCREEN-DESKTOP-OPTIONS.md @@ -0,0 +1,256 @@ +# Touchscreen-Friendly Desktop Environments for reTerminal DM4 + +## Current Setup +- **Screen**: 10-inch, 1280x800 resolution +- **Current DE**: LXDE with Openbox +- **Display Server**: Wayland (with Xwayland) + +## Recommended Desktop Environments + +### 1. KDE Plasma (Best for Touchscreen) ⭐ RECOMMENDED + +**Pros:** +- Excellent touch support with large touch targets +- Built-in on-screen keyboard (Maliit) +- Gesture support +- Scalable UI elements +- Modern, polished interface +- Good performance on Raspberry Pi 5 + +**Installation:** +```bash +sudo apt-get update +sudo apt-get install kde-plasma-desktop +# Or for full KDE experience: +sudo apt-get install kde-standard +``` + +**After installation:** +```bash +# Set KDE as default desktop +sudo update-alternatives --config x-session-manager +# Select KDE/Plasma option + +# Enable touchscreen optimizations +# In System Settings > Workspace Behavior > Desktop Effects +# Enable touch gestures and adjust touch settings +``` + +**Size**: ~500-800 MB + +--- + +### 2. GNOME (Good Touch Support) + +**Pros:** +- Excellent touch and gesture support +- Large, finger-friendly interface +- Built-in on-screen keyboard (Caribou) +- Modern, tablet-like experience +- Good Wayland support + +**Cons:** +- More resource-intensive than LXDE +- May be slower on older Pi models + +**Installation:** +```bash +sudo apt-get update +sudo apt-get install gnome-core +# Or full GNOME: +sudo apt-get install gnome +``` + +**After installation:** +```bash +# Set GNOME as default +sudo update-alternatives --config x-session-manager +# Select GNOME option + +# Enable touch optimizations in GNOME Settings +# Settings > Universal Access > Enable on-screen keyboard +``` + +**Size**: ~1-1.5 GB + +--- + +### 3. XFCE with Touch Optimizations + +**Pros:** +- Lightweight but more touch-friendly than LXDE +- Customizable +- Good performance +- Can be configured for touch + +**Installation:** +```bash +sudo apt-get update +sudo apt-get install xfce4 xfce4-goodies + +# Install on-screen keyboard +sudo apt-get install onboard +``` + +**Touch optimizations:** +```bash +# Increase icon sizes, touch targets +# Configure in Settings > Appearance > Icons (set to 48px or larger) +# Settings > Panel > Increase panel size +``` + +**Size**: ~200-300 MB + +--- + +### 4. Phosh (Mobile-First Desktop) + +**Pros:** +- Designed specifically for touch devices +- Very lightweight +- Mobile/tablet interface +- Built-in on-screen keyboard + +**Cons:** +- Less mature on Raspberry Pi +- May require more configuration + +**Installation:** +```bash +sudo apt-get update +sudo apt-get install phosh phosh-tour +``` + +**Size**: ~100-200 MB + +--- + +### 5. Lomiri (Ubuntu Touch Desktop) + +**Pros:** +- Designed for touch from the ground up +- Mobile-first interface +- Gesture-based navigation + +**Cons:** +- May not be in Debian repositories +- Requires more setup + +**Installation:** +```bash +# May need to add Ubuntu Touch repositories +# Check availability in Debian repos first +``` + +--- + +## Comparison Table + +| Desktop Environment | Touch Support | Performance | Size | Ease of Setup | +|---------------------|---------------|-------------|------|---------------| +| **KDE Plasma** | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | Medium | Easy | +| **GNOME** | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | Large | Easy | +| **XFCE** | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Small | Easy | +| **Phosh** | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Small | Medium | +| **LXDE (Current)** | ⭐⭐ | ⭐⭐⭐⭐⭐ | Very Small | N/A | + +--- + +## Recommended: KDE Plasma + +For a 10-inch touchscreen, **KDE Plasma** offers the best balance of: +- Touch-friendliness +- Performance +- Features +- Ease of use + +## Installation Steps for KDE Plasma + +1. **Install KDE Plasma:** + ```bash + sudo apt-get update + sudo apt-get install kde-plasma-desktop + ``` + +2. **Install on-screen keyboard:** + ```bash + sudo apt-get install maliit-keyboard + ``` + +3. **Set as default desktop:** + ```bash + sudo update-alternatives --config x-session-manager + # Select: /usr/bin/startplasma-wayland or /usr/bin/startplasma-x11 + ``` + +4. **Configure touch settings:** + - System Settings > Input Devices > Touchpad/Touchscreen + - Adjust touch sensitivity and gestures + - Enable tap-to-click + +5. **Enable on-screen keyboard:** + - System Settings > Input Devices > Virtual Keyboard + - Enable "Show on-screen keyboard when needed" + +6. **Adjust UI scaling:** + - System Settings > Display and Monitor + - Set scale to 125% or 150% for better touch targets + +7. **Reboot:** + ```bash + sudo reboot + ``` + +## Switching Back to LXDE + +If you want to switch back: +```bash +sudo update-alternatives --config x-session-manager +# Select LXDE option +``` + +## Touchscreen Calibration (if needed) + +```bash +# Install calibration tool +sudo apt-get install xinput-calibrator + +# Run calibration +xinput_calibrator + +# Follow on-screen instructions to calibrate touch points +``` + +## Additional Touch Optimizations + +### Increase Touch Targets +Edit `~/.gtkrc-2.0` and `~/.config/gtk-3.0/gtk.css`: +```css +* { + min-width: 44px; + min-height: 44px; +} +``` + +### Enable Touch Gestures +- Install `libinput-gestures`: + ```bash + sudo apt-get install libinput-gestures + ``` + +### Font Scaling +- Increase system font size in desktop settings +- Recommended: 12-14pt for 10-inch screens + +## Notes + +- **Wayland vs X11**: KDE Plasma and GNOME work well with Wayland, which has better touch support +- **Performance**: KDE Plasma is well-optimized for Raspberry Pi 5 +- **Chromium**: Your existing Chromium setup will work with any desktop environment +- **Autostart**: Your autostart configuration will work with any DE + +## Resources + +- KDE Plasma: https://kde.org/plasma-desktop/ +- GNOME: https://www.gnome.org/ +- Phosh: https://source.puri.sm/Librem5/phosh diff --git a/chromium-setup/revert-to-lxde.sh b/chromium-setup/revert-to-lxde.sh new file mode 100755 index 0000000..cac9de7 --- /dev/null +++ b/chromium-setup/revert-to-lxde.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Revert to LXDE Desktop Environment +# This script helps revert from KDE Plasma back to LXDE + +echo "=== Reverting to LXDE Desktop Environment ===" +echo "" + +# Check if running as root for some operations +if [ "$EUID" -ne 0 ]; then + echo "Some operations require sudo. You may be prompted for your password." + echo "" +fi + +# Method 1: Change default session +echo "Step 1: Setting LXDE as default session..." +echo "You will be prompted to select the session manager." +echo "" +sudo update-alternatives --config x-session-manager + +# Method 2: Verify LXDE packages are still installed +echo "" +echo "Step 2: Verifying LXDE packages..." +if dpkg -l | grep -q "lxsession"; then + echo "✓ LXDE packages are installed" +else + echo "⚠ LXDE packages not found. Reinstalling..." + sudo apt-get update + sudo apt-get install --reinstall lxde +fi + +# Method 3: Check available sessions +echo "" +echo "Step 3: Available desktop sessions:" +ls -1 /usr/share/xsessions/ | grep -E "openbox|rpd|lxde" || echo "No LXDE sessions found" + +echo "" +echo "=== Revert Complete ===" +echo "" +echo "To use LXDE:" +echo "1. Log out of current session" +echo "2. At login screen, click on session/desktop selector" +echo "3. Select 'Openbox' or 'RPD-X' session" +echo "4. Log in" +echo "" +echo "Or reboot and select LXDE at login:" +echo " sudo reboot"