2018-09-12 04:27:40 +02:00
|
|
|
#!/bin/bash -xe
|
2018-06-28 02:46:28 +02:00
|
|
|
|
2018-10-10 18:29:22 +02:00
|
|
|
|
|
|
|
# This file is part of PrawnOS (http://www.prawnos.com)
|
|
|
|
# Copyright (c) 2018 Hal Emmerich <hal@halemmerich.com>
|
|
|
|
|
|
|
|
# PrawnOS is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License version 2
|
|
|
|
# as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
# PrawnOS is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with PrawnOS. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2018-09-06 01:35:33 +02:00
|
|
|
DIR=/InstallResources
|
|
|
|
|
2018-09-12 04:27:40 +02:00
|
|
|
while true; do
|
2018-09-13 00:58:33 +02:00
|
|
|
read -p "install (X)fce4 or (L)xqt, if unsure choose (X)fce4: " XL
|
2018-09-12 05:15:04 +02:00
|
|
|
case $XL in
|
2018-09-12 04:27:40 +02:00
|
|
|
[Xx]* ) DE=xfce; break;;
|
|
|
|
[Ll]* ) DE=lxqt; break;;
|
|
|
|
* ) echo "Please answer (X)fce4 or (L)xqt";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2018-09-06 01:35:33 +02:00
|
|
|
locale-gen
|
2018-09-12 16:33:21 +02:00
|
|
|
#Install shared packages
|
2018-10-02 21:56:56 +02:00
|
|
|
apt install -y xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils xserver-xorg-input-synaptics mousepad vlc dconf-tools sudo dtrx emacs25
|
2018-10-11 22:09:25 +02:00
|
|
|
apt install -y network-manager-gnome network-manager-openvpn network-manager-openvpn-gnome
|
2018-09-12 04:27:40 +02:00
|
|
|
|
2018-09-13 00:58:33 +02:00
|
|
|
[ "$DE" = "xfce" ] && apt install -y xfce4 dbus-user-session system-config-printer tango-icon-theme xfce4-power-manager xfce4-terminal xfce4-goodies numix-gtk-theme plank
|
2018-09-12 04:27:40 +02:00
|
|
|
[ "$DE" = "lxqt" ] && apt install -y lxqt
|
|
|
|
|
2018-09-22 06:12:52 +02:00
|
|
|
if [ "$DE" = "xfce" ]
|
|
|
|
then
|
|
|
|
#Install packages not in an apt repo
|
|
|
|
dpkg -i $DIR/xfce-themes/*
|
|
|
|
|
|
|
|
#Copy in xfce4 default settings
|
|
|
|
cp -f $DIR/xfce-config/xfce-perchannel-xml/* /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
|
|
|
|
cp -f $DIR/xfce-config/panel/* /etc/xdg/xfce4/panel/
|
|
|
|
|
|
|
|
#Copy in lightdm/light greeter settings
|
|
|
|
cp -f $DIR/xfce-config/lightdm/* /etc/lightdm/
|
|
|
|
|
|
|
|
#Copy in wallpapers
|
|
|
|
rm /usr/share/images/desktop-base/default && cp $DIR/wallpapers/* /usr/share/images/desktop-base/
|
|
|
|
|
|
|
|
#Install libinput-gestures and xfdashboard "packages"
|
|
|
|
cd $DIR/packages/
|
|
|
|
dtrx libinput-gestures.tar.gz
|
|
|
|
cd libinput-gestures
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
#Add libinput-gestures config and autostart
|
|
|
|
cp $DIR/xfce-config/libinput-gestures/libinput-gestures.conf /etc/
|
|
|
|
cp $DIR/xfce-config/libinput-gestures/libinput-gestures.desktop /etc/xdg/autostart/
|
|
|
|
|
|
|
|
#Make plank autostart
|
|
|
|
cp $DIR/xfce-config/plank/plank.desktop /etc/xdg/autostart/
|
|
|
|
|
2018-09-22 17:59:30 +02:00
|
|
|
#install plank launcher
|
|
|
|
mkdir -p /etc/skel/.config/plank/dock1/launchers/
|
2018-09-22 18:01:15 +02:00
|
|
|
cp -rf $DIR/xfce-config/plank/plank-launchers/* /etc/skel/.config/plank/dock1/launchers/
|
2018-10-01 17:43:28 +02:00
|
|
|
|
|
|
|
#Install xmodmap map, autostart
|
2018-10-02 04:01:08 +02:00
|
|
|
cp -rf $DIR/xfce-config/xmodmap/.Xmodmap /etc/skel/
|
|
|
|
cp -rf $DIR/xfce-config/xmodmap/.xinitrc /etc/skel/
|
2018-10-01 17:43:28 +02:00
|
|
|
|
2018-10-02 21:47:47 +02:00
|
|
|
#Install inputrc
|
2018-10-03 00:28:37 +02:00
|
|
|
cp -rf $DIR/xfce-config/inputrc/.inputrc /etc/skel/
|
2018-10-02 21:47:47 +02:00
|
|
|
|
2018-10-01 17:43:28 +02:00
|
|
|
#Install brightness controls
|
|
|
|
cp $DIR/xfce-config/brightness/backlight_* /usr/sbin/
|
|
|
|
mkdir -p /etc/udev/rules.d/
|
|
|
|
cp $DIR/xfce-config/brightness/backlight.rules /etc/udev/rules.d/
|
2018-09-22 06:12:52 +02:00
|
|
|
fi
|
2018-09-13 00:58:33 +02:00
|
|
|
|
2018-09-12 22:22:44 +02:00
|
|
|
|
2018-06-28 02:46:28 +02:00
|
|
|
#Copy in acpi, pulse audio, trackpad settings, funtion key settings
|
2018-09-06 01:35:33 +02:00
|
|
|
cp -rf $DIR/default.pa /etc/pulse/default.pa
|
|
|
|
cp -rf $DIR/sound.sh /etc/acpi/sound.sh
|
|
|
|
cp -rf $DIR/headphone-acpi-toggle /etc/acpi/events/headphone-acpi-toggle
|
2018-06-28 02:46:28 +02:00
|
|
|
mkdir /etc/X11/xorg.conf.d/
|
2018-09-06 01:35:33 +02:00
|
|
|
cp -rf $DIR/50-synaptics.conf /etc/X11/xorg.conf.d/
|
2018-06-28 02:46:28 +02:00
|
|
|
|
2018-09-12 04:27:40 +02:00
|
|
|
apt clean && apt autoremove --purge
|
2018-06-30 22:08:35 +02:00
|
|
|
|
2018-10-05 02:10:11 +02:00
|
|
|
dmesg -D
|
2018-06-30 22:08:35 +02:00
|
|
|
|
2018-10-05 02:10:11 +02:00
|
|
|
#Force a safe username
|
|
|
|
while true; do
|
2018-10-10 22:09:02 +02:00
|
|
|
echo " Enter new username: "
|
|
|
|
read username
|
|
|
|
#ensure no whitespace
|
|
|
|
case $username in *\ *) echo usernames may not contain whitespace;; *) break;; esac
|
|
|
|
done
|
|
|
|
until adduser $username --gecos ""
|
|
|
|
do
|
2018-10-05 02:10:11 +02:00
|
|
|
while true; do
|
|
|
|
echo " Enter new username: "
|
|
|
|
read username
|
|
|
|
#ensure no whitespace
|
|
|
|
case $username in *\ *) echo usernames may not contain whitespace;; *) break;; esac
|
2018-10-10 22:09:02 +02:00
|
|
|
done
|
2018-10-05 02:10:11 +02:00
|
|
|
done
|
2018-10-10 22:09:02 +02:00
|
|
|
|
2018-10-05 02:10:11 +02:00
|
|
|
usermod -a -G sudo,netdev,input,video $username
|
2018-06-30 22:08:35 +02:00
|
|
|
|
2018-10-05 02:10:11 +02:00
|
|
|
dmesg -E
|
2018-09-14 17:38:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-28 02:46:28 +02:00
|
|
|
reboot
|