Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    21

    Launch program at startup - how to ?


    I want to launch x11vnc at startup. It involves init.d and the insertion of a new file in that directory. But how do I know what the file should look like - it all looks v complicated to me unfortunately. The terminal command line is a simple "x11vnc" - would just putting that in a file in this folder also do the trick ?

    Thanks for any help out there.

  2. #2
    start up scripts can be placed in /etc/rc.local (or maybe ) /etc/init.d/rc.local file
    so that they are executed at boot
    regards

  3. #3
    Just Joined!
    Join Date
    Jul 2006
    Posts
    21
    Thanks for the help, but I'm still not there.

    My /etc/init.d/rc.local file appears to say that it executes whatever is in /etc/rc.local on startup.

    I've amended my rc.local file to include the command I want, but on startup of the machine, the command doesn't execute.

    Any ideas where I am going wrong ?

    Please see my /etc/rc.local file below. Thanks for the help.

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

    x11vnc

    exit 0

  4. $spacer_open
    $spacer_close
  5. #4
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    hi jrleighton !!!

    did you changed execution bits of /etc/rc.local

    $ chmod u+x /etc/rc.local





    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Jul 2006
    Posts
    21
    I didnt...no. What is it that I need to do please ?

    (if you could spell it out, like I am an idiot, that would be great!)

    I will understand all this soon....I have patience!
    Thanks

  7. #6
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777

    Smile

    well !! you are not idiot... you are just a newbie... as i was .. and i am....

    on terminal give this command
    $ chmod u+x /etc/rc.local
    it will set execution permission. visit linuxcommand.org too.





    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7

    For more users

    If you need to add for all people, you can edit the ~/.bashrc file.
    I m a newbie also, am I correct "Devils casper"

Posting Permissions

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