Last active
April 4, 2023 15:44
-
-
Save mofosyne/c84d23d863454478b4d192b9ca9afd5b to your computer and use it in GitHub Desktop.
LBP3000 CAPT driver on Linux automated compile process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# LBP3000 CAPT driver on Linux automated compile process | |
# Based on https://namvu.net/2021/07/setup-a-family-printer-with-a-raspberry-pi-1-and-canon-lbp-2900/ | |
# But updated to use https://github.com/mounaiban/captdriver which is a more maintained fork | |
# This script was tested and confirmed working against a Debian GNU/Linux 11 (bullseye) on an x64 based PC | |
# (This script would also likely work on Ubuntu) | |
# Intent: This is intended to be used on a newly installed PC to install this old LBP3000 driver | |
# if running again, you may need to pull any new changes from the source repo yourself. | |
# To run this shell script on gist (ref: https://gist.github.com/mob-sakai/174a32b95572e7d8fdbf8e6f43a528f6) | |
# Run this script via curl: | |
# bash <(curl -sL https://gist.githubusercontent.com/mofosyne/c84d23d863454478b4d192b9ca9afd5b/raw/LBP3000_opensource_captdriver_compile.bash) | |
# Run this script via wget: | |
# bash <(wget -o /dev/null -nv -O - https://gist.githubusercontent.com/mofosyne/c84d23d863454478b4d192b9ca9afd5b/raw/LBP3000_opensource_captdriver_compile.bash) | |
# Installing CUPS and the rest of the perequisites: | |
sudo apt install -y build-essential git autoconf libtool cups libcups2-dev libcupsimage2-dev | |
# Grab the source code: | |
git clone https://github.com/mounaiban/captdriver.git | |
# Compile the driver | |
pushd captdriver | |
autoreconf -i | |
./configure | |
make | |
make ppd | |
popd | |
# Install captdriver | |
# The make install command above only copies the rastertocapt binary to the /usr/local/bin directory, | |
# while setting the necessary file ownerships and permissions. | |
# The cp command is still needed to place a copy of rastertocapt inside the CUPS filter directory. | |
pushd captdriver | |
sudo make install | |
popd | |
# Copy the files to their relevant locations | |
pushd captdriver | |
sudo cp src/rastertocapt /usr/lib/cups/filter/ | |
sudo cp ppd/Canon*.ppd /usr/share/ppd/custom/ | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment