It is currently Fri, 30 Sep 2022 11:14:26 GMT



 
Author Message
 EXPORTING global variables...
I'm having trouble exporting global variables.  I'm quite new to Linux
(about a week), but I haven't had too much trouble despite installing
Red Hat 7.1 on a Compaq Laptop.  There are -some- problems (XMMS
sometimes hangs or acts erratically even though sound for everything
else seems to work, and mount/unmounting some file systems sometimes
proves unresponsive for my USB 250 ZIP drive.)
I even managed to compile and run MAME v.36b16...

Most of the books I've read imply that if you type something like
this...

export MP3=/home/newbie/multimedia/mp3

...will allow you to use $MP3 for that longer string, but it only
lasts for the duration of the shell.
For some things, I actually hacked the .bashrc file so I can compile
.java programs, but this particular problem is getting really
annoying.

Do I have to be a root user to use the export command?  Do I have to
give everyone special priveleges to do this?  Any help would be
appreciated.  None of the books I've loaned or read really elaborated
on this.



 Sun, 01 Feb 2004 07:32:22 GMT   
 EXPORTING global variables...

[snip]

Correct.

Yes. Each user is expected to customise the .bashrc and/or the
.bash_profile file in their home directory.

What, editing the .bashrc and .bash_profile files?

No, or you should not be required to be the root user. If you are so
required then there is a different problem.

No.

I would first suggest typing the command:

     man bash

and looking at the section that begins with the heading "INVOCATION" (it
is a long way into the document).

Second, type:

     man useradd

and look at the section where the -m option is described. Then check to
see what files, if any, are in your /etc/skel/ directory.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



 Sun, 01 Feb 2004 13:00:58 GMT   
 EXPORTING global variables...

THANKS for taking the time to respond.

I apologize for acting like a spoiled brat.  The book I was reading (I
believe it was Red Hat Linux Bible) implied that the changes would
AUTOMATICALLY be made when I used the export command.

I'm going to see if I can take the book out again from the library and
write the author.



 Wed, 04 Feb 2004 06:50:23 GMT   
 EXPORTING global variables...

Check the /etc/profile.d directory.  This contains various scripts that
are executed each time a user logs on.  On a multi-user system, making
the changes in this dir will affect all users.  The scripts ending in .sh
are executed by bash users.  You may add new scripts providing they end
in the correct (.sh for bash) suffix.

Someone correct me if I'm wrong, but I believe that as of RH 7.0
/etc/profile is no longer used.  Instead everything goes in
/etc/profile.d

Omar



 Thu, 05 Feb 2004 05:48:38 GMT   
 
   [ 4 post ] 

Similar Threads

1. file contents into variable, or global variable from shell script

2. Export with variable variable-names?

3. global env. variables for tcsh

4. accessing a global variable

5. initialize the global variables in .so files

6. Unaligned access (bus error) on Solaris on global variable

7. Regarding locks and global variables

8. defining global environment variable

9. Singleton global variable in a shared library

10. .profile, PS1 and global environment variables


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software