LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 07:52 AM   #1
sreeharsha1988
LQ Newbie
 
Registered: Apr 2014
Posts: 19

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, 07:55 AM   #2
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
/etc/rc2.d
 
Old 05-21-2014, 08:33 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,345

Rep: Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990Reputation: 7990
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, 08:43 AM   #4
sreeharsha1988
LQ Newbie
 
Registered: Apr 2014
Posts: 19

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, 08:45 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,345

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

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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, 09: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-12-2013 11:20 PM
LXer: Terminal functions for shell scripting with Shell Curses LXer Syndicated Linux News 0 03-26-2008 11:50 PM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration