Comment 4 for bug 908944

Revision history for this message
Ryan Thompson (rct86) wrote :

Whoa. Something weird happened with that message. Let me try that again:

I have written a basic solution. There are two parts. First, I modified byobu-select-session so that before it attaches to an existing session, it sends the values of "DISPLAY", "DBUS_SESSION_BUS_ADDRESS", "SESSION_MANAGER", and "GPG_AGENT_INFO" from the current shell to screen/tmux, and *then* attaches to it. From then on, any new windows created in screen/tmux will have the new values for those environment variables.

Second, I wrote a script called "byobu-update-environment" that you source from your shell inside byobu. It queries screen/tmux for those same environment variables and exports them in the current shell. This is for the shells that you already had running before you attached and updated the environment.

It basically works, but it could probably be made better before releasing it, and it needs testing.

As soon as I figure out how to do stuff with bzr, I'll publish my changes the right way (I mostly use git). but for now, it's bedtime, so I'm just going to attach a patch here that you can try it out.

TODO: Make byobu-reconnect-sockets also send environment variables to screen/tmux so that new shells get the new values.