Date: Fri, 10 May 2013 08:23:45 +0100 From: Matthew Seaman <matthew@freebsd.org> To: freebsd-questions@freebsd.org Subject: Re: X11 screen grabber from cmd line Message-ID: <518CA081.3080308@freebsd.org> In-Reply-To: <20130510080943.8ff99fa2.freebsd@edvax.de> References: <20130509184144.GA1354@tiny.Sisis.de> <20130510080943.8ff99fa2.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/05/2013 07:09, Polytropon wrote: > On Thu, 9 May 2013 20:41:45 +0200, Matthias Apitz wrote: >> Do we have something in the ports which could do a screen shoot of $DISPLAY, but >> from the cmd line of an alpha console, and save it as PNG or JPEG? > > % xwd -out screen.xwd > % convert screen.xwd screen.png > -or- > % convert screen.xwd screen.jpg > > But if you've got installed ImageMagic (the "convert" command) > anyway, you can also use > > % import screen.jpg > -or- > % import screen.png > > For a whole screen capture, "xwd -root" or "import -screen" can > be used. You're somewhat missing the point here, I'm afraid. There are many alternatives for grabbing screen shots from *within* an X session itself. What the OP wants is a way to grab a screenshot of an X session from a different, non-graphical terminal. Now, if you know the $DISPLAY setting for the screen in question, and you can wrangle xauth(1) into letting you have access to that display, then you should be able to run any of the suggested programs from any separate command line interface on the system. The xauth(1) man page is reasonably clear, and if you're logged into the same Unix accout as the user running the display, it might just work only by setting $DISPLAY appropriately in your environment. Note that allowing other users to access your X session like this means they can snoop on anything you do in that session, including recording any passwords you type and so forth. Don't give out such access except to people you trust. Cheers, Matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?518CA081.3080308>