Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd wiki page for headless rendering with Xvfb #7512
Comments
|
Re documenting the command-line parameters, isn’t that |
./mach run --helpusage: mach [global arguments] run [command arguments] Command Arguments: I mean the params that can be passed through to Servo. I though one of these params would make the rendering to a jpg/png file, but it may not be available |
|
I think that’s a mach bug. |
|
Yes, thanks. I can't get headless mode to work: xvfb-run $SERVO -z -o $FILE $URL Am I missing anything ? thanks |
|
Paging @glennw for X-related questions. |
|
Is there an alternative way to contact glennw? |
|
What happens when you run |
|
@jojo05 There are (confusingly) two meanings of headless for servo at the moment (this needs to be cleaned up). There is the -z mode (which uses a null compositor but still connects to X), and the compile time headless option, which uses OSMesa to render to a software frame buffer and removes any X dependencies. You can build the OSMesa version by setting the env var SERVO_HEADLESS=1 before building. |
|
The program completes with no output file and no message (with top I see how cpu usage goes up to 2 cores out of 4 cores). The url I use is http://mozilla.org |
|
I ran the above command at runlevel 3 (headless) and with xvfb-run -e error.file but it doesn't show any X errors so I assume it may be an issue in servo |
As mentioned in servo#7512 and servo#7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes servo#7637.
As mentioned in servo#7512 and servo#7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes servo#7637.
Allow `./mach build` to enable Servo's headless mode As mentioned in #7512 and #7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes #7637. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7734) <!-- Reviewable:end -->
As mentioned in servo#7512 and servo#7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes servo#7637.
As mentioned in servo#7512 and servo#7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes servo#7637.
Allow `./mach build` to enable Servo's headless mode As mentioned in #7512 and #7637, the environment variable SERVO_HEADLESS enables building the OSMesa version of Servo when it is set to 1. Instead, this should be a command line option to mach's build command. Fixes #7637. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7734) <!-- Reviewable:end -->
|
I ran
Could it be a servo bug or my X window is wrong? |
|
In order to run
|
|
CC @jankeromnes who was interested in running Servo in Xvfb for https://janitor.technology/ |
|
Indeed, c.f. https://github.com/jankeromnes/dockerfiles/issues/8. Thanks for the ping! The list of required packages and |
|
Follow-up: I installed the suggested mesa packages, and configured I also tried building with |
|
@jankeromnes I found that even if it runs successfully, it will still produce the I can run it in Xvfb successfully in a ubuntu VM. Clone the https://github.com/servo/saltfs repository and run
and build servo in the VM. You can check the |
|
@shinglyu Thanks for your reply. In my test run, Servo panicked with:
Similar to the first failure in https://github.com/jankeromnes/dockerfiles/issues/8. I'd love to have a look at 1) the Servo dependencies you install, 2) the command you use to build Servo, 3) the one you use to run Servo graphically, but I couldn't find these in your repository. Could you please point me in the right direction? I only found your |
|
Oh, it looks like running with Servo started displaying servo.org, taking some time to style everything correctly. Clicking the "Rust" link didn't work, but I was able to scroll through the page, until Servo panicked with:
Maybe that error is unrelated to my setup, and it means I can now run Servo graphically in noVNC? |
|
Was the |
|
Both |
|
Please do! I suspect this is an error in Servo rather than your setup. |
|
Running
Running
|
|
Interesting, that's a failure inside webrender. cc @glennw |
|
@jankeromnes Answering your earlier question. I use the Vagrant and SaltStack configuration from the saltfs repo directly. This is the packages it installs https://github.com/servo/saltfs/blob/master/servo-build-dependencies/init.sls#L15-L25 I didn't use anything fancy to build servo, just Xvfb is started automatically in the VM, using this command https://github.com/servo/saltfs/blob/master/xvfb/xvfb.conf#L1. So to run servo headlessly in the VM, I just
And your error with WebRender is probably inside WebRender, not your configuration. |
In addtion to headless rendering instructions, it would be useful to document the params that can be passed to servo to e.g. save the rendering to a .jpg or .png file