I'd like to launch Iceweasel and then take a screenshot. When I simply try to wait and take it, it works fine

sleep 10;import -window root root/scr/scr.png

however when I first launch the browser, no screenshot is taken

iceweasel https://www.facebook.com/;sleep 10;import -window root root/scr/scr.png

What am I missing?

migrated from serverfault.com Nov 10 '15 at 11:12

This question came from our site for system and network administrators.


iceweasel is not a daemon and thus won't put itself into the background. Therefore the sleep 10 is only executed after iceweasel returns (i.e. after you closed it).

Instead put a & after your call to iceweasel in order to inform your shell that it should put the program into the background instead of waiting for it to return:

iceweasel https://www.facebook.com/ & sleep 10;import -window root root/scr/scr.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.