LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2005, 12:08 PM   #1
PEACEYALL
Member
 
Registered: Jan 2005
Posts: 41

Rep: Reputation: 15
SH Script not working


hey all,

well i made my first script, in it has:

"
#! /bin/sh

cd /home/peaceyall
export PATH=$HOME/kde3.4/bin:$PATH
export LD_LIBRARY_PATH=$HOME/kde3.4/lib:$LD_LIBRARY_PATH
"

But it wont work , i even tried to run it as non root and root btu it didnt work. What is wrong with teh script. If it is a wrong script, then someone pls post me a script that does :
"
export PATH=$HOME/kde3.4/bin:$PATH
export LD_LIBRARY_PATH=$HOME/kde3.4/lib:$LD_LIBRARY_PATH
"
Thank you...
 
Old 03-20-2005, 12:34 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What do you expect it to do?

If you start a new shell then the variables will only be available to it's children. if you want the variables in your current shell then source it with:
. /path/to/script
or
source /path/to/script
 
Old 03-20-2005, 12:36 PM   #3
cylix
Member
 
Registered: Dec 2004
Location: Ohio
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
You should just add those environment variables to your .bashrc

.bashrc will be interpreted by X, so no worries
or .xinitrc

Not sure what you need the path variables for... so the appropriate location is a little fuzzy.

There is no space in #!/bin/bash
 
Old 03-21-2005, 08:58 AM   #4
PEACEYALL
Member
 
Registered: Jan 2005
Posts: 41

Original Poster
Rep: Reputation: 15
now how do i make the script start at boot?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script not working need help , i'm newbie aneel_in Programming 5 06-14-2005 04:00 AM
#!/script not working like normal skaarak Programming 8 06-01-2005 09:58 AM
Ok so my script is not working, any ideas? mago Linux - General 8 03-30-2005 11:13 PM
can't get my init script working nukeu666 Linux - Newbie 4 12-16-2004 11:12 AM
Help get this script working please rickenbacherus Linux - General 2 03-24-2004 06:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:28 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
Open Source Consulting | Domain Registration