[英]How to setup slimerjs in console on Ubuntu?
I am trying to make screenshot of webgl models with slimer.js from console 我试图从控制台使用slimer.js制作webgl模型的屏幕截图
I install dependencies 我安装依赖项
# sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1 #sudo apt-get install libc6 libstdc ++ 6 libgcc1 libgtk2.0-0 libasound2 libxrender1
I download package for Linux x86_64 from http://slimerjs.org/download.html 我从http://slimerjs.org/download.html下载Linux x86_64的软件包
Install firefox 安装firefox
# apt-get install firefox #apt-get install firefox
create script 创建脚本
var system = require('system'), page = require('webpage').create(); var system = require('system'),page = require('webpage')。create();
page.open(' http://github.com/ ', function() { page.render('test.png'); phantom.exit(); }); page.open(' http://github.com/',function (){page.render('test.png'); phantom.exit();}); page.onError = function(msg, trace) { console.log(msg); page.onError = function(msg,trace){console.log(msg); } }
add path to firefox.app 添加firefox.app的路径
# export SLIMERJSLAUNCHER=/usr/bin/firefox #export SLIMERJSLAUNCHER = / usr / bin / firefox
run slimer with xulrunner 用xulrunner运行slimer
# ./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js #./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js
And finally get error: 最后得到错误:
# ./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js #./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js
(process:23815): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Error: App:Name not specified in application.ini (进程:23815):GLib-CRITICAL **:g_slice_set_config:断言'sys_page_size == 0'失败错误:应用:未在application.ini中指定名称
What I am doing wrong? 我做错了什么? Help me, please, to find out. 请帮帮我,找出来。
With all best regards. 最诚挚的问候。 Anton. 安东。
Problem was in firefox version 问题出在firefox版本中
# python slimerjs.py --debug=true ../screen.js (process:24063): GLib-CRITICAL : g_slice_set_config: assertion 'sys_page_size == 0' failed Error: Platform version '31.0' is not compatible with minVersion >= 17.0.0 maxVersion <= 29. #python slimerjs.py --debug = true ../screen.js(进程:24063):GLib-CRITICAL:g_slice_set_config:断言'sys_page_size == 0'失败错误:平台版本'31 .0'与minVersion> =不兼容17.0.0 maxVersion <= 29。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.