Find the answer to your Linux question:
Results 1 to 3 of 3
This may sound crazy, undoable, whatever... but... imagine this situation: Your /etc/profile changes (some environment variables, for instance... you take your laptop some place and http_proxy has to change). As ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2003
    Posts
    3

    X environment variables...


    This may sound crazy, undoable, whatever... but... imagine this situation:

    Your /etc/profile changes (some environment variables, for instance... you take your laptop some place and http_proxy has to change). As you don't want to logout and back in to take the changes you simply source /etc/profile.

    Now imagine I have a X program that needs the differences (dillo uses the above variable, for instance) How do I tell X to "source /etc/profile" or even "export http_proxy=..." to change it's environment and the one it passes to it's children? (that's without having to restart X) I'm sorry if I'm committing some crime asking this, either from the terminology or the fact that it's impossible.

    On a side note, the example I gave you is real. I have a proxy I must use at college, which I obviously can't access at home. I could change dillo's config, but then again mplayer and I believe xmms use the variable too (meaning I'd have change all their configs)

    Thanks in advance!

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Create 2 different accounts instead school and home... then put the specific environment variables you need in the users .bash_profile instead and only use /etc/profile /etc/bashrc for variable that EVERY user on the system needs to have.
    Regards

    Andutt

  3. #3
    Just Joined!
    Join Date
    Oct 2003
    Posts
    3
    That's a good idea... I don't know how well it would work for me, but it's a great idea!

    But really... I was just wandering: can't there be an easier way? (take the problem being, for example) Can't I change my proxy and get it to work without logouts/ins? There should be something like dhcpcd to config the proxies (and the matter of fact I'm kind of working in something that uses proxy.pac files) But if I can't change the user's variables, I'm stuck!

    But well, thanks for your help! Any other ideas? Maybe I should post this in admin, or something...

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •