Compare commits

...

10 Commits
1.4 ... master

Author SHA1 Message Date
Evan Ferrao c59dd698ed vububtu: Implement Self-Backup Feature With The Help Of Rclone!
- Add The New Changes While Building The `Dockerfile.heroku` Instead Of Using A fork of `vital987/vubuntu`. I'm Lazy To rebuild and upload to docker lol. People Not Deploying On Heroku Will Have To Rebuild The Image As Per `Dockerfile.heroku`. Heroku Is Simply More Fun lol.

1- Add Some Additional Packages
2- A Backup Of The Current State Of The VPS, Would Be Taken, And Saved To The CLoud(Which Could Be G-Drive, Onedrive, or any service that supports rclone).
3- This Backup Would Essentially Run Every 30min and Keep The App-Data(and Some Additional Folders) in Sync Always. This Is done by taking a backup of `.cache`, `.vscode`, `documents`, `downloads`, `.bashrc`, `.ssh`, `.config` etc; And Uploading Them to the cloud every 30min.
4- Users Are Free To Choose Which Folders Would be backed-up, However, a default config would be provided, that would backup all possible data.
2021-12-01 12:48:49 +05:30
Apoorv Vyavahare 93331185ea
Update Dockerfile.heroku 2021-11-09 23:55:38 +05:30
Apoorv Vyavahare 1fad12f07b
Update v1.4.3 2021-11-09 23:38:16 +05:30
vital987 2ebbf0d957 Update v1.4.3 2021-11-09 18:05:51 +00:00
vital987 ea2d7e17f3 Update v1.4.3 2021-11-09 18:00:58 +00:00
vital987 c60647d12c improved configs 2021-11-08 11:33:29 +00:00
Apoorv Vyavahare 699db11752 Update v1.4.2 2021-10-02 23:29:19 +05:30
Apoorv Vyavahare 6cdadcb008 Update v1.4.1 2021-09-11 16:45:46 +05:30
Apoorv Vyavahare bf402734b7
Update v1.4 2021-09-04 17:14:40 +05:30
Apoorv Vyavahare c76b7558be
Update v1.4 2021-08-29 03:58:01 +05:30
19 changed files with 312 additions and 159 deletions

View File

@ -1,143 +1,126 @@
FROM ubuntu:20.04
LABEL AboutImage "Ubuntu20.04_Fluxbox_NoVNC"
LABEL Maintainer "Apoorv Vyavahare <apoorvvyavahare@pm.me>"
ARG DEBIAN_FRONTEND=noninteractive
#VNC Server Password
ENV VNC_PASS="samplepass" \
ENV VNC_PASS="samplepass" \
#VNC Server Title(w/o spaces)
VNC_TITLE="Vubuntu_Desktop" \
VNC_TITLE="Vubuntu_Desktop" \
#VNC Resolution(720p is preferable)
VNC_RESOLUTION="1280x720" \
VNC_RESOLUTION="1280x720" \
#VNC Shared Mode (0=off, 1=on)
VNC_SHARED=0 \
#Local Display Server Port
DISPLAY=:0 \
DISPLAY=:0 \
#NoVNC Port
NOVNC_PORT=$PORT \
#Ngrok Token (Strictly use private token if using the service)
NGROK_AUTH_TOKEN="1xM4IHjFpX4CwPYr82zZJH9ZjYQ_5kmfqfXit97FkTYSGUrZJ" \
NOVNC_PORT=$PORT \
#Ngrok Token
NGROK_AUTH_TOKEN="placeholder" \
#Brave Shared Memory Usage (Set it to 0 to disable the use of /dev/shm for Brave Browser, helpful for Heroku)
BRAVE_USE_SHM=1 \
#Self Backup: Enable Backup Of App Data And App Cache Using Rclone, disabled by default
SELF_BACKUP=0 \
#Rclone Config Link: rclone.conf : pasted to gist.github.com [Raw Links Only][Secret Gist Only]
RCLONE_CONFIG_LINK="placeholder" \
#Backup Script Link: Backup Script Which Specifies Which Folders Are To Be Synced By Rclone.
BACKUP_SCRIPT_LINK="https://gist.githubusercontent.com/Box-boi/dda8fe9a1be8c21b5666fd317a9d40cc/raw/rclone-backup-script.sh" \
#Locale
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
TZ="Asia/Kolkata"
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
TZ="Asia/Kolkata"
COPY . /app/.vubuntu
SHELL ["/bin/bash", "-c"]
RUN rm -f /etc/apt/sources.list && \
#All Official Focal Repos
bash -c 'echo -e "deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse\ndeb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse\ndeb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse\ndeb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse\ndeb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse\ndeb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse\ndeb http://archive.canonical.com/ubuntu focal partner\ndeb-src http://archive.canonical.com/ubuntu focal partner" >/etc/apt/sources.list' && \
apt-get update && \
apt-get install -y \
#Packages Installation
tzdata \
software-properties-common \
apt-transport-https \
wget \
htop \
git \
curl \
vim \
zip \
sudo \
net-tools \
iputils-ping \
build-essential \
python3 \
python3-pip \
python-is-python3 \
#perl \
#ruby \
golang \
#lua5.3 \
#scala \
#mono-complete \
#r-base \
default-jre \
default-jdk \
#clojure \
#php \
nodejs \
npm \
firefox \
gnome-terminal \
gnome-calculator \
gnome-system-monitor \
gedit \
vim-gtk3 \
mousepad \
libreoffice \
pcmanfm \
terminator \
supervisor \
x11vnc \
xvfb \
gnupg \
dirmngr \
gdebi-core \
nginx \
openvpn \
ffmpeg \
pluma && \
#Fluxbox
apt-get install -y /app/.vubuntu/assets/packages/fluxbox.deb && \
#noVNC
apt-get install -y /app/.vubuntu/assets/packages/novnc.deb && \
cp /usr/share/novnc/vnc.html /usr/share/novnc/index.html && \
openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 -subj "/C=IN/ST=Maharastra/L=Private/O=Dis/CN=www.google.com" -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert && \
RUN apt-get update && \
apt-get --no-install-recommends install -y \
#Basic Packages
tzdata software-properties-common apt-transport-https wget zip unzip htop git curl vim nano zip sudo net-tools x11-utils eterm iputils-ping build-essential xvfb x11vnc supervisor \
#GUI Utilities
gnome-terminal gnome-calculator gnome-system-monitor pcmanfm terminator firefox \
#Python
python3 python3-pip python-is-python3 \
#Java
default-jre default-jdk \
#Text Editors
vim-gtk3 mousepad pluma \
#NodeJS
nodejs npm \
#Go
golang \
#Other Languages
#perl \
#ruby \
#lua5.3 \
#scala \
#mono-complete \
#r-base \
#clojure \
#php \
#Extras
libreoffice \
gnupg \
dirmngr \
gdebi-core \
nginx \
ffmpeg && \
#Fluxbox & noVNC
apt-get install --no-install-recommends -y /app/.vubuntu/assets/packages/fluxbox.deb /app/.vubuntu/assets/packages/novnc.deb && \
cp /usr/share/novnc/vnc.html /usr/share/novnc/index.html && \
openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 -subj "/C=IN/ST=Maharastra/L=Private/O=Dis/CN=www.google.com" -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert && \
#Websockify
npm i websockify && \
#MATE Desktop
#apt-get install -y \
#ubuntu-mate-core \
#ubuntu-mate-desktop && \
#XFCE Desktop
#apt-get install -y \
#xubuntu-desktop && \
npm i websockify && \
#MATE Desktop (remove "/app/.vubuntu/assets/packages/fluxbox.deb" from line 66 before uncommenting)
#apt-get install -y \
#ubuntu-mate-core \
#ubuntu-mate-desktop && \
#XFCE Desktop (remove "/app/.vubuntu/assets/packages/fluxbox.deb" from line 66 before uncommenting)
#apt-get install -y \
#xubuntu-desktop && \
#TimeZone
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
#VS Code
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ && \
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \
rm -f packages.microsoft.gpg && \
apt-get update && \
apt-get install code -y && \
#Brave
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|tee /etc/apt/sources.list.d/brave-browser-release.list && \
apt-get update && \
apt-get install brave-browser -y && \
#PeaZip
wget https://github.com/peazip/PeaZip/releases/download/8.1.0/peazip_8.1.0.LINUX.x86_64.GTK2.deb -P /tmp && \
apt-get install -y /tmp/peazip_8.1.0.LINUX.x86_64.GTK2.deb && \
#Sublime
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add - && \
add-apt-repository "deb https://download.sublimetext.com/ apt/stable/" && \
apt-get install -y sublime-text && \
#Telegram
wget https://updates.tdesktop.com/tlinux/tsetup.2.9.2.tar.xz -P /tmp && \
tar -xvf /tmp/tsetup.2.9.2.tar.xz -C /tmp && \
mv /tmp/Telegram/Telegram /usr/bin/telegram && \
#PowerShell
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -P /tmp && \
apt-get install -y /tmp/packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y powershell && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
#VS Code - source
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg && \
install -o root -g root -m 644 /tmp/packages.microsoft.gpg /etc/apt/trusted.gpg.d/ && \
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \
#Brave - source
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|tee /etc/apt/sources.list.d/brave-browser-release.list && \
#PeaZip - source
wget https://github.com/peazip/PeaZip/releases/download/8.2.0/peazip_8.2.0.LINUX.GTK2-1_amd64.deb -P /tmp && \
#Sublime - source
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add - && \
add-apt-repository "deb https://download.sublimetext.com/ apt/stable/" && \
#Telegram - source
wget https://updates.tdesktop.com/tlinux/tsetup.3.2.2.tar.xz -P /tmp && \
tar -xvf /tmp/tsetup.3.2.2.tar.xz -C /tmp && \
mv /tmp/Telegram/Telegram /usr/bin/telegram && \
#PowerShell - source
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -P /tmp && \
#Installation
apt-get update && \
apt-get install --no-install-recommends code brave-browser /tmp/peazip_8.2.0.LINUX.GTK2-1_amd64.deb sublime-text /tmp/packages-microsoft-prod.deb -y && \
apt-get update && \
apt-get install --no-install-recommends -y powershell && \
#Ngrok
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -P /tmp && \
unzip /tmp/ngrok-stable-linux-amd64.zip -d /usr/bin && \
ngrok authtoken $NGROK_AUTH_TOKEN && \
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -P /tmp && \
unzip /tmp/ngrok-stable-linux-amd64.zip -d /usr/bin && \
ngrok authtoken $NGROK_AUTH_TOKEN && \
#Live Server setup for VSCode
code --user-data-dir /root --no-sandbox --install-extension philnash.ngrok-for-vscode && \
code --user-data-dir /root --no-sandbox --install-extension ritwickdey.LiveServer && \
#Wipe Temp Files
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
rm -rf /tmp/*
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /tmp/*
ENTRYPOINT ["supervisord", "-l", "/app/.vubuntu/supervisord.log", "-c"]
ENTRYPOINT ["supervisord", "-l", "/app/.vubuntu/assets/logs/supervisord.log", "-c"]
CMD ["/app/.vubuntu/assets/configs/supervisordconf"]

View File

@ -1,6 +1,19 @@
FROM vital987/vubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive \
RUN curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip && \
unzip rclone-current-linux-amd64.zip -d /tmp && \
cp /tmp/rclone-*-linux-amd64/rclone /usr/bin/ && \
chown root:root /usr/bin/rclone && \
chmod 755 /usr/bin/rclone && \
rm -rf rclone* /tmp/*
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get --no-install-recommends install -y \
aria2 neofetch rar unrar rename openssh-client tmate sshpass rsync restic && \
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<<y >/dev/null 2>&1
ENV DEBIAN_FRONTEND=noninteractive \
#VNC Server Password
VNC_PASS="samplepass" \
#VNC Server Title(w/o spaces)
@ -10,9 +23,21 @@ ENV DEBIAN_FRONTEND=noninteractive \
#NoVNC Port
NOVNC_PORT=5900 \
#PORT
PORT=80 \
PORT=80 \
#Disable Shared Memory for Brave
BRAVE_USE_SHM=0 \
#Self Backup: Enable Backup Of App Data And App Cache Using Rclone, disabled by default
SELF_BACKUP=0 \
#Rclone Config Link: rclone.conf : pasted to gist.github.com [Raw Links Only][Secret Gist Only]
RCLONE_CONFIG_LINK="placeholder" \
#Backup Script Link: Backup Script Which Specifies Which Folders Are To Be Synced By Rclone.
BACKUP_SCRIPT_LINK="https://gist.githubusercontent.com/Box-boi/dda8fe9a1be8c21b5666fd317a9d40cc/raw/rclone-backup-script.sh" \
#Locale
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
TZ="Asia/Kolkata"
#Include The New Changes: self-backup.py and 6-selfbackup.conf
COPY . /app/.vubuntu

View File

@ -1,42 +1,52 @@
# Ubuntu with NoVNC/[PureVNC](https://github.com/vital987/vubuntu/tree/purevnc) (w/o noVNC)
# VNC + Ubuntu = Vubuntu ¯\\_\(ツ\)\_\/¯
[[![Ubuntu Version](https://img.shields.io/static/v1?label=Ubuntu&message=20.04&color=E95420&logo=ubuntu)](https://ubuntu.com) [![Maintainer](https://img.shields.io/static/v1?label=Maintainer&message=Vital987&color=1e90ff)](https://github.com/vital987) [![Maintainance](https://img.shields.io/badge/Maintenance%20Level-Active-success.svg)](https://github.com/vital987) [![Docker Pulls](https://img.shields.io/docker/pulls/vital987/vubuntu.svg)](https://hub.docker.com/r/vital987/vubuntu) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)]()<br>[![Latest](https://raw.githubusercontent.com/vital987/vubuntu/master/assets/repo_files/button-latest.png)](https://heroku.com/deploy?template=https://github.com/Box-boi/vubuntu/) [![Minimal](https://raw.githubusercontent.com/vital987/vubuntu/master/assets/repo_files/button-minimal.png)](https://heroku.com/deploy?template=https://github.com/Box-boi/vubuntu/tree/minimal) [![PureVNC](https://raw.githubusercontent.com/vital987/vubuntu/master/assets/repo_files/button-purevnc.png)](https://heroku.com/deploy?template=https://github.com/Box-boi/vubuntu/tree/purevnc) [![PureVNC-Minimal](https://raw.githubusercontent.com/vital987/vubuntu/master/assets/repo_files/button-purevnc-minimal.png)](https://heroku.com/deploy?template=https://github.com/Box-boi/vubuntu/tree/purevnc-minimal)
[![Ubuntu Version](https://img.shields.io/static/v1?label=Ubuntu&message=20.04&color=E95420&logo=ubuntu)](https://ubuntu.com) [![Maintainer](https://img.shields.io/static/v1?label=Maintainer&message=Vital987&color=1e90ff)](https://github.com/vital987) [![Maintainance](https://img.shields.io/badge/Maintenance%20Level-Active-success.svg)](https://github.com/vital987) [![Docker Pulls](https://img.shields.io/docker/pulls/vital987/vubuntu.svg)](https://hub.docker.com/r/vital987/vubuntu) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)]()<br>[![Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/vital987/vubuntu)<br>
## **Table of Contents :**
* [**Available Options**](#available-options-)
* [**Packages**](#packages-)
* [**Screenshots**](#screenshots-)
* [**Environment Variables**](#environment-variables-)
* [**Installation**](#installation-)
* [**Warnings**](#warnings-)
## **Available Options :**
* **[Latest](https://github.com/vital987/vubuntu/):** Full version of vubuntu with utilities, additional installed languages (Java & Go) & optional packages.
* **[Minimal](https://github.com/vital987/vubuntu/tree/minimal):** Minimal version with only required packages, see next section for more info.
* **[PureVNC](https://github.com/vital987/vubuntu/tree/purevnc):** Full, direct VNC access without noVNC.
* **[PureVNC-Minimal](https://github.com/vital987/vubuntu/tree/purevnc):** Minimal, direct VNC access without noVNC.
## **Packages :**
* •: Available in minimal version
* **Browsers :**
* [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=%20&color=orange&logo=firefox-browser)]() [![Brave](https://img.shields.io/static/v1?label=Brave&message=%20&color=fa552a&logo=brave)]()
* [![Firefox](https://img.shields.io/static/v1?label=Firefox&message=%20&color=orange&logo=firefox-browser)]() [![Brave](https://img.shields.io/static/v1?label=Brave&message=&color=fa552a&logo=brave)]()
* **Shells :**
* [![Gnome Terminal](https://img.shields.io/static/v1?label=GnomeTerminal&message=%20&color=green&logo=gnome&logoColor=green)]() [![Terminator](https://img.shields.io/static/v1?label=Terminator&message=%20&color=red&logo=powershell&logoColor=red)]() [![PowerShell](https://img.shields.io/static/v1?label=PowerShell&message=%20&color=5391FE&logo=powershell&logoColor=5391FE)]()
* [![Gnome Terminal](https://img.shields.io/static/v1?label=GnomeTerminal&message=%20&color=green&logo=gnome&logoColor=green)]() [![Terminator](https://img.shields.io/static/v1?label=Terminator&message=&color=red&logo=powershell&logoColor=red)]() [![PowerShell](https://img.shields.io/static/v1?label=PowerShell&message=%20&color=5391FE&logo=powershell&logoColor=5391FE)]()
* **Coding :**
* [![VS Code](https://img.shields.io/static/v1?label=VS%20Code&message=%20&color=1e90ff&logo=visual-studio-code&logoColor=1e90ff)]()
* [![VS Code](https://img.shields.io/static/v1?label=VS%20Code&message=&color=1e90ff&logo=visual-studio-code&logoColor=1e90ff)]()
* **Text Editors :**
* [![G-Vim](https://img.shields.io/static/v1?label=G-Vim&message=%20&color=brightgreen&logo=vim&logoColor=brightgreen)]() [![Pluma](https://img.shields.io/static/v1?label=Pluma&message=%20&color=green&logo=textpattern&logoColor=green)]() [![Sublime](https://img.shields.io/static/v1?label=Sublime%20Text&message=%20&color=orange&logo=sublime-text&logoColor=orange)]()
* [![G-Vim](https://img.shields.io/static/v1?label=G-Vim&message=%20&color=brightgreen&logo=vim&logoColor=brightgreen)]() [![Pluma](https://img.shields.io/static/v1?label=Pluma&message=&color=green&logo=textpattern&logoColor=green)]() [![Sublime](https://img.shields.io/static/v1?label=Sublime%20Text&message=%20&color=orange&logo=sublime-text&logoColor=orange)]()
* **Office Suite :**
* [![LibreOffice](https://img.shields.io/static/v1?label=Libre%20Office&message=%20&color=brightgreen&logo=libreoffice&logoColor=brightgreen)]()
* **Social Apps :**
* [![Telegram](https://img.shields.io/static/v1?label=Telegram&message=%20&color=26A5E4&logo=telegram&logoColor=26A5E4)]()
* [![Telegram](https://img.shields.io/static/v1?label=Telegram&message=&color=26A5E4&logo=telegram&logoColor=26A5E4)]()
* **Utilities :**
* [![File Manager](https://img.shields.io/static/v1?label=File%20Manager&message=%20&color=EFF700&logo=files&logoColor=EFF700)]() [![Calculator](https://img.shields.io/static/v1?label=Calculator&message=%20&color=017A79&logo=craft-cms&logoColor=017A79)]() [![System Monitor](https://img.shields.io/static/v1?label=System%20Monitor&message=%20&color=111324&logo=campaign-monitor&logoColor=111324)]() [![PeaZip](https://img.shields.io/static/v1?label=Ngrok&message=%20&color=1853DB&logo=ngrok&logoColor=1853DB)]() [![PeaZip](https://img.shields.io/static/v1?label=PeaZip&message=%20&color=6300F7&logo=git-lfs&logoColor=6300F7)]()
* **Languages Installed :**
* [![C](https://img.shields.io/static/v1?label=C&message=%20&logo=c)]() [![C++](https://img.shields.io/static/v1?label=C%2b%2b&message=%20&logo=c%2b%2b&logoColor=1e90ff&color=1e90ff)]() [![C Sharp(optional)](https://img.shields.io/static/v1?label=*C%23&message=%20&logo=c-sharp&logoColor=green&color=green)]() [![Clojure(optional)](https://img.shields.io/static/v1?label=*Clojure&message=%20&logo=clojure&logoColor=brightgreen&color=brightgreen)]() [![Go](https://img.shields.io/static/v1?label=Go&message=%20&logo=go&logoColor=1e90ff&color=1e90ff)]() [![Java](https://img.shields.io/static/v1?label=Java&message=%20&logo=java&logoColor=f89820&color=f89820)]() [![Lua(optional)](https://img.shields.io/static/v1?label=*Lua&message=%20&color=blueviolet&logo=lua&logoColor=9638E7)]() [![R(optional)](https://img.shields.io/static/v1?label=*R&message=%20&logo=r&logoColor=blue&color=blue)]() [![Ruby](https://img.shields.io/static/v1?label=Ruby&message=%20&logo=ruby&logoColor=9b111e&color=9b111e)]() [![Perl(optional)](https://img.shields.io/static/v1?label=*Perl&message=%20&logo=perl&logoColor=cc99ff&color=cc99ff)]() [![Python](https://img.shields.io/static/v1?label=Python&message=%20&logo=python&color=blue)]()
* [![File Manager](https://img.shields.io/static/v1?label=File%20Manager&message=&color=EFF700&logo=files&logoColor=EFF700)]() [![Calculator](https://img.shields.io/static/v1?label=Calculator&message=%20&color=017A79&logo=craft-cms&logoColor=017A79)]() [![System Monitor](https://img.shields.io/static/v1?label=System%20Monitor&message=%20&color=111324&logo=campaign-monitor&logoColor=111324)]() [![Ngrok](https://img.shields.io/static/v1?label=Ngrok&message=•&color=1853DB&logo=ngrok&logoColor=1853DB)]() [![PeaZip](https://img.shields.io/static/v1?label=PeaZip&message=&color=6300F7&logo=git-lfs&logoColor=6300F7)]()
* **Languages Installed:**
* [![C](https://img.shields.io/static/v1?label=C&message=•&logo=c)]() [![C++](https://img.shields.io/static/v1?label=C%2b%2b&message=•&logo=c%2b%2b&logoColor=1e90ff&color=1e90ff)]() [![Go](https://img.shields.io/static/v1?label=Go&message=%20&logo=go&logoColor=1e90ff&color=1e90ff)]() [![Java](https://img.shields.io/static/v1?label=Java&message=%20&logo=java&logoColor=f89820&color=f89820)]() [![Python](https://img.shields.io/static/v1?label=Python&message=&logo=python&color=blue)]()
## **Screenshots :**
<div>
<details open>
<summary>Laptop/Desktop</summary>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/desktop_ss1.png" align="center" width=900 height=500><br><br>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/desktop_ss2.png" align="center" width=900 height=500><br><br>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/desktop_ss1.png" align="center" width=450 height=250>&nbsp;
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/desktop_ss2.png" align="center" width=450 height=250><br><br>
</details>
<details>
<summary>Smartphone/Tablet</summary>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/phone_ss1.png" align="center" width=900 height=500><br><br>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/phone_ss2.png" align="center" width=900 height=500><br><br>
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/phone_ss1.png" align="center" width=450 height=250>&nbsp;
<img src="https://raw.githubusercontent.com/vital987/vubuntu/master/assets/screenshots/phone_ss2.png" align="center" width=450 height=250><br><br>
</details>
</div>
@ -46,9 +56,17 @@
|:-:|:-:|
| VNC_TITLE | VNC Session Title |
| VNC_RESOLUTION | VNC Server Resolution |
| VNC_SHARED | VNC Shared Mode |
| DISPLAY | Display Server Port |
| PORT | NoVNC HTTP Port |
| NGROK_AUTH_TOKEN | Ngrok Token |
| NGROK_REGION | Ngrok Server Region (Only PureVNC) |
| SELF_BACKUP | Enable Backup Of App Data And App Cache Using Rclone, disabled by default |
| RCLONE_CONFIG_LINK | Your `rclone.conf` Pasted To gist.github.com[Raw Link Only]. To Generate rclone.conf, visit rclone.org/drive. [Required If SELF_BACKUP=1]. |
| BACKUP_SCRIPT_LINK | Backup Script Which Specifies Which Folders Are To Be Synced By Rclone. Default Value Is Provided, And Performs A Complete Backup |
| APP_NAME | Name of Heroku app |
| NO_SLEEP | Prevent Heroku app from sleeping, disabled by default |
| BRAVE_USE_SHM | Usage of /dev/shm for Brave |
## **Installation :**
* Heroku Users :
@ -66,10 +84,16 @@
-e PORT=9870 \
-d -p 8080:9870 \
vital987/vubuntu:latest
```
* noVNC Web-UI will be accessible on port **8080**
## **Some More Info About Self Backup Feature And Rclone Feature :**
* 1- A Backup Of The Current State Of The VPS, Would Be Taken, And Saved To The CLoud(Which Could Be G-Drive, Onedrive, or any service that supports rclone).
* 2- This Backup Would Essentially Run Every 30min and Keep The App-Data(and Some Additional Folders) in Sync Always. This Is done by taking a backup of `.cache`, `.vscode`, `documents`, `downloads`, `.bashrc`, `.ssh`, `.config` etc; And Uploading Them to the cloud every 30min.
* 3- Users Are Free To Choose Which Folders Would be backed-up, However, a default config would be provided, that would backup all possible data.
## **Warnings :**
* [ ! ] **VNC_TITLE & VNC_PASS values should be without spaces.**
* [ ! ] **The whole project runs as a root user in a docker container.**
* [ ! ] **The whole project runs as a root user and non-sandboxed chromium in a docker container.**
* [ ! ] **Using VNC/Remote Desktops are strictly prohibited/banned on many free platforms.**
* [ ! ] **Deploy/Use at your own risk & responsibility!**

View File

@ -1,9 +1,9 @@
{
"name": "Vubuntu",
"description": "Fully fledged Ubuntu NoVNC, refer readme for more info.",
"repository": "https://github.com/vital987/vubuntu.git",
"logo": "https://imgur.com/1qCGUwK.png",
"keywords": ["docker","ubuntu", "vscode", "novnc", "firefox", "brave", "fluxbox", "linux", "remote", "ssh", "vnc", "vubuntu"],
"repository": "https://github.com/Box-boi/vubuntu.git",
"logo": "https://raw.githubusercontent.com/vital987/vubuntu/master/assets/icons/64x64.png",
"keywords": ["docker","ubuntu", "vscode", "novnc", "firefox", "brave", "fluxbox", "linux", "remote", "ssh", "vnc", "vubuntu", "rclone", "auto-backup"],
"stack": "container",
"env": {
"VNC_TITLE" : {
@ -17,8 +17,32 @@
},
"VNC_RESOLUTION" : {
"description": "VNC Server Resolution in WxH, 720p is preferrable.",
"value" : "1280x720",
"value" : "1280x720",
"required" : true
}
},
"SELF_BACKUP" : {
"description": "Enable Backup Of App Data And App Cache Using Rclone, 1=on, 0=off",
"value" : "0",
"required" : true
},
"RCLONE_CONFIG_LINK" : {
"description": "Your `rclone.conf` Pasted To gist.github.com[Raw Link Only][Secret Gist Only]. To Generate rclone.conf, visit rclone.org/drive. [Required If SELF_BACKUP=1].",
"required" : false
},
"BACKUP_SCRIPT_LINK" : {
"description": "Backup Script Which Specifies Which Folders Are To Be Synced By Rclone.",
"value" : "https://gist.githubusercontent.com/Box-boi/dda8fe9a1be8c21b5666fd317a9d40cc/raw/rclone-backup-script.sh",
"required" : true
},
"NO_SLEEP" : {
"description": "Prevent app from sleeping, 1=on, 0=off",
"value" : "1",
"required" : true
},
"APP_NAME" : {
"description": "Name of the app, same as mentioned above.",
"value" : "",
"required" : true
}
}
}

View File

@ -1,6 +1,4 @@
[program:Xvfb]
command=bash -c 'Xvfb $DISPLAY -screen 0 $VNC_RESOLUTION"x24" -nolisten unix'
autostart=true
autorestart=true
stderr_logfile=/var/log/Xvfb.stderr.log
priority=999
stderr_logfile=/app/.vubuntu/assets/logs/Xvfb.stderr.log
priority=1

View File

@ -1,6 +1,5 @@
[program:VNC]
command=bash -c 'x11vnc -storepasswd $VNC_PASS /app/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /app/.xpass -geometry $VNC_RESOLUTION -forever -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE'
autostart=true
autorestart=false
stderr_logfile=/var/log/x11vnc.stderr.log
priority=998
command=bash -c 'if ((VNC_SHARED==0)); then x11vnc -storepasswd $VNC_PASS /app/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /app/.xpass -geometry $VNC_RESOLUTION -forever -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; else x11vnc -storepasswd $VNC_PASS /app/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /app/.xpass -geometry $VNC_RESOLUTION -forever -shared -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; fi'
startsecs=0
stderr_logfile=/app/.vubuntu/assets/logs/x11vnc.stderr.log
priority=2

View File

@ -1,6 +1,7 @@
[program:websockify]
command=bash -c 'websockify --cert /etc/ssl/novnc.cert --key /etc/ssl/novnc.key -D --web=/usr/share/novnc/ $PORT localhost:5900'
autostart=true
autorestart=false
stderr_logfile=/var/log/websockify.stderr.log
priority=997
exitcodes=0,1
startsecs=0
stderr_logfile=/app/.vubuntu/assets/logs/websockify.stderr.log
priority=3

View File

@ -1,6 +1,5 @@
[program:Fluxbox]
command=fluxbox
autostart=true
autorestart=true
priority=996
stderr_logfile=/var/log/fluxbox.err.log
exitcodes=1
priority=4
stderr_logfile=/app/.vubuntu/assets/logs/fluxbox.err.log

View File

@ -0,0 +1,6 @@
[program:self-ping]
command=python3 /app/.vubuntu/assets/scripts/self-ping.py
exitcodes=0
startsecs=0
stderr_logfile=/app/.vubuntu/assets/logs/selfping.err.log
priority=5

View File

@ -0,0 +1,6 @@
[program:self-backup]
command=python3 /app/.vubuntu/assets/scripts/self-backup.py
exitcodes=0
startsecs=0
stderr_logfile=/app/.vubuntu/assets/logs/selfbackup.err.log
priority=6

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/repo_files/mods.7z Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -0,0 +1,51 @@
#!/usr/bin/env python3
# Script to sync App-Data To Cloud every 30 minutes Using rclone, it also prevents app from sleeping.
import os
import logging
from time import sleep
if __name__ == "__main__":
logging.basicConfig(filename="/app/.vubuntu/assets/logs/self-backup.py.log", format='%(asctime)s %(message)s', filemode='w')
logger = logging.getLogger()
logger.setLevel(logging.INFO)
if os.getenv("SELF_BACKUP") == "1":
if "RCLONE_CONFIG_LINK" not in os.environ:
print("[!]RCLONE_CONFIG_LINK unset, terminating...")
logger.error("[!]RCLONE_CONFIG_LINK unset, terminating...")
exit()
backup_script_link = os.getenv("BACKUP_SCRIPT_LINK")
rclone_config_link = os.getenv("RCLONE_CONFIG_LINK")
#Create ~/.config/rclone if not present already
createdir = 'mkdir -p ~/.config/rclone'
True if os.path.isdir("/.config/rclone") else os.system(createdir)
#Download rclone.conf if not downloaded already
download_rclone_conf = 'aria2c --max-tries=0 --retry-wait=5 -o rclone.conf ' + rclone_config_link + ' -d ~/.config/rclone'
True if os.path.isfile("/.config/rclone/rclone.conf") else os.system(download_rclone_conf)
#Clean Duplicate Downloads: If Self Deploying on your personal computer/server, The Above two commands would result in multiple copies of rclone.conf, as depending on server, home(~), might not be the same as root(/)
#In Case Of heroku home(~) and root(/) is same. Thus The Statemenet Above checks for /.conf instead of ~/.conf as python doesnt allow "~" in os.path.isfile()
#Thus, Clean Up The Residual Copies Of rclone.conf. (files with prefix .1, .2, .3 etc)
os.system("rm -rf ~/.config/rclone/rclone.conf.*")
while True:
try:
logger.info(f"Starting Sync Using Rclone")
argument = 'curl -s ' + backup_script_link + ' | bash'
os.system(argument)
except:
logger.warning("Sync failed, retrying...")
try:
logger.info(f"Retrying Sync Using Rclone")
argument = 'curl -s ' + backup_script_link + ' | bash'
os.system(argument)
except:
logger.error("Cannot Sync App-Date, Make Sure rclone.conf is filled properly! Terminating...")
sleep(25*60)
else:
print("SELF_BACKUP mode disabled, terminating...")
logger.info("SELF_BACKUP mode disabled, terminating...")

View File

@ -0,0 +1,37 @@
#!/usr/bin/env python3
# Script to send GET request to the Heroku app URL every 25 minutes to prevent the app from sleeping.
import os
import logging
try:
import requests
except:
os.system("pip3 install requests")
import requests
from time import sleep
if __name__ == "__main__":
logging.basicConfig(filename="/app/.vubuntu/assets/logs/self-ping.py.log", format='%(asctime)s %(message)s', filemode='w')
logger = logging.getLogger()
logger.setLevel(logging.INFO)
if os.getenv("NO_SLEEP") == "1":
if "APP_NAME" not in os.environ:
print("[!]APP_NAME unset, terminating...")
logger.error("[!]APP_NAME unset, terminating...")
exit()
app_name = os.getenv("APP_NAME")
while True:
try:
logger.info(f"Pinging https://{app_name}.herokuapp.com")
requests.get(f"https://{app_name}.herokuapp.com")
except:
logger.warning("Ping failed, retrying...")
try:
requests.get(f"https://{app_name}.herokuapp.com")
except:
logger.error("Cannot ping app, terminating...")
sleep(25*60)
else:
print("NO_SLEEP mode disabled, terminating...")
logger.info("NO_SLEEP mode disabled, terminating...")