-   Linux - Hardware (
-   -   Canon BJC-240 suddenly stopped working under Ubuntu 10.04 (

sdtrott 04-03-2012 11:53 PM

Canon BJC-240 suddenly stopped working under Ubuntu 10.04
I was in the middle of printing several documents using a Canon BJC-240 printer under Ubuntu 10.04 when quite suddenly the printer ceased to appear in the list of available printers. I rebooted into Windows XP and was able to finish printing the remaining documents and then I rebooted back into Ubuntu and saw that Ubuntu still would not display the printer. There was also a message claiming that the CUPS service appeared to be not running. I clicked on "Help" and it recommended I go to System > Administration > Services to start the CUPS service. The problem is that the Help file is inaccurate because there is no such option under the System > Administration menu. I would appreciate if anyone could tell me how to get this CUPS Service started if that is what is needed to get Ubuntu to display the printer again.

camorri 04-04-2012 09:42 AM

This command should work -


sudo /etc/init.d/cups restart
See this document for more information, if you need it.


sdtrott 04-06-2012 12:19 AM

I tried sudo /etc/init.d/cups restart and although the command did not generate an error message, and the command prompt reappeared, it did not do anything at all. When I try to print, the Canon BJC-240 printer is gone from the list of available printers.

When I go to System > Administration > Printing > Server > CUPS server:, the only option in the drop down list is "local host", but when selected, all I get is an error message saying "CUPS server error, failed to connect to server."

If I go to System > Administration > Printing > Server > New, both options "printer" and "class" are greyed out.

If I go to System > Administration > Printing > Server > Printer, all the options except "view print queue" are greyed out.

Could this be a result of a Linux update as some people on other forums have suggested. I have tried some suggestions that were offered to others with this problem, but most of the people on those forums don't really appear to know what they are talking about and appear to be only guessing at possible solutions as their suggestions just have not worked. Do I need to reinstall the entire operating system to fix this error? Should I refuse system updates?

camorri 04-06-2012 09:22 AM


Could this be a result of a Linux update as some people on other forums have suggested.
Its possible. This type of failure is why I don't any buntu any more.


Do I need to reinstall the entire operating system to fix this error? Should I refuse system updates?
That would be a last resort. Since you do have synaptics package manager, I would remove cups, and re-install it, and add the printer again.

If you want to know for sure if cups is running, or not, ( you can not tell with the gui tools you are using ) open a command prompt and run the command 'ps aux | grep cups' and look at the results. If it is running, you will see a process owned by root. It looks like this:


ps aux | grep cups
root 2041 0.0 0.1 52824 3520 ? Ss 09:03 0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
cliff 4048 0.0 0.0 6848 972 pts/1 S+ 09:18 0:00 grep cups
The first line is cupsd daemon. The second line is my user looking for it.


I tried sudo /etc/init.d/cups restart and although the command did not generate an error message
This is an indication that cups is running after you issued the command.

If you open a web browser, and type in the location bar, 'http://localhost:631' do you get the cups configuration menu? ( All commands without quotes, just what is between them ).

sdtrott 04-06-2012 11:34 PM

When I attempt http://localhost:631, the response is Unable to connect Firefox can't establish a connection to the server at localhost:631.

When I enter ps aux | grep cups, the result is: steve 1949 0.0 0.1 3320 808 pts/0 S+ 23:03 0:00 grep --color=auto cups

I have read some comments about CUPS on other forums where people say that they had experienced a system update which overwrites the CUPS configuration file. I navigated to the CUPS file and below is what is contained in that file. I don't see my printer mentioned anywhere. Should it be named in the CUPS file? I apologize for so many questions. I just don't know what the file is supposed to look like when things are working as they should:

#! /bin/sh
# Provides: cups
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $network avahi
# Should-Stop: $network
# X-Start-Before: samba
# X-Stop-After: samba
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: CUPS Printing spooler and server
DESC="Common Unix Printing System"
unset TMPDIR
test -x $DAEMON || exit 0
mkdir -p /var/run/cups/certs
if [ -r /etc/default/cups ]; then
. /etc/default/cups

. /lib/lsb/init-functions
# Get the timezone set.
if [ -z "$TZ" -a -e /etc/timezone ]; then
TZ=`cat /etc/timezone`
export TZ
restart_xprint() {
if [ -n "$success" ] && [ -x /etc/init.d/xprint ]; then
invoke-rc.d xprint force-reload || true
coldplug_usb_printers() {
if type udevadm > /dev/null 2>&1 && [ -x /lib/udev/udev-configure-printer ]; then for printer in `udevadm trigger --verbose --dry-run --subsystem-match=usb \
--attr-match=bInterfaceClass=07 --attr-match=bInterfaceSubClass=01 2>/dev/null || true; \ udevadm trigger --verbose --dry-run --subsystem-match=usb \
--sysname-match='lp[0-9]*' 2>/dev/null || true`; do /lib/udev/udev-configure-printer add "${printer#/sys}"
case "$1" in
log_begin_msg "Starting $DESC: $NAME"
chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true
chmod 3775 /usr/share/ppd/custom 2>/dev/null || true
mkdir -p `dirname "$PIDFILE"`
if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
-a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe ]; then
modprobe -q -b lp || true modprobe -q -b ppdev || true
start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON && success=1
log_end_msg $?
stop) log_begin_msg "Stopping $DESC: $NAME"
start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME && success=1
log_end_msg $?
log_begin_msg "Reloading $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1 && success=1
log_end_msg $? restart_xprint
log_begin_msg "Restarting $DESC: $NAME"
if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then
start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON && success=1
log_end_msg $?
echo -n "Status of $DESC: "
if [ ! -r "$PIDFILE" ]; then
echo "$NAME is not running."
exit 3
if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
echo "$NAME is running." exit 0
echo "$NAME is not running but $PIDFILE exists."
exit 1
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
exit 0

camorri 04-07-2012 09:38 AM

That is not the daemon config file. It is a file for starting and stopping printing services.

The config file you are looking for is called cupsd.conf ; this is the config file.

When you attempted to connect to cups with localhost:631, did you start the daemon before your attempt? If not, please try again. You can also try and see if that works. It may be your /etc/hosts file has never been updated.

When you find the cupsd.conf file, your printer is not mentioned in that file. On my system, the file is located at /etc/cups/cupsd.conf

All times are GMT -5. The time now is 12:02 PM.