LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 09-20-2005, 09:43 AM   #1
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
Finally working Linux to Linux printing


Like most things it's easy after you've spent nearly 2 weeks in totally incomprehensible documentation written by people who have obviously never sat down with Dumb Users like me.

Anyway most of the problem seemed to be that Browsing etc on the SERVER side ( for people like me that means the machine that the Printer is connected to) was disabled by default even though there is NO mention of this when using either KDE or the CUPS web admin interface (localhost:931).

Anyway to save a lot of time and hassle

1) Install printer on the machine where it's physically attached to normally ==YAST etc.
2) Edit your cupsd.conf file (on the machine where the printer is attached to)

Here's the CUPSD.CONF I'm using (/etc/cups) -- my remote host is blueboar.site with IP address at 192.168.1.4

I've deleted the Non user stuff. Note the BROWSING option is by default OFF (Crazy when setting up).

You can add security etc after the initial configuration works.

########
######## Server Identity
########

#
# ServerName: the hostname of your server, as advertised to the world.
# By default CUPS will use the hostname of the system.
#
# To set the default server used by clients, see the client.conf file.
#

ServerName blueboar.site
#
# ServerAdmin: the email address to send all complaints/problems to.
# By default CUPS will use "root@hostname".
#

#ServerAdmin root@your.domain.com


########
######## Server Options
########


#
# User/Group: the user and group the server runs under. Normally this
# must be lp and lp, however you can configure things for another
# user or group as needed.
#
# Note: the server must be run initially as root to support the
# default IPP port of 631. It changes users whenever an external
# program is run, or if the RunAsUser directive is specified...
#

#User lp
#Group lp
User lp
Group lp
RunAsUser Yes



########
######## Network Options
########

#
# Ports/addresses that we listen to. The default port 631 is reserved
# for the Internet Printing Protocol (IPP) and is what we use here.
#
# You can have multiple Port/Listen lines to listen to more than one
# port or address, or to restrict access:
#
# Port 80
# Port 631
# Listen hostname
# Listen hostname:80
# Listen hostname:631
# Listen 1.2.3.4
# Listen 1.2.3.4:631
#
# NOTE: Unfortunately, most web browsers don't support TLS or HTTP Upgrades
# for encryption. If you want to support web-based encryption you'll
# probably need to listen on port 443 (the "https" port...)
#
# NOTE 2: In order for the command-line and web interfaces to work, you
# must have at least one Port or Listen line that allows access from the
# local loopback address (localhost).
#

#Port 80
#Port 443
Port 631

#
# HostNameLookups: whether or not to do lookups on IP addresses to get a
# fully-qualified hostname. This defaults to Off for performance reasons...
#

HostNameLookups On


#
# Browsing: whether or not to broadcast and/or listen for CUPS printer
# information on the network. Enabled by default.
#

#Browsing On

#
# BrowseProtocols: which protocols to use for browsing. Can be
# any of the following separated by whitespace and/or commas:
#
# all - Use all supported protocols.
# cups - Use the CUPS browse protocol.
# slp - Use the SLPv2 protocol.
#
# The default is "cups".
#
# NOTE: If you choose to use SLPv2, it is *strongly* recommended that
# you have at least one SLP Directory Agent (DA) on your
# network. Otherwise, browse updates can take several seconds,
# during which the scheduler will not respond to client
# requests.
#

#BrowseProtocols cups

#
# BrowseAddress: specifies a broadcast address to be used. By
# default browsing information is not sent!
#
# Note: HP-UX does not properly handle broadcast unless you have a
# Class A, B, C, or D netmask (i.e. no CIDR support).
#
# Note: Using the "global" broadcast address (255.255.255.255) will
# activate a Linux demand-dial link with the default configuration.
# If you have a LAN as well as the dial-up link, use the LAN's
# broadcast address.
#
# The @LOCAL address broadcasts to all non point-to-point interfaces.
# For example, if you have a LAN and a dial-up link, @LOCAL would
# send printer updates to the LAN but not to the dial-up link.
# Similarly, the @IF(name) address sends to the named network
# interface, e.g. @IF(eth0) under Linux. Interfaces are refreshed
# automatically (no more than once every 60 seconds), so they can
# be used on dynamically-configured interfaces, e.g. PPP, 802.11, etc.
#

#BrowseAddress x.y.z.255
#BrowseAddress x.y.255.255
#BrowseAddress x.255.255.255
#BrowseAddress 255.255.255.255
BrowseAddress @LOCAL
#BrowseAddress @IF(name)

#
# BrowseShortNames: whether or not to use "short" names for remote printers
# when possible (e.g. "printer" instead of "printer@host".) Enabled by
# default.
#

BrowseShortNames Yes

#
# BrowseAllow: specifies an address mask to allow for incoming browser
# packets. The default is to allow packets from all addresses.
#
# BrowseDeny: specifies an address mask to deny for incoming browser
# packets. The default is to deny packets from no addresses.
#
# Both "BrowseAllow" and "BrowseDeny" accept the following notations for
# addresses:
#
# All
# None
# *.domain.com
# .domain.com
# host.domain.com
# nnn.*
# nnn.nnn.*
# nnn.nnn.nnn.*
# nnn.nnn.nnn.nnn
# nnn.nnn.nnn.nnn/mm
# nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm
# @LOCAL
# @IF(name)
#
# The hostname/domainname restrictions only work if you have turned hostname
# lookups on!
#

#BrowseAllow address
#BrowseDeny address

BrowseAllow @LOCAL
#BrowseDeny All

#
# BrowseInterval: the time between browsing updates in seconds. Default
# is 30 seconds.
#
# Note that browsing information is sent whenever a printer's state changes
# as well, so this represents the maximum time between updates.
#
# Set this to 0 to disable outgoing broadcasts so your local printers are
# not advertised but you can still see printers on other hosts.
#

#BrowseInterval 30

#
# BrowseOrder: specifies the order of BrowseAllow/BrowseDeny comparisons.
#

#BrowseOrder allow,deny
#BrowseOrder deny,allow

#
# BrowsePoll: poll the named server(s) for printers
#

#BrowsePoll addressort

#
# BrowsePort: the port used for UDP broadcasts. By default this is
# the IPP port; if you change this you need to do it on all servers.
# Only one BrowsePort is recognized.
#

#BrowsePort 631

#
# BrowseRelay: relay browser packets from one address/network to another.
#

#BrowseRelay source-address destination-address
#BrowseRelay @IF(src) @IF(dst)

#
# BrowseTimeout: the timeout for network printers - if we don't
# get an update within this time the printer will be removed
# from the printer list. This number definitely should not be
# less the BrowseInterval value for obvious reasons. Defaults
# to 300 seconds.
#

#BrowseTimeout 300

#
# ImplicitClasses: whether or not to use implicit classes.
#
# Printer classes can be specified explicitly in the classes.conf
# file, implicitly based upon the printers available on the LAN, or
# both.
#
# When ImplicitClasses is On, printers on the LAN with the same name
# (e.g. Acme-LaserPrint-1000) will be put into a class with the same
# name. This allows you to setup multiple redundant queues on a LAN
# without a lot of administrative difficulties. If a user sends a
# job to Acme-LaserPrint-1000, the job will go to the first available
# queue.
#
# Enabled by default.
#


# AuthType: the authorization to use:
#
# None - Perform no authentication
# Basic - Perform authentication using the HTTP Basic method.
# Digest - Perform authentication using the HTTP Digest method.
#
# (Note: local certificate authentication can be substituted by
# the client for Basic or Digest when connecting to the
# localhost interface)
#
# AuthClass: the authorization class; currently only "Anonymous", "User",
# "System" (valid user belonging to group SystemGroup), and "Group"
# (valid user belonging to the specified group) are supported.
#
# AuthGroupName: the group name for "Group" authorization.
#
# Order: the order of Allow/Deny processing.
#
# Allow: allows access from the specified hostname, domain, IP address,
# network, or interface.
#
# Deny: denies access from the specified hostname, domain, IP address,
# network, or interface.
#
# Both "Allow" and "Deny" accept the following notations for addresses:
#
# All
# None
# *.domain.com
# .domain.com
# host.domain.com
# nnn.*
# nnn.nnn.*
# nnn.nnn.nnn.*
# nnn.nnn.nnn.nnn
# nnn.nnn.nnn.nnn/mm
# nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm
# @LOCAL
# @IF(name)
#
# The host and domain address require that you enable hostname lookups
# with "HostNameLookups On" above.
#
# The @LOCAL address allows or denies from all non point-to-point
# interfaces. For example, if you have a LAN and a dial-up link,
# @LOCAL could allow connections from the LAN but not from the dial-up
# link. Similarly, the @IF(name) address allows or denies from the
# named network interface, e.g. @IF(eth0) under Linux. Interfaces are
# refreshed automatically (no more than once every 60 seconds), so
# they can be used on dynamically-configured interfaces, e.g. PPP,
# 802.11, etc.
#
# Encryption: whether or not to use encryption; this depends on having
# the OpenSSL library linked into the CUPS library and scheduler.
#
# Possible values:
#
# Always - Always use encryption (SSL)
# Never - Never use encryption
# Required - Use TLS encryption upgrade
# IfRequested - Use encryption if the server requests it
#
# The default value is "IfRequested".
#

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From @LOCAL
</Location>

#<Location /classes>
#
# You may wish to limit access to printers and classes, either with Allow
# and Deny lines, or by requiring a username and password.
#
#</Location>


<Location /admin>
#
# You definitely will want to limit access to the administration functions.
# The default configuration requires a local connection from a user who
# is a member of the system group to do any admin tasks. You can change
# the group name using the SystemGroup directive.
#

AuthType BasicDigest
AuthClass Group
AuthGroupName sys

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.*

#Encryption Required
</Location>

#
# End of "$Id: cupsd.conf.in,v 1.17 2005/01/03 19:29:45 mike Exp $".
#

Now DON'T USE YAST for configuring the printer on the client -- I've never been able to get this to work and still can't. YAST was fine for LOCAL printers or even SAMBA (using a Windows printer) but I failed totally and utterly getting a Remote to work with YAST (apart from a SAMBA server). The Cups web interface works fine (or even the KDE print manager) once you have even a smidgen of an idea of what to enter which I didn't at the start.

(Don't misunderstand me here --YAST is really great for everything else I've needed it for).

Edit your cups client.conf on the client machine (running redfox.site at 192.168.1.3)

#
# "$Id: client.conf,v 1.9 2005/01/03 19:29:45 mike Exp $"
#
# Sample client configuration file for the Common UNIX Printing System
# (CUPS).
#

# ServerName: the hostname of your server. By default CUPS will use the
# hostname of the system or the value of the CUPS_SERVER environment
# variable. ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME. To use
# more than one server you must use a local scheduler with browsing
# and possibly polling.
#

ServerName blueboar.site

#
# Encryption: whether or not to use encryption; this depends on having
# the OpenSSL library linked into the CUPS library.
#
# Possible values:
#
# Always - Always use encryption (SSL)
# Never - Never use encryption
# Required - Use TLS encryption upgrade
# IfRequested - Use encryption if the server requests it
#
# The default value is "IfRequested". This parameter can also be set
# using the CUPS_ENCRYPTION environment variable.
#

#Encryption Always
#Encryption Never
#Encryption Required
#Encryption IfRequested


#
# End of "$Id: client.conf,v 1.9 2005/01/03 19:29:45 mike Exp $".
#


just put the name of the server (blueboar.site) where it says server name.

Restart CUPS on the REMOTE machine (init.d/cups restart)

on the CLIENT machine get into the cups admin page (browser at localhost:631) --if it gives you not found then just go to localhost:631/admin.

Enter password -- if you haven't set this up then create a user (BAD DOCUMENTATION AGAIN -- DEFAULT ROOT WON'T WORK UNLESS ALREADY SET UP AS A USER) with lppasswd -g sys - root (or username)
enter password when prompted

now from the screens go to admin --add printers and just follow the screens -- it's an IPP device you need to add

You will eventually get prompted for the URI

for me I entered ipp://blueboar.site:631/printers/stylusphoto1290 as that was the name of my printer on the remote machine

Then you'll get prompted for drivers etc (bog standard stuff)

Now you can Test print a page.

Finally

What a DOGS DINNER over something that should really be VERY SIMPLE --

I'd hate to see someone's 90 year old grandmother trying to fathom all this out.

Cheers.

One postscript -- there's a lot of fixed IP addresses here -- I'm actually using DHCP so these addresses could change --I'll have to fathom some stuff out with DSN lookups or something but at least the base configuration is working.

-K

Last edited by 1kyle; 09-20-2005 at 09:55 AM.
 
Old 09-21-2005, 08:11 PM   #2
BruceCadieux
Member
 
Registered: Apr 2002
Location: Wales MA.
Distribution: openSuSE 11.1
Posts: 409

Rep: Reputation: 32
I usually just go into Yast, Hardware, Printers, add new printer, IP Printer, enter IP of machine, select printer type, and all works fine.
 
Old 09-22-2005, 08:31 AM   #3
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Original Poster
Rep: Reputation: 32
There were problems with YAST for adding remote (Linux) printers -- adding LOCAL printers or remote Windows / SAMBA printers was no problem

The documentation (and YAST doesn't specify it either) when you CAN find it specifies you have to do a number of things FIRST on the REMOTE machine before you can connect / use the printer.

Without modifying the cups files on the REMOTE machine --I'd be very interested how you got this to work using YAST.

(Note -- I'm NOT interested in connecting to a Print SERVER or a SERVER machine -- I'm merely printing to a printer LOCALLY attached to a STAND ALONE MACHINE --the only connection between the machines is via a bog standard LAN (through a router).

I managed to solve it with difficulty -- I certainly couldn't have done this with YAST.

Cheers

-K
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
O M G!!!!!!!! I FINALLY GOT MY iPOD WORKING IN LINUX!!!!!!! (Newbie Guide) Ausar LinuxQuestions.org Member Success Stories 31 06-13-2005 06:35 PM
Finally Got the internet on Linux! Ian_Hawdon LinuxQuestions.org Member Success Stories 0 01-29-2005 09:21 AM
Linux keyboard---Finally! Zcat General 10 09-19-2004 02:26 PM
Finally got my Wireless working on Linux But it is really slow QzarBaron Linux - Wireless Networking 0 08-21-2004 06:33 PM
my Linux is finally userfriendly LILLY4117 LinuxQuestions.org Member Success Stories 2 09-25-2003 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration