Share USB Printer from Arch Linux ARM install

Ask questions about Arch Linux ARM. Please search before making a new topic.

Share USB Printer from Arch Linux ARM install

Postby nerom86 » Sat Nov 13, 2010 8:47 am

Hi, i want to share an attached usb printer. Can someone please post the basic steps which i need to do. ive read some about cups abut i cant figure out how it works...

the packages are isntalled already and i got this device:

T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0482 ProdID=0003 Rev=00.00
S: Manufacturer=Kyocera Mita
S: Product=Kyocera Mita FS-1010
S: SerialNumber=XAL2Z5xxxx
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

many thanks
nerom86
 
Posts: 10
Joined: Wed Nov 10, 2010 3:18 pm

Re: Share USB Printer from Arch Linux ARM install

Postby pepedog » Sat Nov 13, 2010 10:27 am

This means someone is going to have to explain samba and cups to you.
Looks like printer will work fine http://www.openprinting.org/printer/kyocera/kyocera-fs-1010
Basically, install cups and samba
pacman -S cups and samba
and play with config files in /etc
There is a web interface with cups on port 631
Maybe webmin will help you?

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Share USB Printer from Arch Linux ARM install

Postby nerom86 » Sun Nov 14, 2010 8:33 am

im not expecting that someone explains me how to use cups and samba.

what id like is some help - e.g. what basic steps have to be done , then i can look up for the instructions

for example : install drivers? do i need any files except of the packages? what are the config files? i just dont know where to start

what you said is a little help, though i had the packages installed already as i mentioned. i cant access theweb interface on 631 ( i guess it has to be enabled)

plus the general info about cups and the actual case "Arch Linux ARM install" are quite different i presume :)

im _totally_ new to linux and up to now ive only used windows machines

im not expecting that ill find all the infos in a day.. butif someone knows something what would help me just write down the commands which i have to execute.. , im patient :)
nerom86
 
Posts: 10
Joined: Wed Nov 10, 2010 3:18 pm

Re: Share USB Printer from Arch Linux ARM install

Postby pepedog » Sun Nov 14, 2010 10:16 am

I assume you have done
pacman -Syu
pacman -S cups samba webmin
Start with (just examples, you can work out stop or restart easily)
/etc/rc.d/cups start

Here is my /etc/samba/smb.conf
/media/share is owned my user nobody
I access with \\POGOSILVER from windows
testparm checks the syntax
$this->bbcode_second_pass_code('', '[global]
workgroup = TIGERDOM
netbios name = pogosilver
server string = Samba Silver Server
security = share
hosts allow = 192.168. 127.
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 50
local master = no
os level = 33
preferred master = yes
wins support = yes
dns proxy = no

[homes]
comment = linux home for %u
username = %S
read only = No
create mask = 0750
case sensitive = No
hide unreadable = Yes
browseable = yes
writable = yes

[public]
path = /media/share
public = yes
writable = yes
comment = All share
browseable = yes
guest ok = yes')

Here is my /etc/cups/cupsd.conf
Make sure cups is stopped when editing
Change Listen to your own plugs ip address
Change allow to your local range
I access with https://192.168.3.1:631/, yours will be plug ip address
This is where you can add the printer
Username it asks for will be root

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Share USB Printer from Arch Linux ARM install

Postby nerom86 » Sun Nov 14, 2010 2:00 pm

ok i got webmin running however it was port 10000 by default , so now i can add the printer

though the cups driver list is empty
nerom86
 
Posts: 10
Joined: Wed Nov 10, 2010 3:18 pm

Re: Share USB Printer from Arch Linux ARM install

Postby pepedog » Sun Nov 14, 2010 2:05 pm

I forgot to include my cups.conf, its not standard and allows local network access.
Don't forget to stop cups when editing, and also modify ip addresses
$this->bbcode_second_pass_code('', '#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Administrator user group...
SystemGroup sys root
Group lp

# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.3.1:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
Order allow,deny
allow 192.168.3.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
allow 192.168.3.*
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
allow 192.168.3.*
</Location>

# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an administrator...
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
</Limit>

<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#
')

You add printers vis the 631 interface

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Share USB Printer from Arch Linux ARM install

Postby nerom86 » Sun Nov 14, 2010 2:28 pm

ok cups working now and i am in the admin panel however it does not recognize my printer

Available Printers

No printers found.
nerom86
 
Posts: 10
Joined: Wed Nov 10, 2010 3:18 pm

Re: Share USB Printer from Arch Linux ARM install

Postby floydbloke » Wed Mar 16, 2011 5:38 am

Apologies for bumping a very old topic but I thought I’d share my experience, it may help someone else. Note that I’m very much a noob (two weeks ago I couldn’t spell Lunix) so I’ll happily stand corrected on anything below.

Anyway, I suffered the same issue in that CUPS through the web interface didn’t detect my USB printer. I simply needed to set it up as a raw printer. There doesn’t seem to be an option in the CUPS config util to add a USB printer. So on to webmin, this allowed me to add a printer connected to USB. After that the queue showed in the CUPS utility with a connection of usb:/dev/usb/lp0.

No success printing at this stage though, jobs in the queue would show as ‘Waiting for printer to become ready”
SSHing into the plug did prove the existence of /dev/usb/lp0 and it would disappear without he printer connected.
After many hours googling various related phrases (and yelling a few choice words at the PC in my frustration) I came across something that mentioned something should read file:/dev/usb/lp0

I then proceeded to check the various conf files. In etc/cups/printers.conf I found a line DeviceURI usb:/dev/usb/lp0, I changed it to DeviceURI file:/dev/usb/lp0. Restarted CUPS and voila, the printer kicked into life.

Also, can someone please tell me the command to get the output that nerom86 lists in his opening post.
floydbloke
 
Posts: 15
Joined: Fri Mar 04, 2011 12:25 am

Re: Share USB Printer from Arch Linux ARM install

Postby pepedog » Wed Mar 16, 2011 10:18 am

$this->bbcode_second_pass_quote('floydbloke', 'A')lso, can someone please tell me the command to get the output that nerom86 lists in his opening post.

usb-devices
lsusb and dmesg can give useful info too.

Something maybe missed on above posts are some other packages-
foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters
and for HP printers
hplip hpoj
I was probably wrapped up in my own printer issues, a Brother HL2030, and manufacturer only does an i386 binary driver and wrapper. I'm going to look at your file tip and try raw.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Share USB Printer from Arch Linux ARM install

Postby pepedog » Thu Mar 17, 2011 12:03 am

I will let you know how Airprint works soon (hopefully), it's appearing on iPad print but doesn't actuelly print, think reboot is required?

Edit: Airprint working, even reported to iPad ink level was low
This helped http://atxconsulting.com/blog/tjfontaine/2010/11/21/automatically-generate-airprint-avahi-service-files-cups-printers
Note that you have to change first line of airprint-generate.py to
#!/usr/bin/env python2
Running as root
./airprint-generate.py -d /etc/avahi/services
will scan configured printers in cups, and create avahi service files in the right place (then restart avahi daemon)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Next

Return to User Questions

Who is online

Users browsing this forum: No registered users and 26 guests