[Tutorial] USB printer - print or scan

Nemesis related tutorials and docs
Forum rules
Please only post tutorials and HOWTOs in here. It should not be a discussion area.
Locked
aus9

[Tutorial] USB printer - print or scan

Post#1 by aus9 » 02 Feb 2016, 10:28

Index

post 1 this post is simple instructions for non-HP printers
post 2 simple scan
post 3 errors and comments
post 4 config and logs....mainly for trouble shooting
post 5 for HP printers that do not have a driver from gutenprint

HP wireless printer setup is a separate tutorial here https://forum.porteus.org/viewtopic.php?f=138&t=5488

Assumptions

There are alternative ways to setup a USB printer and I assume you have booted up with a changes cheatcode
on Nemesis v 3.5. In all my tutorials I only offer limited support for the version I tested it on. And I try
to revisit and re-test each new version. Thanks for testing Nemesis.

The printer chosen is Epson TX110 which has 4 separate colour ink refills. If I open the printer to look at my
refills the order is cyan yellow magenta black and that is abbreviated as CYMK. So its not a RGB ink system.

This is not a tutorial to setup a wireless printer OK. However CUPS still needed avahi* software which relates to wireless. YMMV
See post 3 for my attempt not to have avahi if interested

Note HP printers do have a number of drivers provided by the gutenprint package but mine hasn't.
So if you are a HP user, try post 1 first then look at post 5 please. IMHO older HP printers can use Gutenprint but if you want to go Wireless don't install Gutenprint but use Hplip.

Install packages

Either use package manager (gui) or commands, alternative to pman is pacman and gui is a front end to pacman
as root

Code: Select all

pman -S cups cups-openrc gutenprint avahi-openrc
rc-update add cupsd default
rc-update add avahi-dnsconfd default
rc-status
Optional you don't need to run the rc-update commands but each time to want to print you have to start the
cups daemon and its dependency manually.

Start the daemons (local server or service)
On first install, cups and its dependency will be stopped at the moment so lets start up cups
as root

Code: Select all

rc-service cupsd start
avahi-daemon     | * Starting avahi-daemon ... [ ok ]
cupsd            | * Starting cupsd ... [ ok ]
Now open your web browser and enter this address into the url address bar
Normally done by the user who logged in, hopefully guest ;)
http://localhost:631/

and press enter....wait about 10 seconds and the Cups pages should appear.
Image

Now click on admin.....and turn on printer and connect USB cable

Do NOT click on find printers please. Instead click on add printers as we need to setup
the root password so Cups can remember it next time.

When you see the login popup box you put user as root and password is the root password. Click OK please.
Image

If the password popup box re-appears then you are human and input the wrong password. Its the root password not the guest password.
:D

Now we can go back to admin page and click find printers and here is my result
Image

you can change the default names location etc to something meaningful or obtuse as you see fit.

Choose either a generic driver or you may find gutenprint has an exact match? as per mine
Image

Don't forget to complete the process by clicking on the bottom button

if you forgot to setup your locale the next screen is likely to show the US page format called letter.

Australia and most other countries use A4.

setting up locale is a different subject we ignore that and choose A4-or whatever you need if its not showing as your default-----if you need to change it.

Now click on printers to see a summary of your changes.

I suggest you try to print a small line of text first and if it works then do a test page
thru
printer -> mainenance -> print test page

I used the scan to get image
Image

aus9

Re: [Tutorial] USB printer - print or scan

Post#2 by aus9 » 02 Feb 2016, 10:41

post 2

Set up scanner

CUPS is a printer software not including scanner software. So I chose to install the simple scanner as root

Code: Select all

pman -S simple-scan
I highly recommend you do not attempt to scan until you check out the preferences tab.

simple-scan is a gui to the backend called sane. There is a larger gui but this post is for the simple scanner.
On LXDE click the menu then graphics to find the menu icon.

For my TX110 it actually detected it as a NX110 but it still scanned ok. Its up to you to check out your specs to see what DPI or resolution your scanner is capable of.

Because CUPS and scanning software are independent of each other you can install just the scanning software if that is all you need or vice versa.

aus9

Re: [Tutorial] USB printer - print or scan

Post#3 by aus9 » 02 Feb 2016, 10:50

post 3

Errors and comments

Because I knew I had a local USB printer I tried not starting the avahi daemon and got this error in web browser.
Image

So until further notice please follow the suggestions in post one and allow avahi-daemon to stay on please.

The image says firefox meaning a web browser, you do not need firefox but any decent web browser will do.

2) To check cups is running, as local or root user repeat this command

Code: Select all

rc-status
what you are looking for is both cups and the avahi* entry are started and not stopped

There are 2 avahi daemons.

3) If you edit a cups configuration file, this must be done as root. CUPS knows only your old config so you must stop and re-start cups
as root

Code: Select all

rc-service cupsd stop
rc-service cupsd start
################################################################################

simple scanner does not use a daemon so there is nothing to stop or re-start if you have errors.

I will try to get errors later to update this tut

YMMV

aus9

Re: [Tutorial] USB printer - print or scan

Post#4 by aus9 » 03 Feb 2016, 04:06

post 4

reserved for config and logs mainly for trouble shooting

Before you change any config please make a backup of
/etc/cups/cupsd.conf

Next use root powers to edit the log output which currently shows
LogLevel warn
change warn to debug.

Next you need to stop and restart cups daemon as shown above.

#################################################

If you have a USB printer and can not figure out what went wrong after following this tutorial and you are on v 3.5
post your make and model and a link to your log please. I use Dropbox and have no concerns if govts want to spy on me as I already know I am good looking. :D

Do not paste or attempt to paste your log in the post please.
Do not snip your log to what you think is wrong.....I am human not claiming to be an expert but we need the full log.

aus9

Re: [Tutorial] USB printer - print or scan

Post#5 by aus9 » 03 Feb 2016, 04:27

post 5

For those who attempted to use a gutenprint driver for a HP USB printer and can not find a suitable driver, this is your post!

We now attempt to use a different package

Done as root

Code: Select all

pman -S hplip
Either restart cups or pull the usb cable and redo the find printers button as per post one gives me this image

Image

The top entry is a cups entry and if I choose it will try to find a gutenprint driver....but wont' find an exact match
The bottom entry shows hplip and that is one I will choose

Image

don't forget to then click on add printer and complete any other tweaks like paper size etc

Locked