Skip to content

Instantly share code, notes, and snippets.

@dwhelan
Created August 14, 2021 20:50
Show Gist options
  • Save dwhelan/48cdb6912648bb20064b5259349e7295 to your computer and use it in GitHub Desktop.
Save dwhelan/48cdb6912648bb20064b5259349e7295 to your computer and use it in GitHub Desktop.
Setup for Raspberry PI 4 printer server using CUPS and legacy support for Samsung printers

Update

sudo apt-get update
sudo apt-get upgrade
reboot

Install cups

sudo apt-get install cups
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo systemctl restart cups

Build Samsung Postscript Printer Definitions - ppds

mkdir -p ~/ppd
cd ~/ppd

Install dev libraries

sudo apt-get install libcups2-dev

Download Splix 2.0.0

wget -O ~/Downloads/splix-2.0.0.tar.bz2 https://pilotfiber.dl.sourceforge.net/project/splix/splix/2.0.0/splix-2.0.0.tar.bz2
tar xjf ~/Downloads/splix-2.0.0.tar.bz2
cd splix-2.0.0

Patch Splix files to make it build

sed -i 's/const PPDFile::Value::Value/const PPDFile::Value/g' src/ppdfile.cpp
sed -i 's/-lcupsimage/-lcupsimage -pthread/g' module.mk

build the drivers

make THREADS=4
sudo su -c 'make install'

Install VNC

sudo apt install realvnc-vnc-server realvnc-vnc-viewer
sudo raspi-config

Install Fira Code

mkdir -p ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done
fc-cache -f

Enable SSL

disable wifi power management

sudo iwconfig wlan0 power off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment