From be73f2381119f858ce2cd990ad20245d00792042 Mon Sep 17 00:00:00 2001 From: Akilan Selvacoumar Date: Fri, 30 Jul 2021 17:42:03 +0400 Subject: [PATCH] new changes to starting chromium browser --- Dockerfile | 4 +++- main.go | 9 ++++++++- p2prc.sh | 15 +++++++++------ scripts/start | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 scripts/start diff --git a/Dockerfile b/Dockerfile index 4153f8f..ce7afb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ # from consol/ubuntu-xfce-vnc # due to dependency issues vnc is still work in progress -from ubuntu:20.04 +from dorowu/ubuntu-desktop-lxde-vnc # Switch to root user to install additional software USER 0 @@ -52,6 +52,8 @@ run chpasswd -c SHA512 < /root/passwdfile && \ # Port 22 is used for ssh expose 22 +expose + # Assign /data as static volume. volume ["/data"] diff --git a/main.go b/main.go index c40663e..8d1d312 100644 --- a/main.go +++ b/main.go @@ -57,8 +57,15 @@ func main() { // Returns the URl address type Addr := Ip4or6(Config.IPAddress) + // If address is provided + if *addr != "" { + Addr = *addr + // Add brackets if the ip address is ipv6 + Addr = Ip4or6(Addr) + } + // Starting screen share headless - cmd := exec.Command("chromium" ,"--auto-select-desktop-capture-source=Entire screen","--url","https://" + Addr + ":8888/?mode=headless","--ignore-certificate-errors") + cmd := exec.Command("chromium-browser" ,"--no-sandbox","--auto-select-desktop-capture-source=Entire screen","--url","https://" + Addr + ":8888/?mode=headless","--ignore-certificate-errors") if err := cmd.Run(); err != nil { log.Fatalln(err) } diff --git a/p2prc.sh b/p2prc.sh index 44363d3..0080985 100644 --- a/p2prc.sh +++ b/p2prc.sh @@ -4,30 +4,33 @@ # - 8888 (laplace server) # - 24800 (barrier server) -export REMOTEGAMEPLAY=$PWD - # Updating and installing go compiler apt update -apt install golang +apt install -y golang + +# Installing git +apt install -y git # Installing barrier -apt install barrier +apt install -y barrier # Installing chromium wget https://github.com/RobRich999/Chromium_Clang/releases/download/v94.0.4585.0-r904940-linux64-deb-avx/chromium-browser-unstable_94.0.4585.0-1_amd64.deb -apt install ./v94.0.4585.0-r904940-linux64-deb-avx/chromium-browser-unstable_94.0.4585.0-1_amd64.deb +apt install -y ./v94.0.4585.0-r904940-linux64-deb-avx/chromium-browser-unstable_94.0.4585.0-1_amd64.deb # clone remotegameplay distribution git clone https://github.com/Akilan1999/remotegameplay # enter cloned directory cd remotegameplay +export REMOTEGAMEPLAY=$PWD + # Build laplace binary file go build . ./laplace -setconfig ./laplace -tls -addr 0.0.0.0:8888 & -./laplace -headless & +./laplace -headless -addr `$1` & sleep 2 diff --git a/scripts/start b/scripts/start new file mode 100644 index 0000000..3c9caa9 --- /dev/null +++ b/scripts/start @@ -0,0 +1,14 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# docker-ubuntu-sshd /start script +# +# Authors: Art567 +# Updated: Sep 20th, 2015 +# ----------------------------------------------------------------------------- + + +# Run OpenSSH server in daemon mode +/usr/sbin/sshd -D + +# Running x11 server with password +