Find the answer to your Linux question:
Results 1 to 7 of 7
I don't know how to run a script at start-up that requires root privileges. I'm using Peppermint OS. For some reason my system has stopped running CUPS at boot. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! graphicks's Avatar
    Join Date
    Dec 2008
    Location
    Tennessee
    Posts
    62

    Need help with shell script for startup


    I don't know how to run a script at start-up that requires root privileges. I'm using Peppermint OS. For some reason my system has stopped running CUPS at boot. I can manually start it in a terminal and all is well until I shut down. I was wanting to write a shell script that would start it for me, but I need help. I know there must be multiple ways to do this. What method would you use?

    Run as root:
    Code:
    #!bin/bash
    service cups start

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by graphicks View Post
    I don't know how to run a script at start-up that requires root privileges. I'm using Peppermint OS. For some reason my system has stopped running CUPS at boot. I can manually start it in a terminal and all is well until I shut down. I was wanting to write a shell script that would start it for me, but I need help. I know there must be multiple ways to do this. What method would you use?

    Run as root:
    Code:
    #!bin/bash
    service cups start
    I'm not specifically familiar with Peppermint. But what you want to do is get it into the rc startup. Does it have the chkconfig command? Then
    chkconfig cups on
    should take care of it. If not, then you could probably put a call to your script in /etc/rc.local and init would run it as root after running all of the other init rc scripts. Or just put your "service cups start" command directly in rc.local.

    Maybe someone with Peppermint or Mint experience will weigh in on this, but after you got no answers for this long I thought I'd make a suggestion.
    Last edited by Mudgen; 02-25-2011 at 11:57 PM. Reason: add

  3. #3
    Linux Newbie
    Join Date
    Dec 2010
    Posts
    146
    Appears to be Debian based. Do the following as root --

    Code:
    update-rc.d cups defaults

  4. #4
    Just Joined!
    Join Date
    Oct 2006
    Posts
    1
    Try Boot Up Manager!

    sudo apt-get install bum
    sudo bum

  5. #5
    Just Joined! graphicks's Avatar
    Join Date
    Dec 2008
    Location
    Tennessee
    Posts
    62
    I appreciate the responses. I got busy for a few days on other things, but now I'm working on it again. The
    Code:
    update-rc.d cups defaults
    didn't get it going. Then I added my command to rc.local and it didn't work either. I'm still at it.

  6. #6
    Linux Newbie
    Join Date
    Dec 2010
    Posts
    146
    Quote Originally Posted by graphicks View Post
    I appreciate the responses. I got busy for a few days on other things, but now I'm working on it again. The
    Code:
    update-rc.d cups defaults
    didn't get it going. Then I added my command to rc.local and it didn't work either. I'm still at it.
    What was the output of the command?

  7. #7
    Just Joined!
    Join Date
    Apr 2010
    Location
    Bangalore, India.
    Posts
    12
    in debian like dietros u can use "rcconf".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •