Added features

This commit is contained in:
devindice 2022-08-05 17:11:53 -04:00
parent 34ab02dbe7
commit 5f35f7b731
27 changed files with 333 additions and 37 deletions

View file

@ -8,12 +8,9 @@ FROM ubuntu:20.04 as system
RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
# Copy files
COPY rootfs /
# Ca-Certificates
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
ca-certificates \
&& apt autoclean -y \
&& apt autoremove -y \
@ -23,10 +20,10 @@ RUN apt update \
# built-in packages
ENV DEBIAN_FRONTEND noninteractive
RUN apt update \
&& apt install -y --no-install-recommends apt-utils software-properties-common curl \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends apt-utils software-properties-common curl \
apache2-utils man-db manpages-posix manpages-dev manpages-posix-dev \
&& apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
supervisor nginx sudo net-tools zenity xz-utils \
dbus-x11 x11-utils alsa-utils \
mesa-utils libgl1-mesa-dri \
@ -36,7 +33,7 @@ RUN apt update \
# install debs error if combine together
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
xvfb x11vnc ttf-ubuntu-font-family ttf-wqy-zenhei \
&& apt autoclean -y \
&& apt autoremove -y \
@ -52,7 +49,7 @@ RUN apt update \
# Install Desktop
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
xubuntu-desktop gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
&& apt autoclean -y \
&& apt autoremove -y \
@ -65,7 +62,7 @@ RUN chmod +x /bin/tini
# ffmpeg
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
&& apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /usr/local/ffmpeg \
@ -86,8 +83,10 @@ RUN apt-get update \
&& rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt
# Install Additonal Packages
RUN mkdir /cloud9
COPY rootfs/cloud9/apt-requirements.txt /cloud9/apt-requirements.txt
RUN apt update \
&& grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y --no-install-recommends --allow-unauthenticated \
&& grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
@ -100,7 +99,7 @@ RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone
RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone
RUN /cloud9/c9sdk/scripts/install-sdk.sh
RUN cd /cloud9/c9sdk && git reset --hard
RUN wget -P /cloud9/ -O user-install.sh https://raw.githubusercontent.com/c9/install/master/install.sh
RUN wget -O user-install.sh https://raw.githubusercontent.com/c9/install/master/install.sh && mv user-install.sh /cloud9/
################################################################################
@ -153,3 +152,8 @@ ENV HOME=/home/ubuntu \
SHELL=/bin/bash
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health
ENTRYPOINT ["/startup.sh"]
RUN apt update && apt install -y menulibre
# Copy files
COPY rootfs /

View file

@ -0,0 +1,58 @@
; xfce4-terminal GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>2")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>6")
; (gtk_accel_path "<Actions>/terminal-window/copy-input" "")
; (gtk_accel_path "<Actions>/terminal-window/close-other-tabs" "")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Primary><Shift>Page_Down")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>7")
; (gtk_accel_path "<Actions>/terminal-window/set-title-color" "")
; (gtk_accel_path "<Actions>/terminal-window/edit-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/zoom-menu" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>1")
; (gtk_accel_path "<Actions>/terminal-window/fullscreen" "F11")
; (gtk_accel_path "<Actions>/terminal-window/read-only" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>5")
; (gtk_accel_path "<Actions>/terminal-window/preferences" "")
; (gtk_accel_path "<Actions>/terminal-window/reset-and-clear" "")
; (gtk_accel_path "<Actions>/terminal-window/about" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>4")
; (gtk_accel_path "<Actions>/terminal-window/close-window" "<Primary><Shift>q")
; (gtk_accel_path "<Actions>/terminal-window/reset" "")
; (gtk_accel_path "<Actions>/terminal-window/save-contents" "")
(gtk_accel_path "<Actions>/terminal-window/toggle-menubar" "F10")
; (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary><Shift>c")
; (gtk_accel_path "<Actions>/terminal-window/copy-html" "")
; (gtk_accel_path "<Actions>/terminal-window/last-active-tab" "")
; (gtk_accel_path "<Actions>/terminal-window/show-borders" "")
; (gtk_accel_path "<Actions>/terminal-window/view-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/detach-tab" "<Primary><Shift>d")
; (gtk_accel_path "<Actions>/terminal-window/scroll-on-output" "")
; (gtk_accel_path "<Actions>/terminal-window/show-toolbar" "")
; (gtk_accel_path "<Actions>/terminal-window/next-tab" "<Primary>Page_Down")
; (gtk_accel_path "<Actions>/terminal-window/tabs-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/search-next" "")
; (gtk_accel_path "<Actions>/terminal-window/search-prev" "")
; (gtk_accel_path "<Actions>/terminal-window/undo-close-tab" "")
; (gtk_accel_path "<Actions>/terminal-window/set-title" "<Primary><Shift>s")
; (gtk_accel_path "<Actions>/terminal-window/contents" "F1")
; (gtk_accel_path "<Actions>/terminal-window/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/terminal-window/close-tab" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/terminal-window/new-tab" "<Primary><Shift>t")
; (gtk_accel_path "<Actions>/terminal-window/new-window" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/terminal-window/terminal-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/show-menubar" "")
; (gtk_accel_path "<Actions>/terminal-window/select-all" "<Primary><Shift>a")
; (gtk_accel_path "<Actions>/terminal-window/paste" "<Primary><Shift>v")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>9")
; (gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Primary><Shift>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/search" "<Primary><Shift>f")
; (gtk_accel_path "<Actions>/terminal-window/file-menu" "")
; (gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Primary>Page_Up")
; (gtk_accel_path "<Actions>/terminal-window/paste-selection" "")
; (gtk_accel_path "<Actions>/terminal-window/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/terminal-window/zoom-out" "<Primary>minus")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>8")
; (gtk_accel_path "<Actions>/terminal-window/help-menu" "")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>3")

View file

@ -0,0 +1,34 @@
[Configuration]
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBellUrgent=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscMouseWheelZoom=TRUE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
MiscMiddleClickOpensUri=FALSE
MiscCopyOnSelect=FALSE
MiscShowRelaunchDialog=TRUE
MiscRewrapOnResize=TRUE
MiscUseShiftArrowsToScroll=FALSE
MiscSlimTabs=FALSE
MiscNewTabAdjacent=FALSE
MiscSearchDialogOpacity=100
MiscShowUnsafePasteDialog=TRUE
ColorPalette=rgb(37,37,37);rgb(248,88,88);rgb(115,224,115);rgb(239,227,98);rgb(120,120,236);rgb(234,108,234);rgb(104,230,230);rgb(170,170,170);rgb(138,135,135);rgb(233,130,130);rgb(160,227,160);rgb(235,235,147);rgb(170,170,239);rgb(232,156,232);rgb(158,233,233);rgb(255,255,255)
ColorBackground=#000000000000
ScrollingLines=30000
TextBlinkMode=TERMINAL_TEXT_BLINK_MODE_NEVER
TabActivityColor=#34346565a4a4

View file

@ -18,7 +18,7 @@ stderr_logfile=/dev/fd/1
stderr_logfile_maxbytes=0
[group:x]
programs=xvfb,lxpanel,x11vnc,novnc
programs=xvfb,lxpanel,x11vnc,novnc,cloud9
[program:lxpanel]
priority=15
@ -41,3 +41,15 @@ priority=25
directory=/usr/local/lib/web/frontend/static/novnc
command=bash /usr/local/lib/web/frontend/static/novnc/utils/launch.sh --listen 6081
stopasgroup=true
[program:cloud9]
priority=25
directory=/cloud9/c9sdk
user=%USER%
command=bash -c 'while ps aux | grep user-install.sh | grep -v grep 2>&1> /dev/null; do sleep 1; done; node server.js -l 0.0.0.0 -p 9999 -a : -w /workspace'
[program:desktop]
priority=30
directory=/workspace/.ubuntu/dynamic-background/active
user=%USER%
command=bash /usr/share/backgrounds/dynamic.sh

View file

@ -20,6 +20,14 @@ if [ -n "$RESOLUTION" ]; then
sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh
fi
if [ -n "$TZ" ]; then
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
dpkg-reconfigure --frontend noninteractive tzdata
fi
#sed -i "s#/usr/share/backgrounds.*#/usr/share/backgrounds/default.png\"/>#g" /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
USER=${USER:-root}
HOME=/root
if [ "$USER" != "root" ]; then
@ -28,6 +36,10 @@ if [ "$USER" != "root" ]; then
if [ -z "$PASSWORD" ]; then
echo " set default password to \"ubuntu\""
PASSWORD=ubuntu
elif [[ "$PASSWORD" == "randomize" ]]; then
echo " set random default password"
PASSWORD=$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)
fi
HOME=/home/$USER
echo "$USER:$PASSWORD" | chpasswd
@ -37,13 +49,6 @@ if [ "$USER" != "root" ]; then
fi
sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
# home folder
if [ ! -x "$HOME/.config/pcmanfm/LXDE/" ]; then
mkdir -p $HOME/.config/pcmanfm/LXDE/
ln -sf /usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf $HOME/.config/pcmanfm/LXDE/
chown -R $USER:$USER $HOME
fi
# nginx workers
sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf
@ -72,4 +77,93 @@ fi
PASSWORD=
HTTP_PASSWORD=
# cloud9
cp /cloud9/bashrc.default /home/$USER/.bashrc
mkdir -p /workspace/.$USER/.standalone
mkdir -p /workspace/.$USER/.c9
USER_SETTINGS="/workspace/.$USER/user.settings"
if [ ! -f $USER_SETTINGS ]; then touch $USER_SETTINGS; fi
ln -sf $USER_SETTINGS /home/$USER/.c9/user.settings
# Symlink SSH keys
mkdir -p /workspace/.$USER/.ssh
chmod 700 /workspace/.$USER/.ssh
ln -sf /workspace/.$USER/.ssh /home/$USER/.ssh
if [ -n "$DOMAIN" ]; then
DOMAIN="cloud9.example.com"
fi
chown -R $USER:$USER /home/$USER /cloud9 /workspace
# Add required packages for ubuntu user (Run as user)
mkdir -p /workspace/.c9
chown $USER:$USER /workspace/.c9
sudo -H -u $USER bash -c 'bash /cloud9/user-install.sh' 2>&1> /workspace/.c9/install.log &
chown $USER /usr/share/applications/
# Setup Backgrounds
mkdir -p /workspace/.ubuntu/dynamic-background/active/
for BACKGROUND in $(ls -1 /usr/share/backgrounds/dynamic-background/ | grep -v -e "active" -e "default" ); do
cp -r /usr/share/backgrounds/dynamic-background/$BACKGROUND /workspace/.ubuntu/dynamic-background/
done
if [ ! "$(ls -A /workspace/.ubuntu/dynamic-background/active/ )" ]; then
cp -r /usr/share/backgrounds/dynamic-background/default/* /workspace/.ubuntu/dynamic-background/active
fi
# Check when DBUS is active and start configuring.
until [[ $SUCCESS == "TRUE" ]]; do
SUCCESS="FALSE"
if TEST=$(netstat -xeW | grep dbus 2>&1); then
sleep 5
SUCCESS="TRUE"
DBUS_ADDRESS=$(netstat -xeW | grep dbus | head -n 1 | awk '{print $(NF)}' | sed "s/@//g")
echo "DBUS Session Address: $DBUS_ADDRESS"
echo "$DBUS_ADDRESS" > /var/log/dbus.txt
export DBUS_SESSION_BUS_ADDRESS="unix:abstract=$DBUS_ADDRESS"
export DISPLAY=:1.0
# Hide Lower Panel, Temp Removal
su $USER -c "xfconf-query -c xfce4-panel -p /panels -t int -s 1 -a 2>&1>/workspace/log"
# Set branding
if [ -n "$MENU_NAME" ]; then
su $USER -c "xfconf-query -c xfce4-panel -p /plugins/plugin-1/button-title -n -t string -s '$MENU_NAME'"
fi
if [ -n "$MENU_ICON" ]; then
su $USER -c "xfconf-query -c xfce4-panel -p /plugins/plugin-1/button-icon -n -t string -s '$MENU_ICON'"
fi
# Add option to hide menu icons
# Remove plugins
su $USER -c "
# Copy Existing Array
ARRAY=();
for ID in \$(xfconf-query -c xfce4-panel -p /panels/panel-1/plugin-ids | tail -n +3); do ARRAY+=( \$ID ); done;
# For loops to remove item from array
for PLUGIN_NAME in actions pager; do
PLUGIN=\$(xfconf-query -c xfce4-panel -p /plugins -lv | grep \$PLUGIN_NAME | awk '{print \$1}')
DELETE=\$(echo \$PLUGIN | sed 's/.*plugin-//g')
ARRAY=( \${ARRAY[@]/\$DELETE} )
done;
# Update Panel Plugin Array
UPDATE_PANEL_PLUGINS='xfconf-query -c xfce4-panel -p /panels/panel-1/plugin-ids'
for INT in \${ARRAY[@]}; do
UPDATE_PANEL_PLUGINS+=\" -t int -s \$INT\"
done
\$UPDATE_PANEL_PLUGINS
"
# Reload Panel
su $USER -c "xfce4-panel -r"
fi
sleep 1
done &
exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

View file

@ -1,18 +0,0 @@
[*]
wallpaper_mode=stretch
wallpaper_common=0
wallpapers_configured=4
wallpaper0=/usr/local/share/doro-lxde-wallpapers/bg1.jpg
wallpaper1=/usr/local/share/doro-lxde-wallpapers/bg2.jpg
wallpaper2=/usr/local/share/doro-lxde-wallpapers/bg3.jpg
wallpaper3=/usr/local/share/doro-lxde-wallpapers/bg4.jpg
desktop_bg=#000000
desktop_fg=#ffffff
desktop_shadow=#000000
desktop_font=Sans 12
show_wm_menu=0
sort=mtime;ascending;mingle;
show_documents=0
show_trash=0
show_mounts=0

View file

@ -0,0 +1,6 @@
Place your wallpapers here.
- Must be a JPG.
- If there are multiple, they will be rotated hourly.
- Not to exceed 24 backgrounds.
- Images will load alphabetically. If using digits, use 00.jpg, 01.jpg, 02.jpg...
- If there are less than 24 images, they will be distributed across the day.

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,017 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 KiB

View file

@ -0,0 +1,27 @@
OLD_FILE=""
DBUS_FILE="/var/log/dbus.txt"
DIR=$(pwd)
# Wait until dbus is listening and delay 5 seconds for it to fully start.
until [[ $SUCCESS == "TRUE" ]]; do
SUCCESS="FALSE"
if test -f "$DBUS_FILE"; then SUCCESS="TRUE"; DBUS_ADDRESS=$(cat $DBUS_FILE); fi
#sleep 1
echo "DBUS Address: $DBUS_ADDRESS"
export DBUS_SESSION_BUS_ADDRESS="unix:abstract=$DBUS_ADDRESS"
export DISPLAY=:1.0
done
# Loop and check if its time to update the background
while true; do
echo $(date)
FILE_COUNT=$(ls *.jpg | wc -l)
IMAGE_NUMBER=$(bc -l <<< "x=( $(date +%H) / ( 24 / $FILE_COUNT )); scale=0; x/1")
FILE=$(ls -1 *.jpg | sed "${IMAGE_NUMBER}q;d")
if [[ $FILE != $OLD_FILE ]]; then
echo "Setting new background to $FILE"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorscreen/workspace0/last-image -n -t string -s $DIR/$FILE
OLD_FILE=$FILE
fi
sleep 60
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,79 @@
activate_action=bring
borderless_maximize=true
box_move=false
box_resize=false
button_layout=O|SHMC
button_offset=0
button_spacing=0
click_to_focus=true
cycle_apps_only=false
cycle_draw_frame=true
cycle_raise=false
cycle_hidden=true
cycle_minimum=true
cycle_preview=true
cycle_tabwin_mode=0
cycle_workspaces=false
double_click_action=maximize
double_click_distance=5
double_click_time=250
easy_click=Alt
focus_delay=250
focus_hint=true
focus_new=true
frame_border_top=0
frame_opacity=100
full_width_title=true
horiz_scroll_opacity=false
inactive_opacity=100
maximized_offset=0
mousewheel_rollup=true
move_opacity=100
placement_mode=center
placement_ratio=20
popup_opacity=100
prevent_focus_stealing=false
raise_delay=250
raise_on_click=true
raise_on_focus=false
raise_with_any_button=true
repeat_urgent_blink=false
resize_opacity=100
restore_on_move=true
scroll_workspaces=true
shadow_delta_height=0
shadow_delta_width=0
shadow_delta_x=0
shadow_delta_y=-3
shadow_opacity=50
show_app_icon=false
show_dock_shadow=true
show_frame_shadow=true
show_popup_shadow=false
snap_resist=false
snap_to_border=true
snap_to_windows=false
snap_width=10
sync_to_vblank=false
theme=Default
tile_on_move=true
title_alignment=center
title_font=Sans Bold 9
title_horizontal_offset=0
titleless_maximize=false
title_shadow_active=false
title_shadow_inactive=false
title_vertical_offset_active=0
title_vertical_offset_inactive=0
toggle_workspaces=false
unredirect_overlays=true
urgent_blink=false
use_compositing=true
vblank_mode=auto
workspace_count=1
wrap_cycle=true
wrap_layout=true
wrap_resistance=10
wrap_windows=true
wrap_workspaces=false
zoom_desktop=true