Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Command line on start


    I would like linux to execute a command line everytime it starts:

    The command line: vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565

    That would avoid having to execute it through Putty everytimes I reboot .

    THank you

  2. #2
    Linux Newbie
    Join Date
    Jan 2013
    I believe you need to place it on rc.local file, but I'm not sure how exactly or if it would work.

  3. #3
    you will want to create a script file and name it use the .sh extention.
    nano <yourfile>.sh

    start the file with:


    <your code>

    Then save and exit your code

    Then change permissions to the file

    # chmod 755 <file>

    edit /etc/rc.local and add the file path of your script to it. save and exit.

  4. $spacer_open
  5. #4
    Distro, etc..?

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    I usually put stuff like this in /etc/rc.local. I start up a number of vpn's (virtual private networks) when the system boots this way. rc.local is a script that runs after all the other system startup cruft is finished.
    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