Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Print service unavailable bad file descriptor (Read 4892 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

[SOLVED] Print service unavailable bad file descriptor

Hi @ all,

my system Artix stable plasma openrc, just installed (last sunday).

In systemsettings5 under printer is displayd the thread title and i cannot  add a new printer because greyed out.

How can i remedy to it?


 

Re: Print service unavailable bad file descriptor

Reply #1
cups + cups service installed and service added to start at boot, and started?
https://wiki.archlinux.org is for beginners obligatory (required) reading 📖 😉


Re: Print service unavailable bad file descriptor

Reply #3
Cups and cups-openrc are packages to be installed,
cups has to be configured to be started by default
(sometimes cups, sometimes cupsd)

sudo rc-update add cups (or cupsd) default

That's why cups-openrc is required.
Works on Artix and Devuan, both with Open-RC
The man pages my help as well.

Re: Print service unavailable bad file descriptor

Reply #4
yes, and avahi and his service started too and installed package print-manager, inclusive his optional dep system-config-printer.
you can still configure your printer via http://localhost:631, as you can read in wiki.archlinux.org in CUPS article

Re: Print service unavailable bad file descriptor

Reply #5
there are two avahi,
Code: [Select]
rc-update -v show | grep avahi
         avahi-daemon |                                       
       avahi-dnsconfd | 
the daemon ist startd

Re: Print service unavailable bad file descriptor

Reply #6
The complete procedure is>>
- Install packages and printer-drivers (in my case, "brother-hl3152cdw") with:
Code: [Select]
sudo pacman -S --needed cups-filters cups-openrc cups-pdf cups-pk-helper libcups print-manager system-config-printer

yay -S cups-nosystemd brother-hl3152cdw

NOTE: Don't install 'cups' conflicting with 'cups-nosystemd', by installing 'cups-nosystemd' the "old"  'cups' will be auto-removed. With "older" 'cups' you will not be able to configure the printer with 'systemsetting5'.
- Detect service if it is installed with:
Code: [Select]
rc-update -v show
- Enable service with:
Code: [Select]
sudo rc-update add cupsd default
- Start service with:
Code: [Select]
sudo rc-service cupsd start
- Check services (`cupsd` and `avahi-daemon`) are up and running with:
Code: [Select]
rc-status

your printer can be different
- Configure over `systemsettings5` or `http://localhost:631/printers`
SS5 can be different according to your Desktop-Environment (DE)

TROUBLESHOOTING:
Printer and or Scanner not working, by printing you get ERROR: "Cannot locate printer....", your printer is installed and listed under `localhost` and `systemsettings5`

1. Assure services (`cupsd` and `avahi-daemon`) are up and running (see above).
2. Assure `nss-mdns` is installed like here explained.
Code: [Select]
 sudo pacman -S nss-mdns
3. Edit/modify `/etc/nsswitch.conf`
3a. Original line
Code: [Select]
 hosts: files resolve [!UNAVAIL=return] dns 
3b. Modified and working line:
Code: [Select]
 hosts: files mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns 

NOTE-S:
1. Printer and scanner works by the installation, after some time stop both to works.
2. This works on my Artix Plasma OpenRC.
3. A restart or relogin is not necessary, printer & scanner works again as soon you store the changes in `/etc/nsswitch.conf`.
4. Please to the experts to correct, if necessary, these instructions.

### PDF-Printing / storage location

The standard storage location for `cups-pdf` and `cups-ocr` are respectively:
Code: [Select]
/var/spool/cups-pdf/${USER}

/var/spool/cups-ocr/${USER}
to change it to e.g.:
Code: [Select]
/home/${USER}/Documents/PDF

/home/${USER}/Documents/OCR
or other folder you must first create the new folders (if you wish) and edit/modify the following configurations-files:
Code: [Select]
/etc/cups/cups-pdf.conf

/etc/cups/cups-ocr.conf
for this, just add to disabled line `#Out /var/spool/cups-pdf/${USER}` respectively:
Code: [Select]
Out /home/${USER}/Documents/PDF

Out /home/${USER}/Documents/OCR

Note: Changes takes immediately effect!

Thanks for your friendness @[alium], you can post this next time someone (like me) ask again.

Re: [SOLVED] Print service unavailable bad file descriptor

Reply #7
if you learned anything new, i will be happy, because that was exactly my intention ;)

Re: [SOLVED] Print service unavailable bad file descriptor

Reply #8
if you learned anything new, i will be happy, because that was exactly my intention ;)
Your intention was I spend a lot of time to discover how to install and enable printer?

My intention is, next user want install it, to get all necessary information very quickly avoiding wasting time like me.

Next question would be: "Why is the printer with all dependency and activations not installed by default?" Of course without the printer-driver same.


Re: [SOLVED] Print service unavailable bad file descriptor

Reply #10
Why are you necrobumping an almost 5 month old thread? alium can't answer you, he isn't around on the forum anymore and his account seems to be inactive/banned.
The problem is: As I installed the system was able to print with `cups` than stop working cause of `cups-nosystemd`, than stop working cause of `nss-mdns` and final I don't found the PDF-printed pages cause of storing in `/var/spool/cups-pdf/${USER}`.

So I don't know why all those changes happen and I don't want tell you or Admin what to do, but, do you think a Printer-Wiki can help all users? An e-mail, at least to all registered forum-participants, a changelog, not only for important topics like printing but also for all changes happen? Do you think we will loose users by missing Wiki and poor communication?

That's for me an important point and not "necrobumping", tell me if I can help you/us anyway.

Re: [SOLVED] Print service unavailable bad file descriptor

Reply #11
The problem is: As I installed the system was able to print with `cups` than stop working cause of `cups-nosystemd`

There is no "cups-nosystemd' package in the artix repos, if you use AUR, you are on your own.

alium can't answer you, he isn't around on the forum anymore and his account seems to be inactive/banned.

Sad circumstances alium had to shift priorities in his private life.  :(

Re: [SOLVED] Print service unavailable bad file descriptor

Reply #12
I installed (and configured) CUPS on Artix precisely for PDF printing without any problems.

Like all other services on Artix, I knew I had to install Artix packages cups and cups-<my_init>, in my case cups-suite66, and activate the service cupsd.

After carefully and patiently reading the documentation, I configured CUPS and everything works perfectly on my system.

You can of course write your own guide, but the thing is, random user who doesn't like to read and wants instant gratification solutions will just ask how to set it up instead of reading your guide.