From owner-freebsd-questions@FreeBSD.ORG Fri May 10 07:23:57 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6E4C91E5 for ; Fri, 10 May 2013 07:23:57 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id E70DF3F1 for ; Fri, 10 May 2013 07:23:56 +0000 (UTC) Received: from rufus.webfusion.com (mail.heartinternet.co.uk [79.170.40.31]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id r4A7Njbs018672 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 10 May 2013 08:23:52 +0100 (BST) (envelope-from matthew@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.8.2 smtp.infracaninophile.co.uk r4A7Njbs018672 Authentication-Results: smtp.infracaninophile.co.uk/r4A7Njbs018672; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host mail.heartinternet.co.uk [79.170.40.31] claimed to be rufus.webfusion.com Message-ID: <518CA081.3080308@freebsd.org> Date: Fri, 10 May 2013 08:23:45 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130503 Thunderbird/17.0.5 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: X11 screen grabber from cmd line References: <20130509184144.GA1354@tiny.Sisis.de> <20130510080943.8ff99fa2.freebsd@edvax.de> In-Reply-To: <20130510080943.8ff99fa2.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2013 07:23:57 -0000 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