基于 Linux FrameBuffer 的 Google Chrome

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6450901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 04:41:01  来源:igfitidea点击:

Google Chrome over Linux FrameBuffer

linuxframebufferchromium

提问by SunnyShah

I am working on a project where I need to run Google chromium over Linux FrameBuffer, I need to run it without any windowing system dependency ( It should draw on the buffer we provide it to draw, this will make its porting to any embedded system very easy) , I do not need its multi-tab GUI, I just need its renderer window in the buffer, has any body ever tried this? Any help on what approach should I use for this?

我正在开发一个项目,我需要在 Linux FrameBuffer 上运行谷歌铬,我需要在没有任何窗口系统依赖的情况下运行它(它应该在我们提供的缓冲区上绘制,这将使其移植到任何嵌入式系统非常简单),我不需要它的多选项卡 GUI,我只需要缓冲区中的渲染器窗口,有没有人尝试过这个?关于我应该使用什么方法的任何帮助?

采纳答案by Mikola

If you need to have some direct control of the window functions, or want to poke around in the DOM data, then the right way to solve this problem is to probably look at embedding webkit directly. This will be much faster and cleaner than what I am about to suggest.

如果你需要对窗口函数有一些直接的控制,或者想在 DOM 数据中翻来覆去,那么解决这个问题的正确方法可能是直接看嵌入 webkit。这将比我将要建议的更快更干净。

Now, let's suppose you don't need all that fancy control and that you are really lazy. An ancient, low tech solution to your problem could be to create a virtual frame buffer and then read its contents directly. To do this, you can set up xvfb on your server:

现在,让我们假设您不需要所有那些花哨的控制,而且您真的很懒。解决您的问题的一个古老的低技术解决方案可能是创建一个虚拟帧缓冲区,然后直接读取其内容。为此,您可以在服务器上设置 xvfb:

http://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml

http://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml

xvfb is an old unix tool that lets you create a virtual x-server with whatever type of configuration you want. More importantly, it can be configured to write the contents of its X server's screen directly to a memory mapped file! You can also set it up to use shared memory, which is a bit faster though also more complicated.

xvfb 是一个旧的 unix 工具,它可以让你用你想要的任何类型的配置创建一个虚拟的 x-server。更重要的是,它可以配置为将其 X 服务器屏幕的内容直接写入内存映射文件!您还可以将其设置为使用共享内存,虽然速度更快,但也更复杂。

回答by Shamit Verma

This project:

这个项目:

http://code.google.com/p/wkhtmltopdf/

http://code.google.com/p/wkhtmltopdf/

Achieves that. It runs Webkit on a virtual display and captures the rendered output in form of PDF. You can customize that do do something else.

达到那个。它在虚拟显示器上运行 Webkit,并以 PDF 的形式捕获呈现的输出。您可以自定义做其他事情。

OR you can create a display with tigthvnc, and set DISPLAY variable so that Chrome renders in that display.

或者您可以使用 tigthvnc 创建一个显示,并设置 DISPLAY 变量,以便 Chrome 在该显示中呈现。

回答by J-16 SDiZ

I guess you will have better luck with uzbland GTK/DirectFB. Same engine, and works with javascripts. For the facebook chat issue, I think you just have to change the user-agentstring.

我想你会在uzblGTK/DirectFB 上有更好的运气。相同的引擎,并与 javascripts 一起使用。对于 facebook 聊天问题,我认为您只需要更改user-agent字符串即可。

回答by Krumelur

There is the Origyn Web Browser, which is supposed to be an embedded WebKit-based browser that looks portable and does not depend on "heavy" libraries (like GTK). Their web page is http://www.sand-labs.org/owbbut it looks like their database crashed, which is a little worrying maybe.

有 Origyn Web Browser,它应该是一个基于 WebKit 的嵌入式浏览器,看起来可移植并且不依赖于“重”库(如 GTK)。他们的网页是http://www.sand-labs.org/owb但看起来他们的数据库崩溃了,这可能有点令人担忧。

回答by whoplisp

You could buy one of the remaining 10 (or so) OGD1 boards. http://en.wikipedia.org/wiki/Open_Graphics_Project

您可以购买剩余的 10 个(左右)OGD1 板中的一个。 http://en.wikipedia.org/wiki/Open_Graphics_Project

Then you can talk directly to hardware using libpci.

然后您可以使用 libpci 直接与硬件对话。

However you will still need code that draws a picture into a memory buffer.

但是,您仍然需要将图片绘制到内存缓冲区的代码。

I realize this answer is more a shameless plug. But people who are interested in your question might want such a board. I already have a board like this and it would help a lot if it got more exposure.

我意识到这个答案更像是一个无耻的插件。但是对您的问题感兴趣的人可能想要这样的董事会。我已经有一个这样的板子,如果它有更多的曝光度会很有帮助。

回答by plan9assembler

try to port webkitengine to the netsurf framebuffer-basedcode.

尝试将webkit引擎移植到基于netsurf 帧缓冲区的代码。

HTH

HTH

回答by GregD

I suggest using the webkit2pdfpackage (which is available for many different Linux distributions). Then use fbgswhich is a wrapper for the fbiframe buffer program, that displays PDF files right on the frame buffer.

我建议使用webkit2pdf包(可用于许多不同的 Linux 发行版)。然后使用fbgs,它是fbi帧缓冲区程序的包装器,它在帧缓冲区上显示 PDF 文件。