Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUPS 2.0 lpstat and lpinfo commands return "Bad file descriptor" [closed]

I have installed cups 2.0 on my Ubuntu box. I installed from source. When I type the first few commands in the CUPS manual it returns the message Bad file descriptor. Here is an example

VPCZ12V9E:~$ sudo lpinfo -m
lpinfo: Bad file descriptor
VPCZ12V9E:~$ lpstat -p
lpstat: Bad file descriptor

Please suggest why this is happening? It implies to me that I have a problem. I have not tried adding a printer yet. I have only installed CUPS 2.0.

like image 537
Sav-econ Avatar asked Nov 03 '14 13:11

Sav-econ


2 Answers

Ensure also you have Started Cupsd Service

According to the ArchWiki (https://wiki.archlinux.org/index.php/CUPS), the service is called: org.cups.cupsd.service

Check the service by: sudo systemctl status org.cups.cupsd.service

Start (if not started) the service by: sudo systemctl start org.cups.cupsd.service

Enable the service (if not enabled) by: sudo systemctl enable org.cups.cupsd.service

like image 185
Marcelo Teixeira Ruggeri Avatar answered Sep 21 '22 01:09

Marcelo Teixeira Ruggeri


I had the same error message. According to https://bbs.archlinux.org/viewtopic.php?id=185298 , make sure that /etc/cups/client.conf contains

ServerName /var/run/cups/cups.sock
like image 44
jrouquie Avatar answered Sep 22 '22 01:09

jrouquie