Screen-Scrape Konsole output
ram at netcore.co.in
Fri Jun 4 14:02:58 BST 2010
On Thu, 2010-06-03 at 16:41 +0000, Duncan wrote:
> Ram posted on Thu, 03 Jun 2010 17:59:04 +0530 as excerpted:
> > I had a small automation program , that would screen-scrape konsole
> > output and take actions accordingly
> > To "read" the Konsole window , I used to use automated-mouseclicks and
> > the use dcop to read the klipper output.
> This has certainly piqued my curiosity. Why...
> .. would you be reading konsole output, instead of using conventional
> shell redirection or piping? There are all sorts of ways to get at that
> output and you seem to be choosing the least common and most difficult.
> Perhaps you have a valid reason, but you've not given it, thereby begging
> the question.
> It seems to me you're deliberately choosing the solution that goes a
> kilometer down the road by traveling round the world in the other
> direction. Yes, it's certainly possible and there may be a valid reason,
> but readers of a question on how to do it without an explanation of why
> you aren't simply taking the simple route, can certainly be expected to
> ask the question begging to be asked...
Ok I will tell you what my script does.
I have to ssh-login to multiple servers from my desktop and that is
Wait this is not that simple. Direct login to all those servers are
disallowed , so my automation script first logs in to the respective
"gateway" server and changes user and then logs in to the real server.
Ssh keys are not allowed here and logging in manually to diferent hops
is *really* painful.
What I do is a fake "Expect" script. I dont use "expect" because it
really spoils my TERM window. But If I screen scrape my Konsole window ,
then I can really simulate the functionality of "Expect" without any
I am always open to a better way if possible
>  Yes, I'm aware of the legal use. I'm using the literal meaning of the
> words. Get over it.
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
More info: http://www.kde.org/faq.html.
More information about the kde