Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Difference between revisions of "CUPS"

From Void Linux Wiki
Jump to navigation Jump to search
m (Style guide, converted explicit man page refs to man template, linked some packages too.)
Line 1: Line 1:
[[Category:Guides]]
 
[[Category:Applications]]
 
= CUPS =
 
 
 
CUPS (Common Unix Printing System) is printer server software for *nix.
 
CUPS (Common Unix Printing System) is printer server software for *nix.
  
== Installing cups via xbps ==
+
== Installing CUPS via XBPS ==
  
<pre>xbps-install cups cups-filters</pre>
+
# xbps-install cups cups-filters
  
 
== Client software ==
 
== Client software ==
  
If you only need to access a CUPS server as a client then you only need to install <code>libcups</code>
+
If you only need to access a CUPS server as a client then you only need to install {{pkg|libcups}}:
  
<pre>xbps-install libcups</pre>
+
# xbps-install libcups
  
== Installing hplip via xbps ==
+
== Installing hplip via XBPS ==
  
If you have a hp printer and need hp drivers you should install hplip:
+
If you have an HP printer and need HP drivers you should install {{pkg|hplip}}:
  
<pre>xbps-install hplip</pre>
+
# xbps-install hplip
  
With your hp printer connected and switched on, the following instruction will guide you to install any required drivers. The defaults offered, marked with an asterix(*) and chosen with the return key, are typically satisfactory.
+
With your HP printer connected and switched on, the following instruction will guide you to install any required drivers. The defaults offered, marked with an asterix(*) and chosen with the {{key|Return}} key, are typically satisfactory.
  
<pre>sudo hp-setup -i</pre>
+
$ sudo hp-setup -i
  
 
== Installing drivers ==
 
== Installing drivers ==
  
If you have a Brother printer. You cannot find by setup CUPS by default or foomatic-db package. You have to install foomatic-db-nonfree package to start config it.
+
If you have a Brother printer, XBPS will ignore by default the {{pkg|cups}} and {{pkg|foomatic-db}} packages. You have to install the {{pkg|foomatic-db-nonfree}} package to start configuring it.
<pre>xbps-install foomatic-db foomatic-db-nonfree</pre>
+
 
 +
# xbps-install foomatic-db foomatic-db-nonfree
  
 
== Starting the CUPS server ==
 
== Starting the CUPS server ==
  
Be sure to enable and start the service before trying to use it.
+
Be sure to enable and start the service before trying to use it:
  
<pre>ln -s /etc/sv/cupsd /var/service/</pre>
+
# ln -s /etc/sv/cupsd /var/service/
for more documentation about using services see, for example: [[runit]]  
+
 
 +
For more documentation about using services, see for example [[runit]].
  
 
== Configure CUPS ==
 
== Configure CUPS ==
There are many different applications which can be used to configure CUPS.
 
If you prefer a GUI tool: perhaps your desktop manager has an application to do this, or install <code>system-config-printer</code>:
 
  
<pre>sudo xbps-install system-config-printer</pre>
+
There are many different applications which can be used to configure CUPS. If you prefer a GUI tool, perhaps your desktop manager has an application to do this, otherwise install {{pkg|system-config-printer}}:
 +
 
 +
$ sudo xbps-install system-config-printer
  
 
In order to add printers you will need to run system-config-printer as root:
 
In order to add printers you will need to run system-config-printer as root:
  
<pre>sudo system-config-printer</pre>
+
$ sudo system-config-printer
  
In any case, the CUPS server comes with a web interface, which can be accessed using a browser by entering the following address: http://localhost:631
+
In any case, the CUPS server comes with a web interface, which can be accessed by navigating to http://localhost:631 with your web browser.
  
Default settings can be configured, including locating network printers. Of course the command line can also be used to configure cupsd.
+
Default settings can be configured, including locating network printers. Of course the command line can also be used to configure cupsd. For example, it is a good idea to set the system's default printer:
  
For example, it's a good idea to set the system's default printer:
+
# lpotions -d <printer name>
  
<pre>lpotions -d &lt;printer name&gt;</pre>
 
 
A list of <printer name>s can be shown using:
 
A list of <printer name>s can be shown using:
  
<pre>lpstat -p</pre>
+
$ lpstat -p
 +
 
 +
== Command line interaction with CUPS ==
  
== Command line interaction with cups ==
+
The lp* commands can be used to set and get a lot of information from the CUPS server. For more information, read the manual entries for {{man|8|lpadmin}}, {{man|8|lpinfo}}, {{man|1|lpoptions}}, {{man|1|lpstat}}, {{man|1|lpq}}, {{man|1|lprm}}, etc.
  
The lp* commands can be used to set and get a lot of information from the cups server. For more information read the manual entries for: * lpadmin(8) * lpinfo(8) * lpoptions(1) * lpstat(1) * lpq(1) * lprm(1) etc.
+
[[Category:Guides]]
 +
[[Category:Applications]]

Revision as of 14:47, 12 September 2017

CUPS (Common Unix Printing System) is printer server software for *nix.

Installing CUPS via XBPS

# xbps-install cups cups-filters

Client software

If you only need to access a CUPS server as a client then you only need to install libcups:

# xbps-install libcups

Installing hplip via XBPS

If you have an HP printer and need HP drivers you should install hplip:

# xbps-install hplip

With your HP printer connected and switched on, the following instruction will guide you to install any required drivers. The defaults offered, marked with an asterix(*) and chosen with the Return key, are typically satisfactory.

$ sudo hp-setup -i

Installing drivers

If you have a Brother printer, XBPS will ignore by default the cups and foomatic-db packages. You have to install the foomatic-db-nonfree package to start configuring it.

# xbps-install foomatic-db foomatic-db-nonfree

Starting the CUPS server

Be sure to enable and start the service before trying to use it:

# ln -s /etc/sv/cupsd /var/service/

For more documentation about using services, see for example runit.

Configure CUPS

There are many different applications which can be used to configure CUPS. If you prefer a GUI tool, perhaps your desktop manager has an application to do this, otherwise install system-config-printer:

$ sudo xbps-install system-config-printer

In order to add printers you will need to run system-config-printer as root:

$ sudo system-config-printer

In any case, the CUPS server comes with a web interface, which can be accessed by navigating to http://localhost:631 with your web browser.

Default settings can be configured, including locating network printers. Of course the command line can also be used to configure cupsd. For example, it is a good idea to set the system's default printer:

# lpotions -d <printer name>

A list of <printer name>s can be shown using:

$ lpstat -p

Command line interaction with CUPS

The lp* commands can be used to set and get a lot of information from the CUPS server. For more information, read the manual entries for lpadmin(8), lpinfo(8), lpoptions(1), lpstat(1), lpq(1), lprm(1), etc.