Files
dotfiles/installer/30-printer.sh
T
steveandgitadmin 02a5e0df28 init: new dotfile configuration
Remove all org files using a new script to more config over, The old org
file configuaration were great but required org. This new version only
requires the scripts that is included in the repo.

The configuration are all done but have not ported the theming system
yet.

Signed-off-by: Steve Beaulac <steve@sagacity.ca>
Change-Id: I14cd7fe058a71c8ba9d6d35397dc8d7e6a6a6964
2026-03-02 13:26:21 -05:00

43 lines
1.2 KiB
Bash
Executable File

#!/bin/sh -e
if [[ ! -x "$(command -v paru)" ]]; then
sudo pacman -S --noconfirm --needed paru || exit 1
fi
paru --noconfirm --needed -Sy \
cups \
cups-filters \
cups-pdf \
cups-browsed \
system-config-printer \
avahi \
nss-mdns \
splix \
foomatic-db \
foomatic-db-engine \
foomatic-db-gutenprint-ppds \
foomatic-db-nonfree \
foomatic-db-nonfree-ppds \
foomatic-db-ppds \
gutenprint
if [[ -x "$(command -v systemctl)" ]]; then
sudo systemctl enable --now cups.service
fi
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
sudo mkdir -p /etc/systemd/resolved.conf.d
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
if [[ -x "$(command -v systemctl)" ]]; then
sudo systemctl enable --now avahi-daemon.service
fi
# Enable automatically adding remote printers
if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
fi
if [[ -x "$(command -v systemctl)" ]]; then
sudo systemctl enable --now cups-browsed.service
fi