public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Collins Richey <erichey2@home.com>
To: gentoo <gentoo-dev@gentoo.org>
Subject: [gentoo-dev] Fw: cups installation and configuration
Date: Sun Sep 16 20:20:02 2001	[thread overview]
Message-ID: <20010916203055.1f27ca30.erichey2@home.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]

Oops, hit the send key before I was done; one more attachment.

Begin forwarded message:

Date: Sun, 16 Sep 2001 20:28:54 -0600
From: Collins Richey <erichey2@home.com>
To: gentoo <gentoo-dev@gentoo.org>
Subject: cups installation and configuration


Here's how to get cups up and functional on gentoo.  Note that cups
has an lpd-daemon interface that allows you to route and query print
via the normal lpr, lpq, lpstat, etc. methods.  For this to word,
(x)inetd is required to invoke the appropriate program cups-lpr, etc. 
The cups ebuild really should have a dependancy for (x)inetd, but it
doesn't.  Some programs (Netscape, kde stuff, etc.) don't have any way
to allow you to configure the printing service - lpr is invoked
automatically, so you need the daemon to make this work.  The
gimp-print stuff provides additional printer definition files over and
above the precious few in base cups.

Install packages
--------------------
emerge net-print/cupsd/cups-1.1.9.ebuild
emerge net-print/gimp-print-cups/gimp-print-cups-4.1.1.ebuild
emerge sys-apps/xinetd/xinetd-2.3.3-r6.ebuild

If you are using remote printers, also pick a package from
net-fs/samba (I'm not using samba at present)

Configuration files
------------------------
I'm attaching a copy of my files.  There are other configuration files
for xinetd to support other services that I don't use.  Let me know if
you need them.  I ripped the xinetd configuration from my jblinux 2.2
distro.

/etc/xinetd.conf
/etc/xinetd.d (a directory)
/etc/xinetd.d/cups-lpd
/etc/cups (a directory) (I didn't need to change any of the cups
configuration files)

Init files and runlevel links
---------------------------------
I cloned the /etc/init.d/xinetd script and created /etc/init.d/cupsd
(this is attached)
You need to create the following links to invoke the scripts
	ln -s /etc/init.d/xinetd /etc/runlevels/default/xinetd
        ln -s /etc/init.d/cupsd /etc/runlevels/default/cupsd

Reboot or restart net, and you are in business

Configuring a printer
---------------------------
Once cupsd and xinetd are running, configure your printers from your
favorite guid browser by going to
	http://localhost:631.  If you are not root, you will be prompted for
id and password.

Enjoy,
--- 
Collins Richey
Denver Area
gentoo_rc6 xfce+sylpheed



-- 
Collins Richey
Denver Area
gentoo_rc6 xfce+sylpheed

[-- Attachment #2: cupsd --]
[-- Type: application/octet-stream, Size: 564 bytes --]

#!/sbin/runscript

depend() {
	need xinetd
}

autoconfig() {
if [ ! -e /etc/cups/cupsd.conf ] ; then
	eerror "You need an /etc/cups/cupsd.conf file to run cupsd"
	return 1
fi
}

start() {
	autoconfig || return 1
	ebegin "Starting cupsd"
	start-stop-daemon --start --quiet --exec /usr/sbin/cupsd 1>&2
	eend $? 
}

stop() {
	ebegin "Stopping cupsd"
	start-stop-daemon --stop --quiet -u root -n cupsd 1>&2
	# long explanation removed; basically: keep things sane
	if [ $? -ne 0 ] ; then
		if [ -e /dev/shm/.init.d/started/cupsd ] ; then
			eend 0
		fi
	fi
	eend $?
}

                 reply	other threads:[~2001-09-17  2:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010916203055.1f27ca30.erichey2@home.com \
    --to=erichey2@home.com \
    --cc=gentoo-dev@cvs.gentoo.org \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox