screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting information about currently working multi-attach'd terminal


From: John Davidorff Pell
Subject: Getting information about currently working multi-attach'd terminal
Date: Tue, 2 Nov 2004 01:47:24 -0800

Ok, so here's my odd request of the day:

Is there any way, or will there soon be any way, to get information from screen about anything by invoking screen in a shell script?

If yes, then is there any way, or will there soon be any way, to get information from screen by invoking screen in a shell script about which terminal(s) multi-attached to a screen session is currently viewing a given window.



What I'm actually trying to do is this:

I have my .profile set up to invoke screen automatically (if interactive) with -xRR -p +. This way, I can open a number of terminal windows, each pointing to a different window in the same screen session.

When I ssh into my system from school/work, I have to set some variables so that agent forwarding, X forwarding, etc work properly (I have a script which is sourced by my shell which does this automatically, based on information available at most-recent login).

If I have a terminal window open at home, ssh in from work, then return home to my already-open terminal window, it has now-broken entries for SSH_AUTH_SOCK and DISPLAY in its environment.

I would like to have a script which pulls some information about which terminal is currently viewing a given window, allowing me to figure out where that terminal is coming from (ssh or local), then set some (cached from login) settings appropriately. It would also allow me to remember the most recently used terminal for any windows that are not being looked at.



Tips and Tricks are appreciated!

JP


----
It's all fun and games 'til someone writes to a NULL pointer!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]