Operating System - HP-UX
1819678 Members
3321 Online
109605 Solutions
New Discussion юеВ

how to copy text and image on screen to a file

 
SOLVED
Go to solution
cys691018
Advisor

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.
14 REPLIES 14
IT_2007
Honored Contributor

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.
Peter Godron
Honored Contributor

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
KapilRaj
Honored Contributor

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
cys691018
Advisor

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 ?
Raj D.
Honored Contributor

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 . "
cys691018
Advisor

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.
Raj D.
Honored Contributor

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 . "
V. Nyga
Honored Contributor
Solution

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 ***
Raj D.
Honored Contributor

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 . "
Bill Hassell
Honored Contributor

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.


Bill Hassell, sysadmin
Pete Randall
Outstanding Contributor

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
cys691018
Advisor

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

Thanks for your good solutions .
Raj D.
Honored Contributor

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 . "
cys691018
Advisor

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

From those replies and solutions ,I got the answer ro my question.