You are not logged in.
Pages: 1
Hi,
I have just installed arch and my problem might be completely trivial. I apologize if that is the case.
I am trying to configure my cups client as follows. At work I am connecting to a remote cups server and at home I have a local(host) cups server. My home printer is HP Deskjet 3520.
When setting the remote cups server in /etc/cups/client.conf I am able to print to the network printers. I was also able to install my printer using the web interface and then install hplip (as described here: https://wiki.archlinux.org/index.php/CUPS#HP_Printer). The problem is that it doesnt recognize the cups server and $ lpstat -t returns
scheduler is not running
no system default destination
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
By replacing the remote cups server with ServerName /var/run/cups/cups.sock in etc/cups/client.conf (as is suggested here: https://bbs.archlinux.org/viewtopic.php?id=185298) I have no problem printing to the installed printer.
My question is if there is a way to configure both my local printer and to connect to the cups server.
Thank you in advance and best regards,
Tomer
Offline
Hi
I use networkmanager and have created a file owned by root in /etc/NetworkManager/dispatcher.d to do this.
This method works if the ip address numeric ranges are different between the two sites.
I called the file /etc/NetworkManager/dispatcher.d/02cupsclient (I already had a file starting with "01") with this content...
#!/bin/sh -e
if [ -z "$1" ]; then
echo "$0: called with no interface" 1>&2
exit 1;
fi
case "$2" in
up)
rm -f /etc/cups/client.conf
if [ "`ip addr | grep 192.168.`" ]; then
ln -sf /etc/cups/client.conf_work /etc/cups/client.conf
fi
;;
down)
rm -f /etc/cups/client.conf
;;
*)
echo "$0: called with unknown action \`$2'" 1>&2
exit 1
;;
esac
change "192.168." in the above to the starting ip address range of your work network and also
chmod 755 /etc/NetworkManager/dispatcher.d/02cupsclient
Also create /etc/cups/client.conf_work with this content...
ServerName {ip address of work cups server}
When network manager detects you are on your work IP address range, then it symbolic links to your custom client.conf file to use your work cups server, otherwise it doesn't link the client.conf leaving you running your own cups system.
Hope this helps.
Cheers
Paul.
Last edited by paulkerry (2015-02-11 10:01:03)
Offline
Hi Paul,
Many thanks for your reply. Your solution works perfectly.
Best regards,
Tomer
Offline
Pages: 1