From 4213882f0477c6a5b0bd09503c606ffcc79cbf15 Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 14:30:48 +0700 Subject: [PATCH 1/6] Add screen background --- docker/Emulator_x86 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/Emulator_x86 b/docker/Emulator_x86 index 74250f0..1ee9b07 100644 --- a/docker/Emulator_x86 +++ b/docker/Emulator_x86 @@ -36,6 +36,8 @@ RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \ # We use package from ubuntu 18.10 to fix crashing issue # openbox # Windows manager +# feh +# ScreenBackground # menu # Debian menu # python-numpy @@ -67,6 +69,7 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \ socat \ x11vnc \ openbox \ + feh \ menu \ python-numpy \ net-tools \ @@ -162,8 +165,12 @@ ENV DISPLAY=:0 \ # openbox configuration # Update the openbox configuration files to: # + Use a single virtual desktop to prevent accidentally switching +# + Add background #================================================ -RUN sed -i "s/4<\/number>/1<\/number>/g" /etc/xdg/openbox/rc.xml +ADD images/logo_dockerandroid_small.png /root/ +RUN sed -i "s/4<\/number>/1<\/number>/g" /etc/xdg/openbox/rc.xml \ + && feh --bg-max logo_dockerandroid_small.png \ + && echo 'eval `cat $HOME/.fehbg` &' >> /etc/xdg/openbox/autostart #=============== # Expose Ports From 2ba73f87e057214d59d8a77b360cbffd8c19294f Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 15:59:18 +0700 Subject: [PATCH 2/6] Organize config files --- docker/Emulator_x86 | 8 ++++---- docker/configs/.fehbg | 2 ++ docker/{ => configs}/sources1810.list | 0 docker/{ => configs}/x11vnc.pref | 0 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 docker/configs/.fehbg rename docker/{ => configs}/sources1810.list (100%) rename docker/{ => configs}/x11vnc.pref (100%) diff --git a/docker/Emulator_x86 b/docker/Emulator_x86 index 1ee9b07..9abdd7f 100644 --- a/docker/Emulator_x86 +++ b/docker/Emulator_x86 @@ -61,8 +61,8 @@ RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \ # ubuntu-vm-builder # bridge-utils #================== -ADD docker/sources1810.list /etc/apt/sources.list.d/ -ADD docker/x11vnc.pref /etc/apt/preferences.d/ +ADD docker/configs/sources1810.list /etc/apt/sources.list.d/ +ADD docker/configs/x11vnc.pref /etc/apt/preferences.d/ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \ xterm \ supervisor \ @@ -167,9 +167,9 @@ ENV DISPLAY=:0 \ # + Use a single virtual desktop to prevent accidentally switching # + Add background #================================================ -ADD images/logo_dockerandroid_small.png /root/ +ADD images/logo_dockerandroid_small.png /root/logo.png +ADD docker/configs/.fehbg RUN sed -i "s/4<\/number>/1<\/number>/g" /etc/xdg/openbox/rc.xml \ - && feh --bg-max logo_dockerandroid_small.png \ && echo 'eval `cat $HOME/.fehbg` &' >> /etc/xdg/openbox/autostart #=============== diff --git a/docker/configs/.fehbg b/docker/configs/.fehbg new file mode 100755 index 0000000..459fefe --- /dev/null +++ b/docker/configs/.fehbg @@ -0,0 +1,2 @@ +#!/bin/sh +feh --bg-max '/root/logo.png' diff --git a/docker/sources1810.list b/docker/configs/sources1810.list similarity index 100% rename from docker/sources1810.list rename to docker/configs/sources1810.list diff --git a/docker/x11vnc.pref b/docker/configs/x11vnc.pref similarity index 100% rename from docker/x11vnc.pref rename to docker/configs/x11vnc.pref From 5c3cc8ed4d6342842204031295d1887dd356e3ef Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 16:14:27 +0700 Subject: [PATCH 3/6] Add screen background --- docker/Emulator_x86 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Emulator_x86 b/docker/Emulator_x86 index 9abdd7f..4ea350a 100644 --- a/docker/Emulator_x86 +++ b/docker/Emulator_x86 @@ -168,7 +168,7 @@ ENV DISPLAY=:0 \ # + Add background #================================================ ADD images/logo_dockerandroid_small.png /root/logo.png -ADD docker/configs/.fehbg +ADD docker/configs/.fehbg /root/.fehbg RUN sed -i "s/4<\/number>/1<\/number>/g" /etc/xdg/openbox/rc.xml \ && echo 'eval `cat $HOME/.fehbg` &' >> /etc/xdg/openbox/autostart From d1559b674853ef55e0b2151f4354861bc2f18fc4 Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 18:20:46 +0700 Subject: [PATCH 4/6] Set screen background on startup --- docker/Emulator_x86 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Emulator_x86 b/docker/Emulator_x86 index 4ea350a..982c772 100644 --- a/docker/Emulator_x86 +++ b/docker/Emulator_x86 @@ -38,6 +38,8 @@ RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \ # Windows manager # feh # ScreenBackground +# python-xdg +# Required by openbox autostart function # menu # Debian menu # python-numpy @@ -70,6 +72,7 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \ x11vnc \ openbox \ feh \ + python-xdg \ menu \ python-numpy \ net-tools \ @@ -170,7 +173,7 @@ ENV DISPLAY=:0 \ ADD images/logo_dockerandroid_small.png /root/logo.png ADD docker/configs/.fehbg /root/.fehbg RUN sed -i "s/4<\/number>/1<\/number>/g" /etc/xdg/openbox/rc.xml \ - && echo 'eval `cat $HOME/.fehbg` &' >> /etc/xdg/openbox/autostart + && echo /root/.fehbg >> /etc/xdg/openbox/autostart #=============== # Expose Ports From 81f110adea55fc58867026700e1fa026181f0ede Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 18:30:46 +0700 Subject: [PATCH 5/6] Set screen background on startup --- docker/configs/.fehbg | 2 -- 1 file changed, 2 deletions(-) delete mode 100755 docker/configs/.fehbg diff --git a/docker/configs/.fehbg b/docker/configs/.fehbg deleted file mode 100755 index 459fefe..0000000 --- a/docker/configs/.fehbg +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -feh --bg-max '/root/logo.png' From 69654cd036ac526a2fdc247258e64339717b2961 Mon Sep 17 00:00:00 2001 From: Trinh Pham Date: Wed, 10 Jul 2019 18:30:59 +0700 Subject: [PATCH 6/6] Set screen background on startup --- src/.fehbg | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 src/.fehbg diff --git a/src/.fehbg b/src/.fehbg new file mode 100755 index 0000000..459fefe --- /dev/null +++ b/src/.fehbg @@ -0,0 +1,2 @@ +#!/bin/sh +feh --bg-max '/root/logo.png'