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

Nemo 377307289 at qq.com
Wed Dec 9 06:03:02 CET 2015


How to use xvfb? I have install it and the app still crash with "-platform offscreen".


------------------ 原始邮件 ------------------
发件人: "Kevin Truong";<knt261 at gmail.com>;
发送时间: 2015年12月9日(星期三) 上午6:10
收件人: "Nemo"<377307289 at qq.com>; 
抄送: "qtwebengine"<qtwebengine at qt-project.org>; 
主题: Re: [Qtwebengine] How do I run web engine on a sever without a display?



On second thought, what does -platform offscreen do exactly? Is it QT's implementation of an xvfb-like feature? I am wondering if it is worth my time to try and pursue debugging -platform offscreen to get it to work on qt web engine (since it crashes for me too). If -platform offscreen runs qt web engine without crashing, would it theoretically allow chromium to render too? Or do I eventually still need to run xvfb to let chromium render the web page?




On Tue, Dec 8, 2015 at 1:55 PM, Kevin Truong <knt261 at gmail.com> wrote:
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/20151209/fc3d3182/attachment.html>


More information about the QtWebEngine mailing list