LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shell scripting (https://www.linuxquestions.org/questions/linux-newbie-8/shell-scripting-4175505659/)

sreeharsha1988 05-21-2014 07:52 AM

shell scripting
 
Could any one please suggest me on which boot level or /etc/rc.x folder should I include my shell script so that it runs automatically immediately after login or just before the system prompts for login in Ubuntu LTS 12.04

Thanks

AnanthaP 05-21-2014 07:55 AM

/etc/rc2.d

pan64 05-21-2014 08:33 AM

user specific scripts should be put into ~/.bashrc or ~/.bash_profile, not into /etc/rc2.d, see man bash and invocation. Please specify what do you want to achieve

sreeharsha1988 05-21-2014 08:43 AM

Quote:

Originally Posted by pan64 (Post 5174658)
user specific scripts should be put into ~/.bashrc or ~/.bash_profile, not into /etc/rc2.d, see man bash and invocation. Please specify what do you want to achieve

I just want t start the xwindows GUI automatically when the system boots up. I am working on an embedded board running on a linux kernel based on ubuntu 12.04

pan64 05-21-2014 08:45 AM

you should install a display manager (like gdm3 or lightdm), that will be put into /etc/rcX.d

szboardstretcher 05-21-2014 09:22 AM

This is helpful for understanding bash startup scripts: http://lfs.mirrors.poorlymade.org/bl...s/profile.html and the order they run in.

Enindu 05-21-2014 09:56 AM

There're lot of ways to autostart scripts. Read this wiki page too for understanding.


All times are GMT -5. The time now is 06:08 AM.