How to run terminal commands on startup?

Discussion in 'Mac Apps and Mac App Store' started by slazareth, Jun 3, 2006.

  1. slazareth macrumors regular

    Joined:
    Feb 5, 2006
    #1
    Hey, I was wondering how I could run a terminal command on startup. The command needs to be run as a super user too.

    Here's the command I need to run.

    Code:
    /Applications/xampp/xamppfiles/mampp start
    Any pointers to a tutorial or anything would be awesome! Thanks!
     
  2. yippy macrumors 68020

    yippy

    Joined:
    Mar 14, 2004
    Location:
    Chicago, IL
    #2
    It shouldn't be to hard. What you need to do is save the command as a plane text file. Then remove the extension and give the file execute permissions (done with chmod command in terminal I believe). Then just put this file in your startup items under System Preferences->User->you->Startup Items
     
  3. slazareth thread starter macrumors regular

    Joined:
    Feb 5, 2006
    #3
    Hey, thanks for the help. That makes sense to me but I don't exactly know how to do it. I'm not terribly hot in terminal. I can follow instructions and can bounce around through directories, but that's about it.
     
  4. yippy macrumors 68020

    yippy

    Joined:
    Mar 14, 2004
    Location:
    Chicago, IL
    #4
    Well, unfortunately, the key step is one that I am not sure how to do. I did it once before and have forgotten how to properly bless a file as executable.

    That said, I think I can do one better. I have a couple of the executable text files already made. All I have to do is open it in text edit, change the commands, save and it will still work.

    The attached zip file should be the file you need to put in your startup items. If you ever want to change it or make another, just duplicate the file and modify it like I said above.
     

    Attached Files:

  5. reh macrumors 6502a

    Joined:
    Oct 24, 2003
    Location:
    Arkansas
    #5
    This will allow everyone to execute that file.

    Code:
    chmod ugo+x filename
     

Share This Page