Skip to content

June 4, 2011

7

Running CutyCapt + Qt on FreeBSD

by Joe Kuan

I need to generate some screenshots from a Javascript graphing library, Highcharts, on the server side as in a background process. Luckily, this post in Highchart forum has the answer. As for running CutyCapt on FreeBSD, there is only minor difference. Here are the steps:

  1. Install Qt 4 from /usr/ports/devel/qt4 (For FreeBSD 8.0, if you select the PostGreSQL in the configuration, make sure to disable Kerberos option)
  2. Install qmake from /usr/ports/devel/qmake4
  3. Install Xorg virtual framebuffer from /usr/ports/x11-servers/xorg-vfbserver
  4. Then compile CutyCapt. In the CutyCapt directory, run the command: “QMAKESPEC=freebsd-g++ qmake-qt4”. This will generate a makefile, type make to create the executable.
To run CutyCapt, read the instructions of CutyCapt. Only slightly difference to run in on FreeBSD. On one terminal starts the virtual frame buffer:
Xvfb :1 -screen 0 1024x768x24

On another terminal, do:

DISPLAY=:1 ./CutyCapt --url=http://www.itrinegy.com --out=example.png
7 Comments Post a comment
  1. Oct 6 2011

    In 8.0 version, I’d used “qmake -spec QMAKESPEC … ” key to define the spec.

    Reply
  2. pseudo
    Jan 6 2012

    i get DISPLAY=:1: Command not found.
    after DISPLAY=:1 ./CutyCapt –url=http://www.itrinegy.com –out=example.png
    ?

    Reply
    • Joe Kuan
      Jan 7 2012

      What shell are you running this command with? I use bash with my example.

      Thanks
      Joe

      Reply
  3. Jan 7 2016

    root@nuvolet:/ # Xvfb :1 -screen 0 1024x768x24
    Xvfb: Command not found.
    root@nuvolet:/ # pkg search Xvfb
    root@nuvolet:/ #

    mmmm… How can I get “Xvfb”?

    Reply
    • Joe Kuan
      Jan 7 2016

      For Ubuntu, ‘sudo apt-get install xvfb’

      Reply
      • Jan 7 2016

        mmmm I use “pkg” so I don’t use Ubuntu, but FreeBSD ;-)

      • Jan 7 2016

        I solved:

        # pkg install xorg-vfbserver

        Then, i have Xvfb.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

%d bloggers like this: