Compare commits

..

No commits in common. "main" and "restructure" have entirely different histories.

5 changed files with 95 additions and 155 deletions

View file

@ -1,9 +0,0 @@
MIT License
Copyright (c) 2024 DeltaLima
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,23 +1,11 @@
# make-debian-look-like-ubuntu Script for Installation of a Debian Gnome Desktop System, I like. Make the System Appeareance more "ubuntuuish".
Origin: https://git.la10cy.net/DeltaLima/make-debian-look-like-ubuntu After the first run of setup.sh, you have to reboot and re-run the script.
This script performs all necessary steps to make a Debian 12 (bookworm) Gnome desktop look like an Ubuntu desktop.
Also it installs flatpak with flathub.org repository enabled and Firefox from there.
The settings are only applied to the user which is executing this script. The user has to be in the `sudo` group. If not, the script will advise you how to do so.
**Important!** After the first run of setup.sh, you have to reboot and re-run the script.
When the script runs the first time, it is normal that the terminal font looks ugly after it. It's normal after a reboot.
## Installation
Just execute setup.sh and show will start:
```bash ```bash
$ bash make-debian-look-like-ubuntu.sh $ bash setup.sh
``` ```
You can customize standard packages, which gets installed. Just add an entry to the array defined in `include/packages.inc.sh` You can customize standard packages, which got installed. Just edit the Array in `include/packages.inc.sh`
![Ubuntuish Debian 12 Gnome Desktop](screenshot/screenshot1.png "Ubuntuish Debian 12 Gnome Desktop") ![Ubuntuish Debian 12 Gnome Desktop](/screenshot/screenshot1.png "Ubuntuish Debian 12 Gnome Desktop")

51
include/packages.inc.sh Normal file
View file

@ -0,0 +1,51 @@
#!/bin/bash
declare -A packages
# the first three array entries are numbered because they have to be ordered
# install base desktop stuff
packages[0-base]="linux-headers-amd64 plymouth build-essential
p7zip-full unrar unzip neofetch ecryptfs-utils"
# install desktop base
packages[1-desktop-base]="ttf-mscorefonts-installer fonts-ubuntu fonts-ubuntu-console fonts-liberation2
fonts-noto-core fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra fonts-dejavu fonts-hack
flatpak flatpak-xdg-utils gnome-software-plugin-flatpak shotwell network-manager-openvpn-gnome brasero
dconf-editor thunderbird"
# install gnome base
packages[2-desktop-gnome]="task-gnome-desktop task-german-desktop
gnome-shell-extension-manager gnome-tweaks gnome-shell-extensions
gnome-shell-extension-desktop-icons-ng gnome-shell-extension-dashtodock
gnome-shell-extension-appindicator gnome-shell-extension-system-monitor
gnome-shell-extension-panel-osd
yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound
yaru-theme-unity"
# install admin and dev tools
packages[admin]="htop iotop sysstat lm-sensors git mc vim btop btrfs-progs
curl wget debootstrap geany geany-plugins lnav mtr-tiny ncdu nmap ppp
pandoc pwgen remmina rsync screen socat stress strace tcpdump ufw borgbackup borgmatic colordiff
ansible"
# install nice programs
packages[nice]="wine:i386 winetricks chromium dosbox gimp vlc barrier audacity
keepassxc audacious clementine nextcloud-desktop arduino qv4l2 guvcview
solaar steam-installer"
# you can just add your own packages like shown above and below, just add
# a new array :)
# install games
#packages[game]="openarena"
# ham radio
#packages[ham]="direwolf gqrx-sdr ax25-tools ax25-apps js8call"
# lol stuff :)
#packages[lol]="lolcat"
# packages for xubuntuish XFCE
#packages[desktop-xfce]="gnome-keyring seahorse python3-keyring mugshot elementary-xfce-icon-theme
#lightdm-settings lightdm-gtk-greeter-settings"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View file

@ -1,64 +1,9 @@
#!/bin/bash #!/bin/bash
# Title: make-debian-look-like-ubuntu.sh
# Description: This script performs all necessary steps to make a Debian Gnome
# desktop look like an Ubuntu desktop. Also it installs flatpak with
# flathub.org repository enabled and Firefox from there.
# Author: DeltaLima
# Date: 21.06.2023
# Version: 1.0
# Usage: bash make-debian-look-like-ubuntu.sh
#
# Copyright 2023 DeltaLima (Marcus Hanisch)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#
arguments="$@" arguments="$@"
# define the $packages[] array # get the $packages Array
declare -A packages . include/packages.inc.sh
# the first three array entries are numbered because they have to be ordered
# install base desktop stuff
packages[0-base]="plymouth ecryptfs-utils curl wget python-is-python3 binutils"
# install desktop base
packages[1-desktop-base]="ttf-mscorefonts-installer fonts-ubuntu fonts-ubuntu-console fonts-liberation2
fonts-noto-core fonts-noto-color-emoji fonts-dejavu fonts-hack
flatpak flatpak-xdg-utils gnome-software-plugin-flatpak network-manager-openvpn-gnome
dconf-editor thunderbird"
# install gnome base
packages[2-desktop-gnome]="gnome-shell-extension-manager gnome-tweaks gnome-shell-extensions
gnome-shell-extension-desktop-icons-ng gnome-shell-extension-dashtodock
gnome-shell-extension-appindicator gnome-shell-extension-system-monitor
gnome-shell-extension-panel-osd
yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound
yaru-theme-unity
gnome-package-updater gnome-packagekit"
# if you want to add for automation purposes your own packages, just add another array field, like
#packages[4-my-packages]="shutter solaar steam-installer chromium dosbox gimp vlc audacity keepassxc audacious nextcloud-desktop"
# colors for colored output 8) # colors for colored output 8)
RED="\e[31m" RED="\e[31m"
@ -97,9 +42,9 @@ error ()
confirm_continue() confirm_continue()
{ {
message warn "Type '${GREEN}y${ENDCOLOR}' or '${GREEN}yes${ENDCOLOR}' and hit [ENTER] to continue" message warn "Type '${GREEN}yes${ENDCOLOR}' and hit [ENTER] to continue"
read -p "[y/N?] " continue read -p "=> " continue
if [ "${continue,,}" != "y" ] && [ "${continue,,}" != "yes" ] if [ "$continue" != "yes" ]
then then
message error "Installation aborted." message error "Installation aborted."
exit 1 exit 1
@ -122,24 +67,14 @@ fi
# sort the category list, some of them have to be in order # sort the category list, some of them have to be in order
package_categories="$(echo $package_categories | xargs -n1 | sort | xargs)" package_categories="$(echo $package_categories | xargs -n1 | sort | xargs)"
message "Welcome to ${GREEN}make-debian-look-like-ubuntu${ENDCOLOR}!"
message "This script makes a fresh Debian-Gnome installation more 'ubuntuish'"
message "look'n'feel for the current running user ($USER)."
message "" message ""
message "This script makes a fresh Debian-Gnome installation to look like" message "Do you want to install these package categories?"
message "an Ubuntu Gnome installation. Settings are applied for the user"
message "running this script (${YELLOW}${USER}${ENDCOLOR})".
message ""
message "Your user has to be in the 'sudo' group."
message "If not, the script will guide you."
message ""
message "The process is divided into following steps:"
message "${YELLOW}$package_categories${ENDCOLOR}" message "${YELLOW}$package_categories${ENDCOLOR}"
message "" message "You can also specify only a few to install, e.g. '${YELLOW}0-base admin${ENDCOLOR}':"
message "If you want, you can run only a few of them, e.g. just '${YELLOW}2-desktop-gnome${ENDCOLOR}':" message "./$0 0-base admin"
message " ${YELLOW}bash $0 2-desktop-gnome${ENDCOLOR}"
message ""
message warn "Some files, like gtk settings, get overwritten without asking."
message warn "If this is not a fresh installation, make a backup first!"
message ""
confirm_continue confirm_continue
message "Continue with installation..." message "Continue with installation..."
@ -149,18 +84,17 @@ then
message error "Your user $USER is not in group 'sudo'." message error "Your user $USER is not in group 'sudo'."
message error "Add your user to the group with:" message error "Add your user to the group with:"
message error " ${YELLOW}su -c \"/usr/sbin/usermod -aG sudo ${USER}\"${ENDCOLOR}" message error " ${YELLOW}su -c \"/usr/sbin/usermod -aG sudo ${USER}\"${ENDCOLOR}"
message error "after that, you need to reboot." message error "after that logout and in again or reboot"
error error
fi fi
message "check sources.list" message "check sources.list"
if ! ( ( grep "contrib" /etc/apt/sources.list > /dev/null ) && ( grep -E " non-free( |$)" /etc/apt/sources.list > /dev/null ) ) if ( ! grep "contrib" /etc/apt/sources.list > /dev/null ) && ( ! grep "non-free" /etc/apt/sources.list > /dev/null )
then then
message warn "I need 'contrib' and 'non-free' in sources.ist, I will deploy my own" message warn "'contrib' and 'non-free' not in your sources.ist, i will deploy my own"
confirm_continue confirm_continue
message "backup old sources.list to /etc/apt/sources.list.bak" message "backup old sources.list"
sudo cp /etc/apt/sources.list /etc/apt/sources.list.$(date "+%s")bak sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
cat << EOF | sudo tee /etc/apt/sources.list echo "deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
@ -170,8 +104,7 @@ deb-src http://security.debian.org/debian-security bookworm-security main contri
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports # see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
EOF " | sudo tee /etc/apt/sources.list
message "apt update" message "apt update"
sudo apt update sudo apt update
fi fi
@ -202,7 +135,7 @@ do
case $category in case $category in
0-base) 0-base)
message "sed default grub option" message "sed default grub option"
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash\"/g' /etc/default/grub || error sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash mem_sleep_default=deep\"/g' /etc/default/grub || error
sudo update-grub sudo update-grub
;; ;;
@ -210,13 +143,16 @@ do
message "add flathub.org flatpak repository" message "add flathub.org flatpak repository"
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || error sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || error
# here was also com.github.GradienceTeam.Gradience included installed, but not needed message "install firefox flatpak and gradience"
# anymore - i found the relevant ~/.config/gtk-{3,4}.0/gtk.css file ;) sudo flatpak install org.mozilla.firefox com.github.GradienceTeam.Gradience || error
message "install firefox flatpak"
sudo flatpak install org.mozilla.firefox || error
message "set firefox flatpak to default" message "set firefox flatpak to default"
xdg-settings set default-web-browser org.mozilla.firefox.desktop xdg-settings set default-web-browser org.mozilla.firefox.desktop
message "linking ~/.mozilla to flatpak env"
mkdir -p $HOME/.mozilla
mkdir -p $HOME/.var/app/org.mozilla.firefox/
ln -s $HOME/.mozilla $HOME/.var/app/org.mozilla.firefox/.mozilla
message "apply font fix for firefox flatpak" message "apply font fix for firefox flatpak"
mkdir -p $HOME/.var/app/org.mozilla.firefox/config/fontconfig/ mkdir -p $HOME/.var/app/org.mozilla.firefox/config/fontconfig/
cat << EOF > $HOME/.var/app/org.mozilla.firefox/config/fontconfig/fonts.conf cat << EOF > $HOME/.var/app/org.mozilla.firefox/config/fontconfig/fonts.conf
@ -230,6 +166,12 @@ do
</fontconfig> </fontconfig>
EOF EOF
message "setting gtk legacy default to dark"
mkdir -p $HOME/.config/gtk-{3,4}.0
cat << EOF | tee $HOME/.config/gtk-3.0/settings.ini > $HOME/.config/gtk-4.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme=1
EOF
# fix big cursor issue in qt apps # fix big cursor issue in qt apps
message "Set XCURSOR_SIZE=24 in /etc/environment to fix Big cursor bug in QT" message "Set XCURSOR_SIZE=24 in /etc/environment to fix Big cursor bug in QT"
grep "XCURSOR_SIZE" /etc/environment || echo "XCURSOR_SIZE=24" | sudo tee -a /etc/environment > /dev/null grep "XCURSOR_SIZE" /etc/environment || echo "XCURSOR_SIZE=24" | sudo tee -a /etc/environment > /dev/null
@ -245,6 +187,7 @@ EOF
gnome-extensions enable panel-osd@berend.de.schouwer.gmail.com gnome-extensions enable panel-osd@berend.de.schouwer.gmail.com
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gnome-extensions enable dash-to-dock@micxgx.gmail.com gnome-extensions enable dash-to-dock@micxgx.gmail.com
gnome-extensions enable system-monitor@paradoxxx.zero.gmail.com
gnome-extensions enable ding@rastersoft.com gnome-extensions enable ding@rastersoft.com
message "apply settings for dash-to-dock" message "apply settings for dash-to-dock"
@ -252,16 +195,17 @@ EOF
gsettings set org.gnome.shell.extensions.dash-to-dock autohide-in-fullscreen false gsettings set org.gnome.shell.extensions.dash-to-dock autohide-in-fullscreen false
gsettings set org.gnome.shell.extensions.dash-to-dock background-opacity 0.64000000000000001 gsettings set org.gnome.shell.extensions.dash-to-dock background-opacity 0.64000000000000001
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'focus-or-previews' gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'focus-or-previews'
gsettings set org.gnome.shell.extensions.dash-to-dock custom-theme-shrink true gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 36
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 42
gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT' gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT'
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode 'FIXED' gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode 'FIXED'
gsettings set org.gnome.shell.extensions.dash-to-dock running-indicator-style 'DOTS' gsettings set org.gnome.shell.extensions.dash-to-dock running-indicator-style 'DOTS'
gsettings set org.gnome.shell.extensions.dash-to-dock icon-size-fixed true
message "apply settings for panel-osd"
# panel-osd
gsettings set org.gnome.shell.extensions.panel-osd x-pos 100.0
message "apply settings for gnome desktop" message "apply settings for gnome desktop"
# desktop # desktop
@ -271,48 +215,14 @@ EOF
gsettings set org.gnome.desktop.background primary-color '#E66100' gsettings set org.gnome.desktop.background primary-color '#E66100'
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:appmenu' gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:appmenu'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface enable-hot-corners true gsettings set org.gnome.desktop.interface enable-hot-corners true
gsettings set org.gnome.desktop.interface font-antialiasing 'grayscale' gsettings set org.gnome.desktop.interface font-antialiasing 'grayscale'
gsettings set org.gnome.desktop.interface font-hinting 'slight' gsettings set org.gnome.desktop.interface font-hinting 'slight'
gsettings set org.gnome.desktop.interface font-name 'Ubuntu 11' gsettings set org.gnome.desktop.interface font-name 'Ubuntu 11'
gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 13'
gsettings set org.gnome.desktop.interface document-font-name 'Sans 11'
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Ubuntu Bold 11'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-dark' gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-dark'
gsettings set org.gnome.desktop.interface icon-theme 'Yaru-dark' gsettings set org.gnome.desktop.interface icon-theme 'Yaru-dark'
gsettings set org.gnome.shell.extensions.user-theme name 'Yaru-dark'
# gtk-3.0 and gtk-4.0 settings
message "setting gtk-3.0 and gtk-4.0 default to dark"
mkdir -p $HOME/.config/gtk-{3,4}.0
cat << EOF | tee $HOME/.config/gtk-3.0/settings.ini > $HOME/.config/gtk-4.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme=1
EOF
# apply adwaita gtk-3.0 and gtk-4.0 orange accent color
message "setting gtk-3.0 and gtk-4.0 accent color to orange"
cat << EOF | tee $HOME/.config/gtk-3.0/gtk.css > $HOME/.config/gtk-4.0/gtk.css
@define-color accent_color #ffbe6f;
@define-color accent_bg_color #e66100;
@define-color accent_fg_color #ffffff;
EOF
# replace firefox-esr with flatpak in dock
message "replace firefox-esr with flatpak in dock"
gsettings get org.gnome.shell favorite-apps | grep "org.mozilla.firefox.desktop" > /dev/null ||
gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed 's/firefox-esr\.desktop/org\.mozilla\.firefox\.desktop/')"
# replace evolution with thunderbird in dock
message "replace evolution with thunderbird in dock"
gsettings get org.gnome.shell favorite-apps | grep "thunderbird.desktop" > /dev/null ||
gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed 's/org\.gnome\.Evolution\.desktop/thunderbird\.desktop/')"
# replace yelp with settings in dock
message "replace yelp with settings in dock"
gsettings get org.gnome.shell favorite-apps | grep "org.gnome.Settings.desktop" > /dev/null ||
gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed 's/yelp\.desktop/org\.gnome\.Settings\.desktop/')"
;; ;;
esac esac