diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 99f8843..afd58ed 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -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 / \ No newline at end of file diff --git a/rootfs/etc/skel/.config/terminal/accels.scm b/rootfs/etc/skel/.config/terminal/accels.scm new file mode 100644 index 0000000..673bbea --- /dev/null +++ b/rootfs/etc/skel/.config/terminal/accels.scm @@ -0,0 +1,58 @@ +; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +(gtk_accel_path "/terminal-window/goto-tab-2" "2") +(gtk_accel_path "/terminal-window/goto-tab-6" "6") +; (gtk_accel_path "/terminal-window/copy-input" "") +; (gtk_accel_path "/terminal-window/close-other-tabs" "") +; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") +(gtk_accel_path "/terminal-window/goto-tab-7" "7") +; (gtk_accel_path "/terminal-window/set-title-color" "") +; (gtk_accel_path "/terminal-window/edit-menu" "") +; (gtk_accel_path "/terminal-window/zoom-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-1" "1") +; (gtk_accel_path "/terminal-window/fullscreen" "F11") +; (gtk_accel_path "/terminal-window/read-only" "") +(gtk_accel_path "/terminal-window/goto-tab-5" "5") +; (gtk_accel_path "/terminal-window/preferences" "") +; (gtk_accel_path "/terminal-window/reset-and-clear" "") +; (gtk_accel_path "/terminal-window/about" "") +(gtk_accel_path "/terminal-window/goto-tab-4" "4") +; (gtk_accel_path "/terminal-window/close-window" "q") +; (gtk_accel_path "/terminal-window/reset" "") +; (gtk_accel_path "/terminal-window/save-contents" "") +(gtk_accel_path "/terminal-window/toggle-menubar" "F10") +; (gtk_accel_path "/terminal-window/copy" "c") +; (gtk_accel_path "/terminal-window/copy-html" "") +; (gtk_accel_path "/terminal-window/last-active-tab" "") +; (gtk_accel_path "/terminal-window/show-borders" "") +; (gtk_accel_path "/terminal-window/view-menu" "") +; (gtk_accel_path "/terminal-window/detach-tab" "d") +; (gtk_accel_path "/terminal-window/scroll-on-output" "") +; (gtk_accel_path "/terminal-window/show-toolbar" "") +; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") +; (gtk_accel_path "/terminal-window/tabs-menu" "") +; (gtk_accel_path "/terminal-window/search-next" "") +; (gtk_accel_path "/terminal-window/search-prev" "") +; (gtk_accel_path "/terminal-window/undo-close-tab" "") +; (gtk_accel_path "/terminal-window/set-title" "s") +; (gtk_accel_path "/terminal-window/contents" "F1") +; (gtk_accel_path "/terminal-window/zoom-reset" "0") +; (gtk_accel_path "/terminal-window/close-tab" "w") +; (gtk_accel_path "/terminal-window/new-tab" "t") +; (gtk_accel_path "/terminal-window/new-window" "n") +; (gtk_accel_path "/terminal-window/terminal-menu" "") +; (gtk_accel_path "/terminal-window/show-menubar" "") +; (gtk_accel_path "/terminal-window/select-all" "a") +; (gtk_accel_path "/terminal-window/paste" "v") +(gtk_accel_path "/terminal-window/goto-tab-9" "9") +; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") +; (gtk_accel_path "/terminal-window/search" "f") +; (gtk_accel_path "/terminal-window/file-menu" "") +; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") +; (gtk_accel_path "/terminal-window/paste-selection" "") +; (gtk_accel_path "/terminal-window/zoom-in" "plus") +; (gtk_accel_path "/terminal-window/zoom-out" "minus") +(gtk_accel_path "/terminal-window/goto-tab-8" "8") +; (gtk_accel_path "/terminal-window/help-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-3" "3") diff --git a/rootfs/etc/skel/.config/terminal/terminalrc b/rootfs/etc/skel/.config/terminal/terminalrc new file mode 100644 index 0000000..9985483 --- /dev/null +++ b/rootfs/etc/skel/.config/terminal/terminalrc @@ -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 + diff --git a/rootfs/etc/supervisor/conf.d/supervisord.conf b/rootfs/etc/supervisor/conf.d/supervisord.conf index 6a6dddb..970d49d 100644 --- a/rootfs/etc/supervisor/conf.d/supervisord.conf +++ b/rootfs/etc/supervisor/conf.d/supervisord.conf @@ -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 \ No newline at end of file diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 56ae258..6148b90 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -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 + + diff --git a/rootfs/usr/local/share/doro-lxde-wallpapers/bg1.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg1.jpg deleted file mode 100644 index 170e1b2..0000000 Binary files a/rootfs/usr/local/share/doro-lxde-wallpapers/bg1.jpg and /dev/null differ diff --git a/rootfs/usr/local/share/doro-lxde-wallpapers/bg2.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg2.jpg deleted file mode 100644 index 1c38c13..0000000 Binary files a/rootfs/usr/local/share/doro-lxde-wallpapers/bg2.jpg and /dev/null differ diff --git a/rootfs/usr/local/share/doro-lxde-wallpapers/bg3.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg3.jpg deleted file mode 100644 index 41f8280..0000000 Binary files a/rootfs/usr/local/share/doro-lxde-wallpapers/bg3.jpg and /dev/null differ diff --git a/rootfs/usr/local/share/doro-lxde-wallpapers/bg4.jpg b/rootfs/usr/local/share/doro-lxde-wallpapers/bg4.jpg deleted file mode 100644 index 2230f60..0000000 Binary files a/rootfs/usr/local/share/doro-lxde-wallpapers/bg4.jpg and /dev/null differ diff --git a/rootfs/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf b/rootfs/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf deleted file mode 100644 index 892fff2..0000000 --- a/rootfs/usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf +++ /dev/null @@ -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 - diff --git a/rootfs/usr/share/backgrounds/dynamic-background/active/README.TXT b/rootfs/usr/share/backgrounds/dynamic-background/active/README.TXT new file mode 100644 index 0000000..5b9439d --- /dev/null +++ b/rootfs/usr/share/backgrounds/dynamic-background/active/README.TXT @@ -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. \ No newline at end of file diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/00.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/00.jpg new file mode 100644 index 0000000..7cc1745 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/00.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/01.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/01.jpg new file mode 100644 index 0000000..5826e06 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/01.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/02.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/02.jpg new file mode 100644 index 0000000..7f207d4 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/02.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/03.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/03.jpg new file mode 100644 index 0000000..b07c13a Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/03.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/04.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/04.jpg new file mode 100644 index 0000000..cd80283 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/04.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/05.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/05.jpg new file mode 100644 index 0000000..284301b Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/05.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/06.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/06.jpg new file mode 100644 index 0000000..6ee288d Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/06.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/07.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/07.jpg new file mode 100644 index 0000000..a7af46b Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/07.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/08.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/08.jpg new file mode 100644 index 0000000..21a3fda Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/08.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/09.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/09.jpg new file mode 100644 index 0000000..d3fb477 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/09.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/10.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/10.jpg new file mode 100644 index 0000000..fd7af83 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/10.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/11.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/11.jpg new file mode 100644 index 0000000..f9e3647 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/11.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic-background/default/12.jpg b/rootfs/usr/share/backgrounds/dynamic-background/default/12.jpg new file mode 100644 index 0000000..7cc1745 Binary files /dev/null and b/rootfs/usr/share/backgrounds/dynamic-background/default/12.jpg differ diff --git a/rootfs/usr/share/backgrounds/dynamic.sh b/rootfs/usr/share/backgrounds/dynamic.sh new file mode 100644 index 0000000..696d26a --- /dev/null +++ b/rootfs/usr/share/backgrounds/dynamic.sh @@ -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 \ No newline at end of file diff --git a/rootfs/usr/share/icons/menu_icon.png b/rootfs/usr/share/icons/menu_icon.png new file mode 100644 index 0000000..21f6223 Binary files /dev/null and b/rootfs/usr/share/icons/menu_icon.png differ diff --git a/rootfs/usr/share/xfwm4/defaults b/rootfs/usr/share/xfwm4/defaults new file mode 100644 index 0000000..793adc9 --- /dev/null +++ b/rootfs/usr/share/xfwm4/defaults @@ -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