Define a printer on Ubuntu using CUPS
February 14th, 2011Took me some time to find this out digging the Net, hence creating a note here.
Example with a Ricoh printer (but Ubuntu includes tons of drivers), network connected and listening on IP 192.168.1.10.
lpadmin -E -p<my printer name> -v socket://<my printer address> -P /usr/share/ppd/openprinting/Ricoh/PS/Ricoh-Aficio_SP_4210N_PS.ppd.gz -u allow:all
lpadmin -d <my printer name>
cupsenable <my printer name>
accept <my printer name>
echo "I am a Genius" | lpr -d
lpr -d mytextfile.txt