LinuxQuestions.org
Help answer threads with 0 replies.
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


Closed Thread
  Search this Thread
Old 11-01-2011, 11:32 PM   #1
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Rep: Reputation: Disabled
Execute script at startup


Hi,

i want a shell script to run each time a user logs in to the system

Thanks
 
Old 11-02-2011, 12:00 AM   #2
roger_heslop
Member
 
Registered: Oct 2009
Location: Leander, TX
Distribution: Fedora 20
Posts: 97

Rep: Reputation: 35
I believe scripts called from the the .bash_profile file in their home directory will achieve that goal, but if I'm not mistaken will be run under that same user's profile and permissions, you might need something more involved if you're looking to initiate a process with root privileges. What are you needing to happen?
 
Old 11-02-2011, 12:05 AM   #3
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Roger, all i need to do is execute a shell script at system startup i.e when a user logs in to system.
The script is simply creating a directory on user's desktop and mounting the USB drive to it.

Thanks
 
Old 11-02-2011, 12:55 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,362

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Pls don't start 2 threads on same qn https://www.linuxquestions.org/quest...tartup-911388/
 
1 members found this post helpful.
Old 11-02-2011, 01:09 AM   #5
alikaamil
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
is there anybody can help me?

I was trying to execute ns2 code when I wrote "$ns_ node-config -addressType hierarchical" I received command cannot found.

so what I can do?
 
Old 11-02-2011, 01:10 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
http://www.linuxquestions.org/questi...-linux-910019/
 
Old 11-02-2011, 04:33 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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
Bash script to execute on startup niravshah Linux - Newbie 11 09-09-2009 07:16 PM
Auto execute shell script on startup, right before use sgware Fedora 2 11-13-2007 12:10 AM
execute custom made script on startup howto ALInux Linux - General 7 02-07-2006 01:25 PM
auto execute shell script on startup slackwbas Slackware 9 02-27-2005 10:26 AM
IceWM doesn't execute my startup script martinpi Linux - Software 1 05-28-2004 02:24 AM


All times are GMT -5. The time now is 10:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration