LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-03-2012, 10:53 PM   #1
sdtrott
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 04-04-2012, 08:42 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,848

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
This command should work -

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

-->https://help.ubuntu.com/11.04/serverguide/C/cups.html
 
Old 04-05-2012, 11:19 PM   #3
sdtrott
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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?
 
Old 04-06-2012, 08:22 AM   #4
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,848

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
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.

Quote:
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:

Quote:
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.

Quote:
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 ).
 
Old 04-06-2012, 10:34 PM   #5
sdtrott
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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
### BEGIN INIT INFO
# 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
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/cupsd
NAME=cupsd
PIDFILE=/var/run/cups/$NAME.pid
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
fi

. /lib/lsb/init-functions
# Get the timezone set.
if [ -z "$TZ" -a -e /etc/timezone ]; then
TZ=`cat /etc/timezone`
export TZ
fi
restart_xprint() {
if [ -n "$success" ] && [ -x /etc/init.d/xprint ]; then
invoke-rc.d xprint force-reload || true
fi
}
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}"
done
fi
}
case "$1" in
start)
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
fi
start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON && success=1
coldplug_usb_printers
log_end_msg $?
restart_xprint
;;
stop) log_begin_msg "Stopping $DESC: $NAME"
start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME && success=1
log_end_msg $?
restart_xprint
;;
reload|force-reload)
log_begin_msg "Reloading $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1 && success=1
log_end_msg $? restart_xprint
;;
restart)
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
fi
log_end_msg $?
restart_xprint
;;
status)
echo -n "Status of $DESC: "
if [ ! -r "$PIDFILE" ]; then
echo "$NAME is not running."
exit 3
fi
if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
echo "$NAME is running." exit 0
else
echo "$NAME is not running but $PIDFILE exists."
exit 1
fi
;;
*)
N=/etc/init.d/${0##*/}
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
 
Old 04-07-2012, 08:38 AM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,848

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
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 http://127.0.0.1:631 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

Last edited by camorri; 04-07-2012 at 08:44 AM.
 
  


Reply

Tags
canon, cups, printer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
canon scanner suddenly stopped working koenfloris Linux - Hardware 16 11-21-2010 04:44 AM
VNC to Ubuntu 10.10 Suddenly Stopped Working SecurityGate Linux - Networking 1 10-14-2010 02:41 AM
Ubuntu wireless suddenly stopped working for no reason bobbygrimlock Linux - Networking 1 02-08-2009 12:52 PM
wlan suddenly stopped working ( ubuntu 8.10 ) min_sin Linux - Newbie 6 12-21-2008 07:22 PM
Canon BJC-265sp printer installed under Ubuntu but not printing dlandmj Linux - Newbie 1 10-14-2006 11:42 PM


All times are GMT -5. The time now is 03:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration