Under CentOS 6 I could run the command: /usr/bin/import -window root screen.png to get a screen capture - worked great.
On CentOS 7.2.1511
when I run the above command I hear beep beep and the resulting screen.png is just black.
Two questions: 1) how can I get the screen shot? 2) how can I disable the beep beep
Thanks,
Jerry
Ok - I thought maybe the beep was due to error - but apparently not. I have found how to disable the beep with the -silent option
However - I am still not able to get a screen shot - it resulting png is just black or black. export DISPLAY=:0.0 import -silent -window root screen.png
the file is just all black.
Thoughts?
Jerry
On Fri, 13 Jan 2017 15:18:42 -0500 Jerry Geis wrote:
Centos 7/Mate
import -silent -window root screen.png
I got a screenshot showing my current desktop.
On Fri, Jan 13, 2017 at 3:34 PM, Frank Cox theatre@melvilletheatre.com wrote:
-window root
Just curious, are you running as root?
On Fri, 13 Jan 2017 15:45:46 -0500 fred roller wrote:
-window root
Just curious, are you running as root?
In that context -window root means the root window, i.e. your desktop. Nothing to do with the root user.
See this for clarification:
https://en.wikipedia.org/wiki/Root_window
On Fri, Jan 13, 2017 at 3:45 PM, fred roller fredroller66@gmail.com wrote:
Just curious, are you running as root?
nvm, head was somewhere else.
Yes I am running as root. If I try as a user I get the same behavior.
Two things here. If on my desktop in a gnome window I run "import -silent -window root screen.png" I get a file.
However if I run the command using a shell script on a machine its not working. So in my script I have: export DISPLAY=:0.0 /usr/bin/import -silent -window root screen.png
Thanks,
Jerry
On Fri, 13 Jan 2017 15:51:08 -0500 Jerry Geis wrote:
However if I run the command using a shell script on a machine its not working. So in my script I have: export DISPLAY=:0.0 /usr/bin/import -silent -window root screen.png
Does the machine you're running the shell script on have an active X11 display? You can't screenshot a desktop that doesn't exist.
Does your user own the desktop that you're trying to screenshot?
Is your user on the current access control list and allowed to connect to the desktop?
On 1/13/2017 12:51 PM, Jerry Geis wrote:
Yes I am running as root. If I try as a user I get the same behavior.
Two things here. If on my desktop in a gnome window I run "import -silent -window root screen.png" I get a file.
However if I run the command using a shell script on a machine its not working. So in my script I have: export DISPLAY=:0.0 /usr/bin/import -silent -window root screen.png
when you're on that gnome window, echo $DISPLAY ... is it in fact :0.0 ?
it seems as xdm -root | convert - screen.png
works just fine.
Thanks,
Jerry
On Fri, Jan 13, 2017 at 3:51 PM, Jerry Geis jerry.geis@gmail.com wrote:
Yes I am running as root. If I try as a user I get the same behavior.
Two things here. If on my desktop in a gnome window I run "import -silent -window root screen.png" I get a file.
However if I run the command using a shell script on a machine its not working. So in my script I have: export DISPLAY=:0.0 /usr/bin/import -silent -window root screen.png
Thanks,
Jerry