LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-08-2002, 03:08 PM   #1
ChimpFace9000
Member
 
Registered: Jul 2001
Location: So. Cal.
Distribution: Slackware 8.1
Posts: 55

Rep: Reputation: 15
Post Enviroment variable set for all


How do i make an enviroment variable set for all users no matter what their shell is?
 
Old 12-08-2002, 07:50 PM   #2
Bluesuperman
Member
 
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
I think if you create it in the profile file (/etc/profile) that would do it or you create create on boot up by placing it in the rc.local file.

I am not sure if these would work, never had to test it for multipe users.
 
Old 12-08-2002, 09:11 PM   #3
ChimpFace9000
Member
 
Registered: Jul 2001
Location: So. Cal.
Distribution: Slackware 8.1
Posts: 55

Original Poster
Rep: Reputation: 15
That only works if everyone uses bash.
 
Old 12-08-2002, 11:07 PM   #4
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
For the tsch and csh shells use /etc/csh.login.
 
Old 12-09-2002, 07:44 AM   #5
ChimpFace9000
Member
 
Registered: Jul 2001
Location: So. Cal.
Distribution: Slackware 8.1
Posts: 55

Original Poster
Rep: Reputation: 15
Im not looking to do it when a shell starts up anyway. I want to set the variable for like init or something like that so it will apply to all children.
 
Old 12-09-2002, 09:39 AM   #6
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
I think it will work like this. At least in Slackware, i use this method to setup the default prompt for bash (PS1 variable)
Make a shell script and put it in /etc/profile.d/yourscript.sh and make sure it's executable. As far as i know all shells load the scripts found in this dir.
To assign a value to a variable for everyone, i think something like this will work
#!/bin/bash
VAR="value"
VAR2=value

HTH
-NSKL
 
  


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
System Path Enviroment Variable innovations Linux From Scratch 2 10-26-2005 04:27 PM
enviroment variable PATH Moataz Linux - Newbie 2 04-25-2005 08:25 PM
how to change $PATH enviroment variable bglnelissen Linux - Software 2 11-03-2004 06:55 AM
MOZILLA_FIVE_VARIABLE enviroment variable Lechium Slackware 4 08-31-2004 04:19 AM
GTK + 2.4 ... Enviroment Variable Settings? miskiw Linux - Software 2 04-25-2004 09:48 AM


All times are GMT -5. The time now is 09:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration