29

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?

uɐɪ
  • 2,540
  • 1
  • 20
  • 23
SunnyShah
  • 28,934
  • 30
  • 90
  • 137
  • 4
    I think you might be better off looking at WebKit, rather than the complete Chromium browser. – Andrew Aylett Jun 23 '11 at 09:24
  • @Andrew Aylett, Well, I am looking for chromium browser, because chrome port is the only stable, active port, I tried latest Gtk and Qt port It does not render many websites correctly. – SunnyShah Jun 23 '11 at 10:54
  • Not embedded programming related http://stackoverflow.com/tags/embedded/info, retagged. – uɐɪ Jun 23 '11 at 12:24
  • You may want to have a look at NetSurf... it is near complete HTML4 support... (please notify @ me I don't look for answers manually) – user2284570 Nov 12 '13 at 22:54
  • Great idea, this would be really useful in an embedded environment - having the power of webkit rendering makes making UIs really easy. – John Hunt Jun 26 '14 at 10:09

7 Answers7

18

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.

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:

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.

Mikola
  • 9,176
  • 2
  • 34
  • 41
  • 2
    Well, I am planning to start a fork of google chrome and make it independent of Gtk dependency, I know that this is a huge work involved in this, but In embedded industry this can do wonders. – SunnyShah Jul 03 '11 at 04:01
  • I will update my google code 's repository location over here. – SunnyShah Jul 03 '11 at 04:02
5

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

J-16 SDiZ
  • 26,473
  • 4
  • 65
  • 84
2

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/owb but it looks like their database crashed, which is a little worrying maybe.

Krumelur
  • 31,081
  • 7
  • 77
  • 119
2

try to port webkit engine to the netsurf framebuffer-based code.

HTH

plan9assembler
  • 2,862
  • 1
  • 24
  • 13
1

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

Then you can talk directly to hardware using 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.

whoplisp
  • 2,508
  • 16
  • 19
0

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

GregD
  • 741
  • 7
  • 15
0

This project:

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.

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

Shamit Verma
  • 3,839
  • 23
  • 22
  • wkhtmltopdf is based on QtWebkit, I need to work with only Google chrome 's port of webkit ( Because It is the only stable has very less renderer issues. – SunnyShah Jun 23 '11 at 12:37
  • could you give us few example of websites that did not render properly on wkhtmltopdf? – Shamit Verma Jun 23 '11 at 17:33
  • try, http://www.yatra.com in QtWebkit and same on mozilla or Chrome, you will be able to find the difference. – SunnyShah Jun 24 '11 at 04:21
  • Try to do Facebook chatting with QtWebkit, It will not work, I even checked with latest trunk of QtWebkit. – SunnyShah Jun 24 '11 at 04:43