|
#!/bin/sh |
|
|
|
# Exit on errors |
|
set -e |
|
|
|
# Be verbose |
|
set -x |
|
|
|
# Verify that /cdrom/.disk/info starts with "Lubuntu 22.04" |
|
if ! head -n 1 /cdrom/.disk/info | grep -q "^Lubuntu 22.04" ; then |
|
echo "This script is only meant to be run on Lubuntu 22.04" |
|
exit 1 |
|
fi |
|
|
|
# Check that we are running on X11 |
|
if [ "$XDG_SESSION_TYPE" != "x11" ]; then |
|
echo "This script is only meant to be run on X11" |
|
exit 1 |
|
fi |
|
|
|
# If /System exists, the script already ran and we can exit |
|
if [ -d /System ]; then |
|
echo "Already installed, start ~/startFiler.sh to start the desktop customizations" |
|
exit 0 |
|
fi |
|
|
|
# Install prerequisites |
|
# Unfortunately the LxQt theme doesn't seem to support global menus, so we need to install |
|
# the plasma-integration package and set QT_QPA_PLATFORMTHEME=kde |
|
# unless we also install the QtPlugin from helloSystem |
|
sudo apt-get -y update |
|
sudo apt-get -y install baloo-kf5 libqalculate22 plasma-integration libqt5multimedia5 # elementary-xfce-icon-theme |
|
# elementary-xfce-icon-theme is optional but for good looks |
|
|
|
# Download and install components |
|
cd ~/Downloads |
|
wget -c https://github.com/helloSystem/Menu/releases/download/continuous/Menu_Ubuntu.zip |
|
wget -c https://github.com/helloSystem/launch/releases/download/continuous/launch_Ubuntu.zip |
|
wget -c https://github.com/probonopd/Filer/releases/download/continuous/Filer_Ubuntu.zip |
|
|
|
# Unpack |
|
# Menu_Ubuntu.zip to /System |
|
sudo mkdir -p /System |
|
sudo unzip -o Menu_Ubuntu.zip -d /System |
|
sudo unzip -o Filer_Ubuntu.zip -d /System |
|
sudo unzip -o launch_Ubuntu.zip -d / |
|
cd - |
|
|
|
# Write a startup script |
|
cat > ~/startFiler.sh << EOF |
|
#!/bin/sh |
|
export SUDO_ASKPASS="" |
|
export UBUNTU_MENUPROXY=1 |
|
export GTK_MODULES="appmenu-gtk-module" |
|
export QT_QPA_PLATFORMTHEME=kde |
|
launch Menu & |
|
launch Filer & |
|
killall pcmanfm-qt |
|
killall lxqt-panel # optional |
|
EOF |
|
chmod +x ~/startFiler.sh |
|
|
|
mkdir -p ~/.config/autostart/ |
|
cat > ~/.config/autostart/Filer.desktop <<\EOF |
|
[Desktop Entry] |
|
Exec=launch Filer |
|
Name=Filer |
|
Type=Application |
|
Version=1.0 |
|
EOF |
|
|
|
cat > ~/.config/autostart/Menu.desktop <<\EOF |
|
[Desktop Entry] |
|
Exec=launch Menu |
|
Name=Menu |
|
Type=Application |
|
Version=1.0 |
|
EOF |
|
|
|
mkdir -p ~/.config/lxqt/ |
|
cat > ~/.config/lxqt/session.conf <<\EOF |
|
[General] |
|
__userfile__=true |
|
|
|
[Environment] |
|
BROWSER=launch Falkon |
|
GTK_CSD=0 |
|
GTK_OVERLAY_SCROLLING=0 |
|
SAL_USE_VCLPLUGIN=qt5 |
|
SAL_VCL_QT5_USE_CAIRO=true |
|
TERM=qterminal |
|
UBUNTU_MENUPROXY=1 |
|
SUDO_ASKPASS="" |
|
GTK_MODULES="appmenu-gtk-module" |
|
QT_QPA_PLATFORMTHEME=kde |
|
EOF |
|
|
|
sudo ln -sf /usr/bin/lxqt-leave /System/Menu.app/Shutdown |
|
|
|
# Start the desktop |
|
~/startFiler.sh |
|
|
|
# Remove .desktop files from desktop |
|
rm ~/Desktop/*.desktop |
|
|
|
# Exit the terminal this script was running in |
|
exit |