LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2014, 07:15 AM   #1
el_tyro
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
Executing a script at startup


Hi all,
I want run a script at startup in fedora. I named this script rc.local and set it in /etc/rc.d path. The content of this script is:

#!/bin/sh -e
source /opt/Xilinx/14.6/ISE_DS/settings64.sh

and I make it executable (#chmod +x /etc/rc.d/rc.local). Settings64.sh set some environment variables. When I run it by "./rc.local" these environment variables are not set but when I execute by "source rc.local" these variables are set correctly. How can I execute this scripts on boot, successfully?

Please help me.
Thanks
 
Old 05-14-2014, 07:32 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,801

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
if you want to set it system-wide you need to put that line into /etc/profile (source /opt/Xilinx/14.6/ISE_DS/settings64.sh). You do not need to set anything in /etc/rc.d.
 
Old 05-15-2014, 04:41 AM   #3
el_tyro
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
When I set the command to /etc/profile and reboot my system. The desktop change to white paper without anythings. So I press Ctrl+Alt+F2 and login in terminal and remove this command in /etc/profile for solving this problem. Can you tell me where I locate this command in profile?
and How can I execute this command in boot my system without any problem?

Thanks
el_tyro
 
Old 05-15-2014, 04:43 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,801

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
that was executed in boot and caused problems. Therefore it should not be executed during boot, or you need to find out the critical part of that file.
 
1 members found this post helpful.
  


Reply



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
Executing a script at startup Pir Ovais Linux - Newbie 3 11-02-2011 03:23 AM
executing startup script on shared server (not as root!) agentspanky Linux - Newbie 3 02-11-2008 01:42 AM
Auto-executing soundcard commands at startup VA3OG Ubuntu 1 11-06-2005 12:25 PM
executing on startup moschi Linux - General 7 09-06-2004 12:49 PM
Executing commands on startup viciousfish Linux - General 5 06-28-2002 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 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