Skip to content

Commit f88928c

Browse files
committed
Change user name. Add oh-my-zsh module
1 parent 279e33a commit f88928c

File tree

13 files changed

+55
-32
lines changed

13 files changed

+55
-32
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Each module has three kind of files:
7878
- `docker-compose`
7979
- `firefox`
8080
- `chrome`
81+
- `oh-my-zsh`
8182

8283
## Example workspaces in `workspaces.csv`
8384

@@ -112,7 +113,7 @@ This will generate two directories:
112113
In your browser and go to: `http://localhost:6901/vnc.html` and log in to noVNC.
113114
You can also configure a VNC client and connect to `localhost:5901`
114115

115-
> Note, all the data generated at `/home/userdocker/shared-home` in the container will be preserved in your workspace directory at `shared-home` to persist your data. If you want to add more volumes you will need to modify the `run_workspace.sh` script of your workspace.
116+
> Note, all the data generated at `/home/desktopus/shared-home` in the container will be preserved in your workspace directory at `shared-home` to persist your data. If you want to add more volumes you will need to modify the `run_workspace.sh` script of your workspace.
116117
117118
## Run with audio(pulseaudio) (Only Linux distributions):
118119

src/ubuntu/base/20.04-xfce/Dockerfile

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:20.04
33
# Installation for docker in docker
44
ARG NOVNC_VERSION=1.3.0
55

6-
ENV HOME=/home/userdocker \
6+
ENV HOME=/home/desktopus \
77
TERM=xterm-256color \
88
DEBIAN_FRONTEND=noninteractive \
99
VNC_COL_DEPTH=24 \
@@ -17,20 +17,21 @@ ENV HOME=/home/userdocker \
1717

1818
# Base installation
1919
COPY base_installation.sh /opt/base-installation-scripts/
20-
ADD modules-installation /opt/modules-installation/
2120
ADD supervisor-scripts /opt/supervisor-scripts/
2221

2322
# XFCE configuration files
2423
ADD ./config-files/ $HOME/
2524

2625
RUN chmod -R +x /opt/supervisor-scripts/ \
27-
&& chmod -R +x /opt/base-installation-scripts/ \
28-
&& chmod -R +x /opt/modules-installation/
26+
&& chmod -R +x /opt/base-installation-scripts/
2927

30-
# Add userdocker user
31-
RUN useradd -m userdocker -s /bin/bash && adduser userdocker sudo
28+
# Add desktopus user
29+
RUN useradd -m desktopus -s /bin/bash && adduser desktopus sudo
3230

3331
RUN cd /opt/base-installation-scripts/ && ./base_installation.sh
32+
ADD modules-installation /opt/modules-installation/
33+
RUN chmod -R +x /opt/modules-installation/
34+
3435
RUN cd /opt/modules-installation/ && \
3536
count=`ls -1 *.sh 2>/dev/null | wc -l` && \
3637
if [ "${count}" != 0 ]; then \
@@ -42,5 +43,6 @@ COPY supervisor/ /etc/supervisor/conf.d/
4243
COPY startup.sh /usr/local/bin/
4344
COPY logger.sh /opt/bash-utils/logger.sh
4445
RUN chmod +x /usr/local/bin/startup.sh
46+
RUN chown desktopus:desktopus /home/desktopus
4547

4648
ENTRYPOINT ["startup.sh"]

src/ubuntu/base/20.04-xfce/base_installation.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ unzip noVNC.zip
5959
rm noVNC.zip
6060
mv novnc-noVNC-* serve
6161
popd
62-
chown -R userdocker:userdocker /opt/noVNC
62+
chown -R desktopus:desktopus /opt/noVNC
6363
# Install websockify
6464
echo "noVNC step 2: Install websockify"
6565
pushd /opt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[global_config]
2+
[keybindings]
3+
[profiles]
4+
[[default]]
5+
cursor_color = "#aaaaaa"
6+
use_system_font = False
7+
[layouts]
8+
[[default]]
9+
[[[window0]]]
10+
type = Window
11+
parent = ""
12+
[[[child1]]]
13+
type = Terminal
14+
parent = window0
15+
[plugins]

src/ubuntu/base/20.04-xfce/config-files/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,47 @@
77
<property name="workspace0" type="empty">
88
<property name="color-style" type="int" value="0"/>
99
<property name="image-style" type="int" value="4"/>
10-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
10+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
1111
</property>
1212
<property name="workspace1" type="empty">
1313
<property name="color-style" type="int" value="0"/>
1414
<property name="image-style" type="int" value="4"/>
15-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
15+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
1616
</property>
1717
<property name="workspace2" type="empty">
1818
<property name="color-style" type="int" value="0"/>
1919
<property name="image-style" type="int" value="4"/>
20-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
20+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
2121
</property>
2222
<property name="workspace3" type="empty">
2323
<property name="color-style" type="int" value="0"/>
2424
<property name="image-style" type="int" value="4"/>
25-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
25+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
2626
</property>
27-
<property name="image-path" type="string" value="/home/userdocker/.config/ubuntu.png"/>
27+
<property name="image-path" type="string" value="/home/desktopus/.config/ubuntu.png"/>
2828
<property name="image-show" type="bool" value="true"/>
2929
<property name="image-style" type="int" value="0"/>
3030
</property>
3131
<property name="monitorVNC-0" type="empty">
3232
<property name="workspace0" type="empty">
3333
<property name="color-style" type="int" value="0"/>
3434
<property name="image-style" type="int" value="3"/>
35-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
35+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
3636
</property>
3737
<property name="workspace1" type="empty">
3838
<property name="color-style" type="int" value="0"/>
3939
<property name="image-style" type="int" value="3"/>
40-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
40+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
4141
</property>
4242
<property name="workspace2" type="empty">
4343
<property name="color-style" type="int" value="0"/>
4444
<property name="image-style" type="int" value="3"/>
45-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
45+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
4646
</property>
4747
<property name="workspace3" type="empty">
4848
<property name="color-style" type="int" value="0"/>
4949
<property name="image-style" type="int" value="3"/>
50-
<property name="last-image" type="string" value="/home/userdocker/.config/ubuntu.png"/>
50+
<property name="last-image" type="string" value="/home/desktopus/.config/ubuntu.png"/>
5151
</property>
5252
</property>
5353
</property>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
docker build --pull --no-cache --rm=true . -t __workspace_name__:latest
2+
docker build --pull --no-cache . -t __workspace_name__:latest
33
docker tag __workspace_name__:latest __workspace_name__:__distro_and_version__

src/ubuntu/base/20.04-xfce/run_workspace.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function run_basic() {
3535
--env USER_PASSWORD="${USER_PASSWORD:-userpassword}" \
3636
--env VNC_PW="${VNC_PW:-vncpassword}" \
3737
--env TZ="${TIMEZONE}" \
38-
--volume "$(pwd)"/shared-home:/home/userdocker/shared-home \
38+
--volume "$(pwd)"/shared-home:/home/desktopus/shared-home \
3939
__workspace_name__
4040
}
4141

@@ -59,7 +59,7 @@ function run_audio() {
5959
--env TZ="${TIMEZONE}" \
6060
--volume /tmp/pulseaudio.socket:/tmp/pulseaudio.socket \
6161
--volume /tmp/pulseaudio.client.conf:/etc/pulse/client.conf \
62-
--volume "$(pwd)"/shared-home:/home/userdocker/shared-home \
62+
--volume "$(pwd)"/shared-home:/home/desktopus/shared-home \
6363
__workspace_name__
6464
}
6565

src/ubuntu/base/20.04-xfce/startup.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
source /opt/bash-utils/logger.sh
33

4-
# Change password of userdocker
5-
echo "userdocker:${USER_PASSWORD}" | chpasswd
4+
# Change password of desktopus
5+
echo "desktopus:${USER_PASSWORD}" | chpasswd
66

77
INFO "Configuring VNC Password"
88

@@ -18,14 +18,14 @@ echo "$VNC_PW" | vncpasswd -f >> $PASSWD_PATH
1818
chmod 600 $PASSWD_PATH
1919

2020
INFO "Giving permissions for non root user"
21-
chown -R userdocker /home/userdocker
21+
chown -R desktopus /home/desktopus
2222

23-
INFO "Adding userdocker to audio group"
24-
usermod -a -G audio userdocker
23+
INFO "Adding desktopus to audio group"
24+
usermod -a -G audio desktopus
2525

26-
INFO "Adding userdocker to video and render group for hw acceleration"
27-
usermod -a -G video userdocker
26+
INFO "Adding desktopus to video and render group for hw acceleration"
27+
usermod -a -G video desktopus
2828
groupadd render
29-
usermod -a -G render userdocker
29+
usermod -a -G render desktopus
3030

3131
/usr/bin/supervisord -n

src/ubuntu/base/20.04-xfce/supervisor/novnc.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[program:novnc]
22
directory=/opt/noVNC/serve
33
command=/opt/noVNC/serve/utils/novnc_proxy --vnc localhost:%(ENV_VNC_PORT)s --listen %(ENV_NO_VNC_PORT)s
4-
user=userdocker
4+
user=desktopus
55
autostart=true
66
stderr_logfile=/var/log/novnc.err.log
77
stdout_logfile=/var/log/novnc.out.log

src/ubuntu/base/20.04-xfce/supervisor/vncserver.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[program:vncserver]
44
command=/opt/supervisor-scripts/launch_vnc.sh
5-
user=userdocker
5+
user=desktopus
66
autostart=true
77
stderr_logfile=/var/log/vncserver.err.log
88
stdout_logfile=/var/log/vncserver.out.log

src/ubuntu/modules/docker/installation.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ rm docker.tgz
3434
dockerd --version
3535
docker --version
3636

37-
echo "Creating docker group and adding userdocker to the group"
37+
echo "Creating docker group and adding desktopus to the group"
3838

3939
groupadd docker
40-
usermod -aG docker userdocker
40+
usermod -aG docker desktopus
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
apt-get install -y zsh
3+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
4+
usermod --shell /bin/zsh desktopus

workspaces.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Name;Base;Modules
22
ubuntu-20.04-xfce-firefox-chrome-docker;ubuntu:20.04-xfce;docker:20.10.12,docker-compose:1.29.2,firefox,google-chrome
33
ubuntu-20.04-xfce-docker;ubuntu:20.04-xfce;docker:20.10.12
44
ubuntu-20.04-xfce;ubuntu:20.04-xfce;
5+
ubuntu-20.04-xfce-omzsh;ubuntu:20.04-xfce;oh-my-zsh

0 commit comments

Comments
 (0)