[Gllug] ssh screen challenge solved (ish), was Re: screen and ssh challenge

Chris Jones cmsj at tenshu.net
Mon Jun 11 22:19:23 UTC 2007


Hi

Robert McKay wrote:
>         LocalCommand echo -e "\033]0;hello\007"

Interesting.

It's amazing how close I came all that time ago. I've asked all the
smart people and lists/channels I lurk on recently about this trying to
see if anyone could shed any insight.
I got a bunch of useful pointers and a fair amount of stuff I'd already
dismissed, but it's been very enlightening and good fun.

I can therefore unveil the current, excruciatingly hacksome version:

PermitLocalCommand yes
LocalCommand cat /proc/$PPID/cmdline | xargs -0 | awk '{ printf
("\033k%s\033\\", $NF) }'

(obviously that will get stupidly wrapped, it should just be two lines)

It's a damn shame that LocalCommand doesn't set useful environment
variables. As it is, I'm just blindly assume that the final argument to
ssh is the hostname you are going to, which is true for me, but complete
crack as a general purpose plan. I think my only real recourse now is
hacking ssh to set an environment variable.

Anyone reckon they know otherwise? ;)

Cheers,
-- 
Chris Jones
  cmsj at tenshu.net
   www.tenshu.net
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list