Xmanager Forum

screen scraping (geting text data) from X Window application

Last post: Wednesday, July 23, 2003 4:15 PM by Support, 8 reply

Friday, July 4, 2003 1:55 AM - ilya ovsishcher

screen scraping (geting text data) from X Window application


I'm ACS employee and we just bought more than 100 licenses of your software.

My question is about automatic screen scraping. We need to get text information from the XManager X Window application screen.I know that I can select everything in the window and if AutomaticPaste is checked - text will be in the clipboard. So, at least at can be done manually.
But we are interested in automatic screen scraping feature or command in the window menu that will copy all screen as text into the clipboard. Another words we need feature when we can get text from screen without selecting text first.

Please help us, we need this feature badly.

all the best,
ilya ovsishcher.
Friday, July 4, 2003 11:41 AM - Support

Re: screen scraping (geting text data) from X Window application

Unfortunately, you must select text before pasting it to another Windows application. Without selection, Xmanager cannot get the text because the displayed characters are just images, not characters.

If you really need such a feature, please try Xshell instead of xterm or dtterm. You can find our Xshell program at:


The Xshell is a TELNET/SSH client that has a lot of copy & paste features.

Technical Support
Friday, July 18, 2003 10:33 AM - spiderman

Re: Re: screen scraping (geting text data) from X Window application

I think there is an another way to get text data for x window application.First,login unix workstation for your pc using X-manager,for example,
CDE is selected,then open a "terminal" ,input your correct "DISPLAY environment",ok,just in that opened terminal,we can open "xterm" by inputing command "xterm". That's all,xterm supports text-copy-paste from X-windows to your pc and selecting text data means "copy","click middle mouse" means "paste in the same or another x-windows",and
normal operation when copying these selected text data to your pc application ,such as "notepad".
Saturday, July 19, 2003 1:16 AM - ilya ovsischher

Re: Re: Re: screen scraping (geting text data) from X Window application

I don't want to use mouse to do that. That is my problem
Saturday, July 19, 2003 1:14 AM - ilya ovsishcher

Re: screen scraping (geting text data) from X Window application

Hello again,

We are looking int XShell right now (I'm not sure we are be able to use it, though), but can you clarify a few things for me, please :

So, do can you explain what exactly XManager doing when user select everything on the screen ?
How text information appears in clipboard ?

What I'm asking is menu item that will do the same thing as selecting all text manually with a mouse.
Then we be able to invoke this menu item and get results in the clipboard. Now we need to send 4 mouse events to get info. It is really messy and unstable. And we really need to get it done.

Another possibility that XManager has some user event that it can be sent to its window and it will trigger the same procedure of copying all of the text into clipboard.In that I need to know number and parameteres.

thanks in advance,
ilya ovsishcher.
Saturday, July 19, 2003 2:06 PM - Support

Re: Re: screen scraping (geting text data) from X Window application

Xmanager doesn't know what the xterm is doing with the mouse events. Xmanager is just an Operating System that can transfer input and output to the X11 applications.

Copying and pasting is done by the specific X11 application and the steps are different for each application. Xmanager can only read the clipboard contents and doesn't insert text data directly.

For further support, let us know in which application do you need such a feature. xterm or dtterm? Or else another application?

Looking forward to your reply.

Technical Support
Wednesday, July 23, 2003 7:06 AM - ilya ovsishcher

Re: Re: Re: screen scraping (geting text data) from X Window application

Please find attached picture that shows how we are connecting.

Looking forward for your reply.

Attachment xterm.jpg (29.6 KB)  
Wednesday, July 23, 2003 7:19 AM - ilya ovsishcher

Re: Re: Re: screen scraping (geting text data) from X Window application

Can you, please, explain how next feature works :

Automatic Cut & Paste between X and MS Windows applications.

I mean I can select everything with mouse and hey text information appears in Windows ClipBoard.
What exactly is going on when I do select everything in the X window.

thanks in advance,

Wednesday, July 23, 2003 4:15 PM - Support

Re: Re: Re: Re: screen scraping (geting text data) from X Window application

It works as following.

Xmanager has an internal clipboard called CUTBUFFER for X applications. When the user selects text on the xterm, the xterm puts the selected text on the CUTBUFFER. When Xmanager is losing focus to Windows application, it puts the contents of the CUTBUFFER on the Windows clipboard. Again when the Xmanager gets the focus, it copies the Windows clipboard to the CUTBUFFER.

Anyway, only the xterm knows the text selected by the user. When you click the mouse on the xterm, Xmanager doesn't know what it means. Xmanager only sends the mouse event to the xterm, and the xterm knows what to do on the event.

If you need a [Select All] menu command that is supported by most Windows applications such as Notepad, you should be supported by the xterm, not Xmanager.

Please try our TELNET/SSH client program, Xshell. It works much the same as the xterm and also supports the Select All feature. Even you can run X applications from the Xshell prompt. The Xshell automatically brings up Xmanager when required.

We hope this can help you.

Technical Support