LinuxQuestions.org
Visit Jeremy's Blog.
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 05-21-2006, 11:10 AM   #1
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
Setting Console Environment Variables from X


I want to be able to set the original console environment variables from within X. I've tried "source", but it doesn't seem to work. Thanks in advance...
 
Old 05-21-2006, 11:19 AM   #2
dubz_444
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Arch Linux
Posts: 43

Rep: Reputation: 15
what do you mean by console environment variables?

do you mean the ones printed by env and printenv?
 
Old 05-21-2006, 01:46 PM   #3
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Original Poster
Rep: Reputation: 30
Yes, the ones printed by "export" in Bash. I could have sworn ". script" (source) worked before to set console variables from a virtual console, but it doesn't work. Is there another way to do it or some kind of security preventing it from working?
 
Old 05-22-2006, 10:00 AM   #4
dubz_444
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Arch Linux
Posts: 43

Rep: Reputation: 15
preventing what from working?

export? why?

it poses no security risk
 
Old 05-23-2006, 03:48 PM   #5
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Original Poster
Rep: Reputation: 30
Yeah, I doubt it is security related. I believe I was able to do it in Slackware, but not Gentoo for some reason. I have the exports I want to be global in a script and I source that script, but it doesn't set them for whatever reason.
 
Old 05-24-2006, 09:46 AM   #6
dubz_444
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Arch Linux
Posts: 43

Rep: Reputation: 15
what do you mean by...

Quote:
Originally Posted by juanbobo
...and I source that script,...
 
Old 05-24-2006, 05:33 PM   #7
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Original Poster
Rep: Reputation: 30
Run ". <scriptname>" or "source <scriptname>". I just realized it really only runs the given script in the current shell without starting a new shell, not the parent. How is it possible to set the console environment variables from a virtual terminal?

Last edited by juanbobo; 05-24-2006 at 05:39 PM.
 
  


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
Environment variables setting... simjii SUSE / openSUSE 4 11-19-2005 07:50 PM
Setting Environment Variables rbh123 Linux - Newbie 2 10-03-2005 06:34 PM
setting environment variables jayjoh Linux - Newbie 9 07-12-2004 12:35 PM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 01:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 08:21 AM

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

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