LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 05-21-2014, 08:52 AM   #1
sreeharsha1988
LQ Newbie
 
Registered: Apr 2014
Posts: 17

Rep: Reputation: Disabled
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
 
Old 05-21-2014, 08:55 AM   #2
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 804

Rep: Reputation: 186Reputation: 186
/etc/rc2.d
 
Old 05-21-2014, 09:33 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
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
 
Old 05-21-2014, 09:43 AM   #4
sreeharsha1988
LQ Newbie
 
Registered: Apr 2014
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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
 
Old 05-21-2014, 09:45 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
you should install a display manager (like gdm3 or lightdm), that will be put into /etc/rcX.d
 
Old 05-21-2014, 10:22 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,774
Blog Entries: 1

Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
This is helpful for understanding bash startup scripts: http://lfs.mirrors.poorlymade.org/bl...s/profile.html and the order they run in.
 
Old 05-21-2014, 10:56 AM   #7
Enindu
Member
 
Registered: Apr 2014
Location: Colombo, Sri Lanka.
Distribution: Arch Linux
Posts: 69

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


Reply

Tags
shell script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
win32,shell code,shell programming,shell scripting? mr.cracker Linux - Newbie 4 07-13-2013 12:20 AM
LXer: Terminal functions for shell scripting with Shell Curses LXer Syndicated Linux News 0 03-27-2008 12:50 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 05:29 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 04:32 PM


All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration