how to copy text and image on screen to a file (8 Views)
Reply
Advisor
cys691018
Posts: 36
Registered: ‎09-07-2006
Message 1 of 15 (8 Views)
Accepted Solution

how to copy text and image on screen to a file

In hp-ux b10.20 ,can you tell me how to copy text and image on screen to a file?

For example, In xwindow, when i ran a program, i found many erros . But i don't know how to copy them into a file.
Please use plain text.
Honored Contributor
IT_2007
Posts: 1,069
Registered: ‎07-27-2006
Message 2 of 15 (8 Views)

Re: how to copy text and image on screen to a file

If you running xwindow, open Text Editor in Xwindow. Select text you want to copy and simply click right button on Text Editor which you open and save. It will save on to your local system from where you launched xwindow (home directory).

To save Image,highlight the window which you want then alt-print screen and open Windows word and paste so that you would get the active screen.
Please use plain text.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 3 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Hi,
in xwindows you can use the windows print screen(Shift + PrtSc) and then insert into word document. This takes an exact graphics copy of your screen.

Or select text etc. with mouse and then Edit-> Copy.

If you have access to your error producing program, perhaps you can redirect the output ?
e.g.
./executable > x.log 2>&1
Please use plain text.
Honored Contributor
KapilRaj
Posts: 1,375
Registered: ‎03-07-2000
Message 4 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Using a digital camera, Take picture of the monitor. Connect the digicam to a pc and save the pic as a file :)

Good morning everybody :)

No points plzzz)
Nothing is impossible
Please use plain text.
Advisor
cys691018
Posts: 36
Registered: ‎09-07-2006
Message 5 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Thanks. can you tell the name and path of text editor or word ?
Please use plain text.
Honored Contributor
Raj D.
Posts: 2,624
Registered: ‎06-12-2004
Message 6 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Hi Cys,

You can capture the error and everything from the screen by pressing "PrtSc" button , and then open a Mspaint window and press "ctrl+v" to paste the screen shot, and save it as jpeg.

Perhaps saving text may not work in all xwindow, but you can try ctl+v , Ctrl+c,

HTH,

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Please use plain text.
Advisor
cys691018
Posts: 36
Registered: ‎09-07-2006
Message 7 of 15 (8 Views)

Re: how to copy text and image on screen to a file

where is mspaint in hp-ux? I used Prtsc ,but no vain. I also used ctrl-c ,but I can't paste with ctrl-v either.
Please use plain text.
Honored Contributor
Raj D.
Posts: 2,624
Registered: ‎06-12-2004
Message 8 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Cys ,

We assumed that you have connected to the X-window using a windows PC.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 9 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Hi,

first - thanks god that there's no mspaint under hp-ux :-))

In hp-ux 10.20 I got a software 'screencapture', with this you can make a screenshot of your screen or a window or a part of it. The output is a TIFF file, that you can view - under hp-ux there's for example a sw 'imageview'.

To copy a text to a file - open two windows one with the text you want, in the other use the vi-editor - vi - press 'i' for input - mark the text in the other window and paste it with the middle mouse button in the editor window.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Please use plain text.
Honored Contributor
Raj D.
Posts: 2,624
Registered: ‎06-12-2004
Message 10 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Hi Cys,


1. To capture text use:

# command 2>&1 output_file.txt

( This will redicrect standard error and standrard output to the output_file.txt


2. To capture image of xwindow , use "Xwd Capture" , i.e Xwindow Dump,

a) Click on the bottom icon ( 3rd icon from right hand side.), Application Manager --> desktop Tools ---> Click on "Xwd capture" --> Enter the file name you want to save the output.

b) You can view the file using any image viewere with xwd support .

* ) You can also use the command :
# xwd -out output_fil.xwd , And then click on the desired window.

(Viewer example: http://www.accessoryware.com/PictView.htm
http://www.accessoryware.com/Mediaview.htm )




NOTE: If you are connecting Xwindow from a Windows system , you can very well use the "PrtSc" to capture and can paste in any word document or mspaint application and can save as jpeg.

Hope this will help.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,178
Registered: ‎05-29-2000
Message 11 of 15 (8 Views)

Re: how to copy text and image on screen to a file

You are using Xwindows for character screens and that makes for a very difficult copy/print scenario. Xwindows was designed for graphics but corresponding features to capture the screens are very proprietary (xwd) and no built-in tools will copy the bitmap to a printer. There are no built-in tools to convert this xwd file to a PC-friendly format like JPEG or TIFF.

The reason is that Xwindows was designed for Unix workstations, not PCs. Your PC is pretending to be the graphic console on a workstation through the use of special software. Indeed, the character mode window (xterm, dtterem, hpterm) is actually resident on the HP-UX box -- you're just redisplaying the image on your PC.

One way to capture the text is simply use your mouse to highlight the text and copy the desired area. Then open a copy of Notepad (*not* Word or some other word processor) and paste the text into Notepad. Notepad is a pure ASCII program and text will now be portable.

However, it is much, much simpler to bypass all the Xwindow junk and simply use telnet, either the PC's built-in telnet command in the DOS command window, or a separate emulator like Hyperterminal. Now your screen is local to your PC and all the normal File -> Print choices will work.
Please use plain text.
Outstanding Contributor
Pete Randall
Posts: 16,205
Registered: ‎11-03-1996
Message 12 of 15 (8 Views)

Re: how to copy text and image on screen to a file

In HP-UX running CDE, there is a command called xwd, which will "dump an image of an X window". You can then use the companion command xwud to display the image or xpr to print it. Check the man pages for xwd, xwud, and xpr.


Pete

Pete
Please use plain text.
Advisor
cys691018
Posts: 36
Registered: ‎09-07-2006
Message 13 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Thanks for your good solutions .
Please use plain text.
Honored Contributor
Raj D.
Posts: 2,624
Registered: ‎06-12-2004
Message 14 of 15 (8 Views)

Re: how to copy text and image on screen to a file

Though xwd captures the screen , but the image is not very clear. Just fyi.

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Please use plain text.
Advisor
cys691018
Posts: 36
Registered: ‎09-07-2006
Message 15 of 15 (8 Views)

Re: how to copy text and image on screen to a file

From those replies and solutions ,I got the answer ro my question.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation