Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 9907  / 3 Years ago, tue, september 21, 2021, 12:42:33

After installing a Canon printer in Quantal, in order to print I have to start ccpd at each restart with the command



sudo /etc/init.d/ccpd start


This should be automated, says the driver manual. But before doing that, I believe that a script for that command must be created. Or is there a way to make the command run at startup without creating a script first? Whether a script must created or not, I guess a different command should be used, one that doesn't open the terminal and doesn't ask for the password each time.



I guess the answer might be like here, editing /etc/rc.local. That file looks like this:




#!/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



But what should I do: just paste the command in the line 13 before exit 0? And what the command should be exactly?



(A supplementary question that I should ask is maybe this: should that command be put to start with the computer or only at login, or is that unimportant?)






Considering similar questions on Askubuntu, beside the fact that I am not sure what the command is:




  • this looks promising, but the answer was not set as definitive, and I need more advice. Also, I am in Lubuntu and do not have the Ubuntu GUI that adds stuff at startup. The same for this.


  • also this: but its answer only concerns where to put the script not how to create it, and I guess the comment there drastically amends the answer ("~/.profile (which also calls ~/.bashrc) is only executed when logging into a shell (through Terminal or SSH for example). Not when logging into the GUI")



More From » lubuntu

 Answers
0

You will need to assign it a run-level. Something like this should do it:



  sudo update-rc.d ccpd defaults


Here is some more information:



http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html


[#33062] Tuesday, September 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
doredtness

Total Points: 153
Total Questions: 113
Total Answers: 106

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
doredtness questions
Tue, Aug 2, 22, 15:45, 2 Years ago
Sat, May 21, 22, 05:26, 2 Years ago
Wed, Aug 24, 22, 11:09, 2 Years ago
;