How to run a some binary file as soon as system boots up
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Which distro? Different distros have different init methods. What type of application? GUI apps will require X to be up and running and will have a different method for autostarting than a command line app. For a gui app, also list which DE; different DEs like kde or gnome have there own methods for autostarting graphical apps on startup. For a command line app, state whether it needs to be executed as root or an ordinary user.
Last edited by kilgoretrout; 09-13-2011 at 10:16 AM.
The folders in /etc should be /etc/init.d and /etc/rc.d .
Files of importance are also /sbin/init which calls the kernel first after mounting the rootfs/partition .
This can be a link to '/bin/busybox init' or a binary . It is possible to rename /sbin/init to /sbin/init.bin and make a #!/bin/sh -script in which you could run what you want and at the end run 'exec /sbin/init.bin' , which runs (sources) /etc/inittab which further runs mostly files in /etc/rc.d/* , 'busybox init' especially rc.sysinit , in which everything of importance gets mounted (proc,sysfs) , other files of rc.d or init.d run , drivers loaded , and so on .
You should have a look there .
Files named rc.0 or rc.5 indicate the runlevel , something , that Puppy Linux does not know much about , but larger distros have such files . rc.S would be a 'single user mode' ^configuration file^ .
Post your start.sh script. I assume you already tested the script and it executes without error when you manually run it after login. If the user is logging into gnome, dudeman's suggestion should work. You can also put:
at the end of user1's bashrc file and it should execute on login from a command line login.
Last edited by kilgoretrout; 09-14-2011 at 07:51 AM.