Giter Site home page Giter Site logo

nulijiabei / webplay Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 25.27 MB

专为树莓派(Raspberry Pi)设计的基于(WebEngine)的全屏展示浏览器 ...

License: GNU General Public License v2.0

Shell 0.16% CSS 0.10% HTML 0.80% C++ 98.04% QMake 0.84% C 0.06%
raspberr rpi raspbian

webplay's Introduction

webplay

专为树莓派(Raspberry Pi)设计的基于(WebEngine)的全屏展示浏览器 ...


一款开箱即用,全屏展示浏览器,可以自定义分辨率,窗口化、展示页,等 ...


支持硬件
支持系统
目录结构
安装方法
开机启动


支持硬件

硬件 测试
Raspberry Pi 4B 已测试

支持系统

系统版本 发布日期 安装程序 测试
Raspberry Pi OS with desktop 2020-12-02 rpi4_x11_install.sh 已测试

目录结构

/usr/bin/webplayrun             启动脚本(启动参数)
/usr/bin/webplay                主程序
/etc/webplay/log4qt.properties  日志配置文件
/etc/webplay/webplay.pid        运行时进程ID

安装方法

1. 安装程序

下载

git clone https://github.com/nulijiabei/webplay.git
或 
git clone https://gitee.com/nljb/webplay.git

安装

cd webplay/ ; sh -x rpi4_x11_install.sh

2. 运行程序

参数 默认 说明
-version 版本号
-R x,y,width,height 0,0,1920,1080 分辨率设置
-window 窗口化
-no-cursor 隐藏鼠标
-no-scrollbars 隐藏滚动条
-remote-debug 远程调试
-gpu 显示 GPU 信息
-webpage http://127.0.0.1:8080 展示页
// 使用脚本启动(可以编辑脚本内参数) ...
/usr/bin/webplayrun

// 使用程序启动 ...
/usr/bin/webplay -R 0,0,1920,1080 -webpage http://www.baidu.com

3. 查看日志

tail -n 100 /dev/shm/webplay.log

4. 远程调试

// 开启远程调试
/usr/bin/webplay -remote-debug -webpage http://www.baidu.com
// 远程访问调试
使用基于 WebEngine 或 Chrome 浏览器访问 http://192.168.XXX.XXX:1112 即可

开机启动

安装 xterm

apt-get install xterm

修改 /etc/X11/xinit/xinitrc

#!/bin/sh

xset -display :0 s noblank
xset -display :0 s noexpose
xset -display :0 s off
xset -display :0 -dpms

#exec /usr/bin/uxterm -geometry 1600x600+0+0 -e 'xhost +;bash;' # 调试
exec /usr/bin/uxterm -geometry 1600x600+0+0 -e '/usr/bin/webplayrun' # 启动

创建 /lib/systemd/system/webplay.service

[Unit]
Description=WebPlay Display Manager

[Service]
ExecStart=/usr/bin/startx
Restart=always

移除连接后建立新连接

rm -f /etc/systemd/system/display-manager.service
ln -s /lib/systemd/system/webplay.service /etc/systemd/system/display-manager.service

webplay's People

Contributors

nulijiabei avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

garfieldadam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.