Linux DE installation(s) bash

Chris

Lad
Member
Bash:
# 1. Update system repositories and upgrade existing packages
sudo dnf check-update
sudo dnf upgrade -y

# 2. Install development tools, X11 libraries, i3, and Spectrwm
sudo dnf install dnf-plugins-core git gcc gcc-c++ make bison flex m4 ksh \
  libX11-devel libXext-devel libXt-devel libXmu-devel libXft-devel \
  libXinerama-devel libjpeg-turbo-devel libpng-devel libtirpc-devel \
  rpcbind pam-devel tcl-devel tk-devel libXss-devel libXrandr-devel \
  libXpm-devel ImageMagick openmotif-devel i3 i3status dmenu i3lock \
  spectrwm wget -y

echo "=== NATIVE WINDOW MANAGERS INSTALLED ==="

# 3. Detect Fedora version and install nsCDE
cd /tmp
export FEDORA_VER=$(rpm -E %fedora)

sudo dnf copr enable @szpak/NsCDE -y || \
  wget https://github.com

# CHANGED: Using native 'install' for dnf5 local package delivery
sudo dnf install ./NsCDE*.rpm -y
echo "=== NSCDE INSTALLED ==="

# 4. Add the Trinity Desktop Environment (TDE) repository and install it
sudo rpm -Uvh http://trinitydesktop.org{FEDORA_VER}/trinity-r14/RPMS/noarch/trinity-repo-14.1.6-1.fc${FEDORA_VER}.noarch.rpm
sudo dnf clean all
sudo dnf install trinity-tdebase -y
echo "=== TRINITY INSTALLED ==="

# 5. Clone, compile, and install the Common Desktop Environment (CDE)
cd /tmp
git clone https://sf.net cde-code
cd cde-code/cde
./configure
make -j$(nproc)
sudo make install

echo "=== CDE COMPILED & INSTALLED ==="

# 6. Ensure i3 and its essential bar/menu applications are fully present
sudo dnf install i3 i3status dmenu -y
echo "=== i3 VERIFICATION COMPLETE ==="

echo "=== ALL WINDOW MANAGERS SETUP COMPLETE. REBOOT OR LOG OUT ==="
 

Chris

Lad
Member
Bash:
#!/bin/sh

clear
echo "=================================================="
echo "          SELECT DESKTOP ENVIRONMENT              "
echo "=================================================="
echo "  1) i3 Window Manager"
echo "  2) spectrwm"
echo "  3) NsCDE"
echo "  4) Trinity Desktop Environment (KDE3)"
echo "  5) Common Desktop Environment (CDE)"
echo "=================================================="
echo -n "Enter choice [1-5]: "
read -r choice

case $choice in
    1)
        exec /usr/bin/i3
        ;;
    2)
        exec /usr/bin/spectrwm
        ;;
    3)
        # NsCDE wrapper launch
        if [ -f /opt/NsCDE/bin/nscde ]; then
            exec /opt/NsCDE/bin/nscde
        else
            exec /usr/bin/nscde
        fi
        ;;
    4)
        # Trinity Desktop initialization environment variables
        export TDE_FULL_SESSION=true
        exec /opt/trinity/bin/startkde
        ;;
    5)
        # CDE session manager initialization
        export DT_XINIT_START=1
        if [ -f /etc/X11/Xsession ]; then
            exec /etc/X11/Xsession /usr/dt/bin/Xsession
        else
            exec /usr/dt/bin/Xsession
        fi
        ;;
    *)
        echo "Invalid choice. Defaulting to i3..."
        sleep 1
        exec /usr/bin/i3
        ;;
esac
 
Last edited:
Top