Showing posts with label lpstat. Show all posts
Showing posts with label lpstat. Show all posts

Saturday, 20 May 2017

How to add a fake dummy null printer in linux machine

Their are several way to configure the printer in linux operating system like Red Hat Linux, CentOS etc. You can configure normal local printer with any of these operating system very easily but if some one asked you to configure the fake dummy null printer with linux system, then its goes tricky.

Here, you can find the step by step simple solution of tricky issue. To configure the null printer in linux not much complex but you have to knowledge about the basic command of how to add a printer.

Before moving the main topic we need to know about the package installation system on linux servers. Generally YUM utility and rpm package manager are used for installation of required package of printer.

You can check my below link , how to configure YUM server on linux operating system.

https://unixforsolutions.blogspot.in/2017/05/how-to-configure-yum-server-in-red-hat_14.html

Once you go with my above link you can get an idea about how yum server is configure. So now we will go to main topic.

➤ Initially you need to install the required packages to configure the null printer. Please refer the below command to install the rpm.

[root@localhost]# yum install system-config-printer*

Cups is also required for printer configuration , so please use the below command to install cups services package.

[root@localhost]# yum install cups*

➤ Once the printer packages are installed then start the cup services on the server. Please use the below command to start the cup service.

[root@localhost]# systemctl start cups

You can check the status of cups services using below command.

[root@localhost]# systemctl status cups
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: active (running) since SAT 2017-05-20 14:34:11 IST; 4s ago

➤ Also you need to changed the entry in printer configuration file. "/etc/cups/cupsd.conf is configuration file in linux machine. Open the configuration file and change the parameter FileDevice to yes.

➤ Now, please run the below command to add a printer on the server.

[root@localhost]# lpadmin -p myprinter -E -v file:///dev/null

above command is used for adding a null printer in linux machine, if you want to check the status of printer, then please use the below command.

[root@localhost]# lpstat -s
no system default destination
device for myprinter: ///dev/null

You can find the above output if you are successfully configured the printer. Using this you can check the current device printer status.

Please comment on the post, if you have any query regarding this null printer installation topic.