#!/bin/bash
# Tune Debian 10 desktop for older machines

# System services
sudo systemctl mask ModemManager.service
sudo systemctl mask anacron.service
sudo systemctl mask avahi-daemon.service
sudo systemctl mask unattended-upgrades.service
sudo systemctl mask fwupd.service
sudo systemctl mask bolt.service
sudo systemctl mask colord.service
sudo systemctl mask geoclue.service
sudo systemctl mask packagekit.service

# User services
systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
systemctl --user mask evolution-addressbook-factory.service evolution-calendar-factory.service evolution-source-registry.service
systemctl --user mask gvfs-daemon.service gvfs-afc-volume-monitor.service gvfs-afc-volume-monitor.service gvfs-goa-volume-monitor.service gvfs-udisks2-volume-monitor.service gvfs-gphoto2-volume-monitor.service gvfs-mtp-volume-monitor.service
systemctl --user mask ssh-agent.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Software.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Documents.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Calendar.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.seahorse.Application.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.OnlineAccounts.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Characters.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/gnome-software-service.desktop
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.Wacom.desktop
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop 
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.Smartcard.desktop
sudo sed -i "s@^use-ssh-agent@#use-ssh-agent@" /etc/X11/Xsession.options
