LinuxQuestions.org
Register a domain and help support LQ
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 06-25-2012, 07:01 AM   #1
cepal
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Rep: Reputation: 0
changing env variables of another sessions


Hi,
is there a way of how to force changnig env variables to someone else's running shell? My situation is like this: on a jump box I've increased HISTSIZE and HISTFILESIZE in bash profile to the generic jump user, but it won't propagate to already running shells, which, upon exiting, would shrink all the history to the original little lenght which obviously I don't want.

One way is simply sending a SPAM to all the logged in people to manually change their session variables and I might end up that way but I am wondering if that couldn't be done more elegantly... So far, I was unable to find anything on Google.

I know I can read /proc/[PID]/environ but can I write to it? (most definitely not by using awk and/or sed etc. to change the variable values in-line).

Assume I have full root, of course...

Thanks a lot,
CePal
 
Old 06-25-2012, 07:14 AM   #2
cepal
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Just to prevent confusion, I'm talking about BASH environment in RHEL 5.4 x64
 
Old 06-25-2012, 07:25 AM   #3
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,146

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
see the man page of proc: The proc file system is a pseudo-file system which is used as an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.
So I do not think so...
 
Old 06-28-2012, 05:49 AM   #4
cepal
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
see the man page of proc: The proc file system is a pseudo-file system which is used as an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.
So I do not think so...
I still hope there is some way, probably not using a virtual filesystem the way one would use a "standard" one, but using some other tools which I am not aware of...
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing env variables aceone Red Hat 7 06-25-2012 07:13 AM
Getting env variables in X wild_oscar Linux - General 3 04-29-2007 10:49 AM
env variables AbrahamJose Solaris / OpenSolaris 4 04-18-2006 01:31 PM
env variables ekdya Debian 3 03-14-2006 02:33 PM
Open GL env.variables UB_KMA Linux - Newbie 1 08-04-2002 06:41 PM


All times are GMT -5. The time now is 11:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration