have to restart CUPS each time I power up my laptop

Asked by John Wilson on 2010-07-20

Every time I restart my laptop I have to restart CUPS in Lucid
Is there a command I can put into a terminal to so that CUPS starts on startup?
John

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Last query:
2010-07-28
Last reply:
2010-07-23

put the command you run in /etc/rc.local above the exit 0 line and it will be ok

John Wilson (jwilsondmartin) said : #2

Do I run sudo /etc/rc.local in a terminal?
Nothing seemed to happen so then I ran sudo /etc/init.d/cups restart to restart CUPS

Before go into the deep, please be sure your system is fully update

To fully check and upgrade your system using terminal using command line,
open a Terminal from the menu Applications->Accessories->Terminal

Tip: right click with mouse on the terminal title caption and select the item "Always on Top" doing this you will force the terminal window to stay on top of the other windows and you will find very easy to copy single row from this web page into the terminal...
Something more about using the terminal https://help.ubuntu.com/community/UsingTheTerminal

Then type or better copy and paste a row a time then press enter:
(Tip: select the single row to copy then right click into the terminal and to quick paste click with middle button of mouse )

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps

No, /etc/rc.local is a text file. When someone tells you to "put a command in" or "add the line" it means you EDIT the file and add the line, add it above the exit 0 line. Then reboot

John Wilson (jwilsondmartin) said : #5

Still have the problem despite doing all that Marcobra suggested
As for editing the script I can see what needs to be done with nautilus but cannot get into the file with gedit.
I can navigate to the etc directory in a console but don't know how to open the rc.local file to edit it

gksudo gedit /etc/rc.local

You will see a file like this:

andy@D420:~$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

Make it say

andy@D420:~$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

foo

exit 0

Replace foo with whatever command it is you want to run. Its that simple

John Wilson (jwilsondmartin) said : #7

Thank you for your continued help
Tried replacing foo with lps and cups start
Neither worked
Any suggestions?

Just put whatever command you run when you are logged in that makes sups start, its the same command

John Wilson (jwilsondmartin) said : #9

my problem now is that I cannot find what command to put in
So far I have tried lpr,
/etc/init.d/cups restart gets CUPS to restart but not when I past it into the /etc/rc.local file
Any suggestions?

Please read bugs.launchpad.net/ubuntu/+source/upstart/+bug/500520 so please copy and paste here the content of your:

/etc/network/interfaces

from terminal type:

gedit /etc/network/interfaces

copy and paste content here.

John Wilson (jwilsondmartin) said : #11

Hi Marco
Here is the output of /etc/network/interfaces:
auto lo
iface lo inet loopback

auto eth2
#iface eth2 inet dhcp

auto ath0
#iface ath0 inet dhcp

auto wlan0
#iface wlan0 inet dhcp

Regards,
John

Please try to downgrade upstart from terminal type:

sudo apt-get install upstart=0.6.3-10

Then reboot your pc

John Wilson (jwilsondmartin) said : #13

Tried that Marco
Here is the output
john@john-laptop:~$ sudo apt-get install upstart=0.6.3-10
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.6.3-10' for 'upstart' was not found
john@john-laptop:~$

John Wilson (jwilsondmartin) said : #14

Noticed that when I went
System>Preferences>Startup Applications
CUPS was not on the list so I added it with /etc/init.d/cups start as the command
I still cannot print any better but is this a way to solve my printing problem?
Do I need to give another command?

John Wilson (jwilsondmartin) said : #15

Alternatively, how do I get the downgraded version of upstart?

Can you help with this problem?

Provide an answer of your own, or ask John Wilson for more information if necessary.

To post a message you must log in.