Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, i editted /etc/rc.local in hope i will launch my vnc server on boot, but it is not launched. Anyone please can help with how to launch it on Ubuntu ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    350

    How to make programs/scripts run on boot?


    Hello, i editted /etc/rc.local
    in hope i will launch my vnc server on boot, but it is not launched. Anyone please can help with how to launch it on Ubuntu boot?

    !/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.
    tightvncserver :1
    vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
    exit 0
    Thank you

    I ensured this file has execute permissions and root user. but that vnc server is not started on boot..

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    What is your distro? There is usually a better way to initialize system services than /etc/rc.local (although that should be made to work in a pinch).

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by postcd View Post
    I have Ubuntu and TightVNC Server version 1.3.9
    It looks like you'll have to create your own initscript. At least I do w/Ubuntu 12.10. There is good info on doing that here. Try your luck and post back here w/problems.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2013
    Location
    New York
    Posts
    7
    Creating your own initscript will surely be a nice option to go with. Thanks for any good info.

  6. #5
    Just Joined!
    Join Date
    Sep 2013
    Location
    New York
    Posts
    7
    Yes,I am agree that creating your own initscript will surely be a very good option to go with. Anyhow thanks for the nice contribution.

  7. #6
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    350
    Why it did not launched from /etc/rc.local ?

  8. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    It may require stdin/stdout/stderr to run, which are not there for rc.local. Try redirecting those streams to/from /dev/null or running with nohup.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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