[Qtwebengine] How do I run web engine on a sever without a display?

Kevin Truong knt261 at gmail.com
Tue Dec 8 22:55:19 CET 2015


Thanks for the insights everyone -- it seems like xvfb is the way to go to
use qt web engine for X-less servers. Users have the same issue for
chromium too as Florian pointed out, and they were advised to just use xvfb.

Reading through phantomjs source code, it seems like they patched WebKit
via the QPA plug in, which doesn't seem trivial at all!

On Tue, Dec 8, 2015 at 1:15 AM, Nemo <377307289 at qq.com> wrote:

> I also found the app crash with "-platform offscreen".
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Michael Brüning";<michael.bruning at theqtcompany.com>;
> *发送时间:* 2015年12月8日(星期二) 下午5:06
> *收件人:* "qtwebengine"<qtwebengine at qt-project.org>;
> *主题:* Re: [Qtwebengine]回复: How do I run web engine on a sever without a
> display?
>
> Hi all,
>
> On 12/08/2015 09:13 AM, Koehne Kai wrote:
> >> -----Original Message-----
> >> From: QtWebEngine [mailto:qtwebengine-bounces at qt-project.org] On Behalf
> >> Of Florian Bruhin
> >> Sent: Tuesday, December 08, 2015 7:04 AM
> >> To: Nemo <377307289 at qq.com>
> >> Cc: qtwebengine <qtwebengine at qt-project.org>
> >> Subject: Re: [Qtwebengine] 回复: How do I run web engine on a sever
> without
> >> a display?
> >>
> >> * Nemo <377307289 at qq.com> [2015-12-08 13:58:37 +0800]:
> >>> Do not call show() member function of widgets, the application will
> become a
> >> console application.
> >>
> >> Have you actually tried?
> >>
> >> It's not that easy. As soon as you want to create a QApplication, you
> need a
> >> DISPLAY. And creating a widget without a QApplication won't work.
> > There's the offscreen QPA plugin to allow this. Start your application
> with
> >
> >    -platform offscreen
> > And you should be able to use QApplication/QWidget's even without a
> window.
> >
> > Anyhow, there still might be dragons when it comes to QtWebEngine ...
> Please
> > keep us up to date :)
>
> Unfortunately, this will crash with a SIGSEGV in a non-GUI terminal. Im
> afraid that for now, the quick fix will be running web engine in xvfb
> (FWIW, that is also how we used to run LayoutTests on a server with Qt
> WebKit).
> >
> > Regards
> >
> > Kai
> > _______________________________________________
> > QtWebEngine mailing list
> > QtWebEngine at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qtwebengine
>
> --
> Best regards,
> Michael
>
>
> _______________________________________________
> QtWebEngine mailing list
> QtWebEngine at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qtwebengine
>
> _______________________________________________
> QtWebEngine mailing list
> QtWebEngine at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qtwebengine
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20151208/a37409b9/attachment.html>


More information about the QtWebEngine mailing list