Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a screenshot (command line) 1

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
How can I make a screenshot of my graphical screen,(I'm not working in KDE or GNOME) ? (to jpg or gif)

thnx. Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
import -window root screen.jpg

will capture your entire screen image onto the file screen.jpg
 
thnx abbeman for your reply.
But I do not have the import file...
Could you mail it to me please ?
themuppeteer@hotmail.com Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Well, I could, but it's dynamically linked and it's linked to 22 different libraries, so giving you the executable you'll have a dandy ol' time trying to get it running ;)

I really can't find any source code for it either...weird.
 
Well, otherwise you can always use the Gimp, or search freshmeat.net for screenshot programs, I found a few...if you don't mind using graphical ones, that is =)
 
the problem is,the linux machine only has a keyboard,and does not have KDE or GNOME, only the most primitive
graphical X-screen possible (you know,the grey screen with the mouse cross on it). What is gimp ? it isn't on my machine either. Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
The Gimp is a project to create an industrial strength image editing and manipulation tool, a la Photoshop. It's also, I believe, where GTK stems from (GTK = the Gimp ToolKit).

Hmm, after some digging in the rpm:s of the RedHat system I'm on right now, it seems it's included in the ImageMagick package, info and download is available at
 
Which one? The Gimp? Nope, it's very much graphical.

Or do you mean the ImageMagick thing? Their site is quite lynx-friendly, so go for it =)
The import utility is strictly command line, yes.
 
Jippie!
in the magick program,there was the "import" executable,
and with that and your previous information,I managed to
get my screenshot :)

Thnx a lot abbeman! Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
How can I exec or call and Unix command within a C++ program. Is there anyone there can help me?

Thanks

Shieh
 
Yeah, sure check the forum on execvp,
there is certainly enough infomation
about it. (I know,cause I asked the same question a while ago X-) ) Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Oh yeah, and btw you'd better start a new
thread for a new subject. Otherwhise it will become a mess.
If you have time,... become a member :) Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
if you are going to use exec* in your program you had also better look at the fork man pages as the exec family of calls replace your current code with the exec'ed code - in other words the exec* call is the last thing your application ever does....

You may also like to look at the system() api call as well. This allows your application to spawn off a separate application and remain intact.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top