LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2002, 04:37 AM   #1
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
.bashrc question


Well, as I understand, whenever we start a terminal the .bashrc is executed and it can be like this:

# .bashrc

# User specific aliases and functions

# Source global definitions

if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

And the bashrc executes the *.sh files in /etc/profile.d.

I have done a configure.sh that I want to be executed for all the users when they open a terminal, but if comes out that it is only executed for the root.

Does someone know why?, and if it isn't the way,
how can I do to make work the configure.sh for all the users when they log in?

thnx.
Aizkorri.
 
Old 08-02-2002, 04:49 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Maybe you have different .bashrc files for different users? And make sure all users can execute /etc/bashrc .
 
Old 08-13-2002, 07:58 AM   #3
php
Member
 
Registered: Jun 2001
Location: USA
Distribution: Slackware
Posts: 827

Rep: Reputation: 30
.bashrc resides in peoples home directories correct??
 
Old 08-13-2002, 08:12 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Right.
 
Old 08-13-2002, 10:25 AM   #5
biosx
Member
 
Registered: Jul 2002
Location: Chicagoland
Distribution: Gentoo, Ubuntu
Posts: 63

Rep: Reputation: 15
Could you maybe post the Configure.sh script so we could look at it? Maybe you are making calls to programs or scripts outside of the users path (such as programs in /sbin or /usr/sbin).

Last edited by biosx; 08-13-2002 at 10:28 AM.
 
Old 08-14-2002, 03:48 AM   #6
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434

Original Poster
Blog Entries: 1

Rep: Reputation: 55
Thanks for the answers, yes, the users could not execute the bashrc, but I'm not sure if it is good to give them this right.
This is the configure.sh

PATH="$PATH:/usr/bin/"
INFO=/usr/lib/INFO
export DATA PATH

I want them to be able to execute an application
'/usr/bin/usrprofile' that uses the data that is in INFO.
any suggestion?
 
Old 08-14-2002, 06:41 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596Reputation: 3596
If you don't want it *executed* but only *available* to ppl IMO add it to /etc/profile (which is mode 0644, not 755, btw):
if ! echo $PATH | /bin/grep -q "/usr/lib/info" ; then
PATH="$PATH:/usr/lib/info"
fi
# Only export DATA_PATH if your app *needs* the variable in the env
# DATA_PATH=/usr/lib/info
# then add it to the export line:
# export <the other declarations> DATA_PATH
 
  


Reply


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
Where is .bashrc? Luantum Slackware 3 12-01-2003 12:29 AM
.bashrc roofy Slackware 7 05-06-2003 01:32 PM
bashrc nobu Slackware 6 03-21-2003 10:53 AM
Question on .bashrc Fluke Linux - Newbie 2 06-29-2002 01:40 PM
.bashrc help envirodug Linux - Newbie 2 06-14-2001 11:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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