Skip to main content
Brainstorm! Had an idea!
Source Link
lornix
  • 11.5k
  • 2
  • 31
  • 34

All of my efforts to do the same have been for naught... Environment variables are special things, a child cannot change the parent's environment, while a parent process can adjust things prior to forking a child.

Like you mentioned, you CAN start the needed programs from a newly started konsole, which would have inherited the new .profile settings, but for some that just isn't enough.

Alas... you'll need to log out and then back in again, as a minimum. So sorry. But look at the bright side... you don't have to reboot.

(Hmmm, start another new X-server on :1 (or :2, etc), adjust the DISPLAY env-vars of all the programs you need to keep running, to shift them to the new X server.. then kill the first server and switch to the new one. (mind you, this is somewhat easier to SAY, than DO) )


EDIT:
I had another IDEA!! If you were to use to break into the kwin process, using specially crafted function calls, you COULD add any number of environment variables, change values, whatever.... which would then be reflected in any new programs/processes you started from that point on. I've done it to change a processes 'current directory' to umount/remount things. Probably not for the faint of heart... But that's not what we cater to here is it? HeeHee! It's possible! I suppose you could also just break into every process you have running, inject the new environment variable values. Then you wouldn't have to restart anything.

Wise words from Uncle Ben (Spiderman, not the RICE! sheesh!).... "With great power, comes great responsibility" Methinks I'll just put that Idea Card in the "As Yet Unproven" stack for now. YOU do it first... I'll watch... from over here... behind this blast door...

All of my efforts to do the same have been for naught... Environment variables are special things, a child cannot change the parent's environment, while a parent process can adjust things prior to forking a child.

Like you mentioned, you CAN start the needed programs from a newly started konsole, which would have inherited the new .profile settings, but for some that just isn't enough.

Alas... you'll need to log out and then back in again, as a minimum. So sorry. But look at the bright side... you don't have to reboot.

(Hmmm, start another new X-server on :1 (or :2, etc), adjust the DISPLAY env-vars of all the programs you need to keep running, to shift them to the new X server.. then kill the first server and switch to the new one. (mind you, this is somewhat easier to SAY, than DO) )

All of my efforts to do the same have been for naught... Environment variables are special things, a child cannot change the parent's environment, while a parent process can adjust things prior to forking a child.

Like you mentioned, you CAN start the needed programs from a newly started konsole, which would have inherited the new .profile settings, but for some that just isn't enough.

Alas... you'll need to log out and then back in again, as a minimum. So sorry. But look at the bright side... you don't have to reboot.

(Hmmm, start another new X-server on :1 (or :2, etc), adjust the DISPLAY env-vars of all the programs you need to keep running, to shift them to the new X server.. then kill the first server and switch to the new one. (mind you, this is somewhat easier to SAY, than DO) )


EDIT:
I had another IDEA!! If you were to use to break into the kwin process, using specially crafted function calls, you COULD add any number of environment variables, change values, whatever.... which would then be reflected in any new programs/processes you started from that point on. I've done it to change a processes 'current directory' to umount/remount things. Probably not for the faint of heart... But that's not what we cater to here is it? HeeHee! It's possible! I suppose you could also just break into every process you have running, inject the new environment variable values. Then you wouldn't have to restart anything.

Wise words from Uncle Ben (Spiderman, not the RICE! sheesh!).... "With great power, comes great responsibility" Methinks I'll just put that Idea Card in the "As Yet Unproven" stack for now. YOU do it first... I'll watch... from over here... behind this blast door...

Source Link
lornix
  • 11.5k
  • 2
  • 31
  • 34

All of my efforts to do the same have been for naught... Environment variables are special things, a child cannot change the parent's environment, while a parent process can adjust things prior to forking a child.

Like you mentioned, you CAN start the needed programs from a newly started konsole, which would have inherited the new .profile settings, but for some that just isn't enough.

Alas... you'll need to log out and then back in again, as a minimum. So sorry. But look at the bright side... you don't have to reboot.

(Hmmm, start another new X-server on :1 (or :2, etc), adjust the DISPLAY env-vars of all the programs you need to keep running, to shift them to the new X server.. then kill the first server and switch to the new one. (mind you, this is somewhat easier to SAY, than DO) )