Solved Xvfb under Raspberry Pi is giving me a wrong screen resolution

Hi all,

My target is create screenshots of remote websites using CutyCapt (is a great software, by the way). On my PC using FreeBSD with Xorg, CutyCapt is working perfectly well.

Now, I'm trying this on my Raspberry Pi 2 running FreeBSD 11.1 and, I have to run CutyCapt on the terminal but, first, create a virtual X with Xvfb.

I tried:

Xvfb :1 -screen 0 1024x768x24 &
or
Xvfb :1 -screen 0 1024x768x16 &
or
Xvfb :1 -screen 0 1280x1024x16 &
or
Xvfb :1 -screen 0 1280x1024x8 &
or many others...

And then: DISPLAY=:1 /usr/local/bin/CutyCapt --url=[URL]http://jcatala.net[/URL] --out=screenshot.png

But the screenshots are always in 800x600 I think, so finally I have a screenshot of a responsive site for mobiles. I attach a screenshot image.

How can I force Xvfb to really be with 1024x768 or higher resolutions?
Can somebody give me a trick?

Thanks in advance.
 

Attachments

  • screenshot.png
    screenshot.png
    496.7 KB · Views: 379
I solved it! ;-)

the trick was, not only on Xvfb, but also on CutyCapt. Now, in order to create a 1920x1200-resolution screenshot, I just need to write:

CutyCapt --min-width=1920 --min-height=1200 --url=http://www.jcatala.net --out=screenshot.png

Full stop.
 
Back
Top