本帖最后由 咱chen默 于 2020-9-5 12:30 编辑
一、背景 之前买过一个N1盒子,刷了openwrt系统作为软路由。 因为系统已经集成docker了 也就可以直接在N1盒子上,用docker安装ubuntu,然后在ubuntu上安装浏览器,最后以我的电脑作为浏览器的显示接口 可惜,虽然可以运行,但是却非常卡 希望有大佬能解决这个问题,我依然想用N1盒子作为软路由,然后还能作为浏览器看视频 二、安装方法 可能会有些步骤是多余的 本机上许所有用户访问X11服务(deepin系统为例) - # 默认只允许『来自本地的用户』启动的图形程序将图形显示在当前屏幕上,所以需要修改
- sudo apt-get install x11-xserver-utils
- xhost +
复制代码
ssh连接N1盒子
编辑/etc/ssh/sshd_config文件,将X11Forwarding设置为yes - # vim /etc/ssh/sshd_config
- ​
- ...
- #AllowAgentForwarding yes
- #AllowTcpForwarding yes
- #GatewayPorts no
- X11Forwarding yes
- #X11DisplayOffset 10
- #X11UseLocalhost yes
- ...
复制代码
重启盒子,然后重连
N1盒子上安装Ubuntu和Firefox浏览器 - # 注意将IP地址改为你主机的IP地址
- docker run --name -it ubuntu - e DISPLAY:192.168.1.4:0 ubuntu bash
- ​
- # 启动报错`Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.`的话,执行下面两行代码
- # mkdir /sys/fs/cgroup/systemd
- # mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
- ​
- # 安装火狐浏览器,会比较慢,可能还需要代理
- apt-get update
- apt-get install firefox
- ​
- # 打开火狐浏览器
- firefox
复制代码
效果 看上去和本地运行一样,连火狐浏览器的菜单图标都有,但是很卡顿,和网络无关,就是性能不够那种卡 路由器的CPU利用率也跑不上去
|