Compare commits
2 Commits
7855b30b9e
...
3126f53e48
Author | SHA1 | Date | |
---|---|---|---|
3126f53e48 | |||
56ef71c741 |
Binary file not shown.
Before Width: | Height: | Size: 562 KiB After Width: | Height: | Size: 131 B |
28
README.md
28
README.md
@ -91,7 +91,7 @@ The default username is `designer` and the password is `password`.
|
||||
|
||||
### 3. Configure Volare
|
||||
|
||||
List the available PDKs and choose one to install.
|
||||
Choose a PDK variant from the following list to install.
|
||||
|
||||
| PDK Technology | PDK Variant |
|
||||
|----------------|-------------|
|
||||
@ -101,10 +101,16 @@ List the available PDKs and choose one to install.
|
||||
| | gf180mcuB |
|
||||
| | gf180mcuC |
|
||||
|
||||
Replace `<pdk_variant>` and `<pdk_tech>` correspondingly by one of the PDKs listed above.
|
||||
|
||||
To automatically download and configure the latest version of the PDK to this date, run `volare_set_latest` replacing `<pdk_variant>` for a PDK variant from the list.
|
||||
```sh
|
||||
export PDK=<pdk_variant>
|
||||
echo 'export PDK=${PDK}' >> ~/.bashrc
|
||||
volare_set_latest <pdk_variant>
|
||||
```
|
||||
|
||||
To manually set any version of the PDK, set the `PDK` environment variable, list the available PDKs and choose one to install replacing `<pdk_variant>` and `<pdk_tech>` correspondingly by one of the PDKs listed above.
|
||||
```sh
|
||||
echo 'export PDK=<pdk_variant>' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
volare ls-remote --pdk <pdk_tech>
|
||||
volare enable --pdk <pdk_tech> <version_id>
|
||||
```
|
||||
@ -121,6 +127,20 @@ or you can also install packages from the [AUR](https://aur.archlinux.org/) usin
|
||||
|
||||
```paru <package_name>```
|
||||
|
||||
## Updating the image
|
||||
|
||||
To update to the latest image version, first make sure you have all your important data linked by a volume or backed up in an external storage, **all your files outside any linked volume will be lost**.
|
||||
|
||||
After you backed your data, stop the container, delete it, pull the latest image and finally start the container again as the first step of the usage section.
|
||||
```
|
||||
docker stop <container_name>
|
||||
docker rm <container_name>
|
||||
docker pull <image>
|
||||
docker run -d --security-opt seccomp=unconfined -p 8444:8444 -v <path_to_volume>:/home/designer/shared --name <container_name> <image-web>
|
||||
```
|
||||
|
||||
> Container names can be seen with `docker ps -a`
|
||||
|
||||
## Custom Images
|
||||
|
||||
For creating an image with your own pre-installed set of packages for your team you can create your own docker image extending the stacks, just as the stacks extend the base image. For reference check the stacks dockerfiles in the `stack` folder.
|
||||
|
@ -6,7 +6,21 @@ FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop
|
||||
RUN pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts gvim ngspice gedit jupyter-notebook xterm
|
||||
RUN aur-install \
|
||||
sudo \
|
||||
git \
|
||||
git-lfs \
|
||||
python \
|
||||
python-pip \
|
||||
python-pipx \
|
||||
xz \
|
||||
gnu-free-fonts \
|
||||
gvim \
|
||||
ngspice \
|
||||
gedit \
|
||||
jupyter-notebook \
|
||||
xterm
|
||||
|
||||
ENV TERM=xterm EDITOR=gedit
|
||||
|
||||
# Clean cache
|
||||
@ -32,7 +46,16 @@ COPY --chown=designer:designer --chmod=755 scripts/* /home/designer/.scripts
|
||||
ENV PATH="/home/designer/.scripts:${PATH}"
|
||||
|
||||
# Add motd
|
||||
RUN echo "/home/designer/.bashrc" >> "custom_motd"
|
||||
RUN echo "custom_motd" >> "/home/designer/.bashrc"
|
||||
|
||||
# Add media includes
|
||||
RUN mkdir -p /home/designer/.media
|
||||
COPY --chown=designer:designer include/media/* /home/designer/.media
|
||||
|
||||
# Setup Docker in Docker (DiD)
|
||||
RUN aur-install docker
|
||||
RUN sudo groupadd docker
|
||||
RUN sudo usermod -aG docker $USER
|
||||
|
||||
# Initialize the enviroment keeping container alive
|
||||
ENTRYPOINT ["start_desktop"]
|
||||
|
@ -27,11 +27,9 @@ RUN sudo usermod -aG root designer
|
||||
# Install XFCE
|
||||
RUN sudo pacman -S --noconfirm xorg xfce4
|
||||
|
||||
# Copy includes
|
||||
RUN mkdir -p /home/designer/.media
|
||||
COPY --chown=designer:designer include/media/* /home/designer/.media
|
||||
# Copy autostart include
|
||||
RUN mkdir -p /home/designer/.config/autostart
|
||||
COPY --chown=designer:designer include/desktopinit.desktop /home/designer/.config/autostart
|
||||
COPY --chown=designer:designer include/desktop_init.desktop /home/designer/.config/autostart
|
||||
|
||||
# Set login user
|
||||
ENV LOGIN_USER designer
|
||||
|
8
include/media/ascii_art.txt
Normal file
8
include/media/ascii_art.txt
Normal file
@ -0,0 +1,8 @@
|
||||
__ __
|
||||
__ /\ \__ /\ \
|
||||
___ ____/\_\ ___ ____\ \ ,_\ __ ___\ \ \/'\ ____
|
||||
/ __`\ /',__\/\ \ /'___\ /',__\\ \ \/ /'__`\ /'___\ \ , < /',__\
|
||||
/\ \L\ \/\__, `\ \ \/\ \__/ /\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \\`\ /\__, `\
|
||||
\ \____/\/\____/\ \_\ \____\ \/\____/ \ \__\ \__/.\_\ \____\\ \_\ \_\/\____/
|
||||
\/___/ \/___/ \/_/\/____/ \/___/ \/__/\/__/\/_/\/____/ \/_/\/_/\/___/
|
||||
|
BIN
include/media/default_wallpaper.png
(Stored with Git LFS)
Normal file
BIN
include/media/default_wallpaper.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 744 KiB |
@ -1,20 +1,16 @@
|
||||
#!/bin/bash
|
||||
cat << EOF
|
||||
__ __
|
||||
__ /\ \__ /\ \
|
||||
___ ____/\_\ ___ ____\ \ ,_\ __ ___\ \ \/'\ ____
|
||||
/ __`\ /',__\/\ \ /'___\ /',__\\ \ \/ /'__`\ /'___\ \ , < /',__\
|
||||
/\ \L\ \/\__, `\ \ \/\ \__/ /\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \\`\ /\__, `\
|
||||
\ \____/\/\____/\ \_\ \____\ \/\____/ \ \__\ \__/.\_\ \____\\ \_\ \_\/\____/
|
||||
\/___/ \/___/ \/_/\/____/ \/___/ \/__/\/__/\/_/\/____/ \/_/\/_/\/___/
|
||||
|
||||
EOF
|
||||
|
||||
if [[ -z "${PDK} "]]
|
||||
cat << EOF
|
||||
cat $HOME/.media/ascii_art.txt
|
||||
|
||||
if [[ ! -z "${PDK_TECH}" ]]; then
|
||||
if [[ ! -z "${PDK_VERSION}" ]]; then
|
||||
volare_set_latest
|
||||
fi
|
||||
else
|
||||
echo "
|
||||
There is not an active PDK, Use:
|
||||
volare_set_latest <pdk_variant>
|
||||
to automatically download and configure the latest version of a PDK.
|
||||
You can also manually configure a PDK using volare and setting the PDK environment variable
|
||||
EOF
|
||||
fi
|
||||
You can also manually configure a PDK using volare and setting the PDK_TECH environment variable
|
||||
"
|
||||
fi
|
||||
|
@ -1,3 +1,18 @@
|
||||
#!/bin/bash
|
||||
setwallpaper /home/designer/.media/defaultwallpaper.png
|
||||
xfce4-terminal
|
||||
set_wallpaper $HOME/.media/default_wallpaper.png
|
||||
xfce4-terminal
|
||||
|
||||
# Add application launcher
|
||||
mkdir -p $HOME/.config/xfce4/panel/launcher-18
|
||||
ln /usr/share/applications/klayoutEditor.desktop $HOME/.config/xfce4/panel/launcher-18
|
||||
xfconf-query -c xfce4-panel -p /plugins/plugin-18 -t string -s "launcher" --create
|
||||
xfconf-query -c xfce4-panel -p /plugins/plugin-18/items -t string -s "klayoutEditor.desktop" -a --create
|
||||
|
||||
# Delete plugin id array
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids -rR
|
||||
|
||||
# Recreate id array with new values
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids -t int -s 18
|
||||
|
||||
# Restart panel
|
||||
xfce4-panel -r
|
@ -1,89 +1,34 @@
|
||||
#!/bin/bash
|
||||
cd /home/designer
|
||||
cd $HOME
|
||||
|
||||
# Run VNC server
|
||||
/usr/sbin/Xvnc $DISPLAY \
|
||||
-httpd '/usr/share/kasmvnc/www' \
|
||||
-DLP_RegionAllowClick '0' \
|
||||
-QueryConnect '0' \
|
||||
-VideoScaling '2' \
|
||||
-DLP_ClipDelay '0' \
|
||||
-DLP_Log 'off' \
|
||||
-KasmPasswordFile '/home/designer/.kasmpasswd' \
|
||||
-MaxVideoResolution '1920x1080' \
|
||||
-ImprovedHextile '1' \
|
||||
-QueryConnectTimeout '10' \
|
||||
-Log '*:stdout:100' \
|
||||
-DynamicQualityMin '7' \
|
||||
-RectThreads '0' \
|
||||
-WebpVideoQuality '-1' \
|
||||
-DLP_ClipTypes 'chromium/x-web-custom-data,text/html,image/png' \
|
||||
-udpFullFrameFrequency '0' \
|
||||
-UseIPv6 '1' \
|
||||
-DLP_RegionAllowRelease '0' \
|
||||
-AcceptCutText '1' \
|
||||
-DLP_ClipAcceptMax '0' \
|
||||
-http-header 'Cross-Origin-Embedder-Policy=require-corp' \
|
||||
-http-header 'Cross-Origin-Opener-Policy=same-origin' \
|
||||
-MaxConnectionTime '0' \
|
||||
-fp '/usr/share/fonts/75dpi,/usr/share/fonts/100dpi' \
|
||||
-TreatLossless '10' \
|
||||
-interface '0.0.0.0' \
|
||||
-SendPrimary '0' \
|
||||
-RawKeyboard '0' \
|
||||
-DynamicQualityMax '8' \
|
||||
-MaxDisconnectionTime '0' \
|
||||
-BlacklistTimeout '10' \
|
||||
-DisconnectClients '0' \
|
||||
-DLP_ClipSendMax '0' \
|
||||
-AcceptKeyEvents '1' \
|
||||
-IgnoreClientSettingsKasm '0' \
|
||||
-AcceptPointerEvents '1' \
|
||||
-websocketPort '8445' \
|
||||
-BlacklistThreshold '5' \
|
||||
-depth '24' \
|
||||
-MaxIdleTime '0' \
|
||||
-cert '/etc/ssl/certs/ssl-cert-snakeoil.pem' \
|
||||
-DLP_KeyRateLimit '0' \
|
||||
-VideoTime '5' \
|
||||
-auth '/home/designer/.Xauthority' \
|
||||
-SendCutText '1' \
|
||||
-VideoOutTime '3' \
|
||||
-UseIPv4 '1' \
|
||||
-sslOnly '0' \
|
||||
-VideoArea '45' \
|
||||
-desktop "$(hostname):$DISPLAY (designer)" \
|
||||
-CompareFB '2' \
|
||||
-PrintVideoArea '0' \
|
||||
-FrameRate '60' \
|
||||
-AcceptSetDesktopSize '1' \
|
||||
-AvoidShiftNumLock '0' \
|
||||
-key '/etc/ssl/private/ssl-cert-snakeoil.key' \
|
||||
-JpegVideoQuality '-1' \
|
||||
-geometry '1024x768' \
|
||||
-IdleTimeout '0' \
|
||||
-AllowOverride 'AcceptPointerEvents,SendCutText,AcceptCutText,SendPrimary' \
|
||||
-rfbauth '/home/designer/.vnc/passwd' \
|
||||
-rfbwait '30000' \
|
||||
-rfbport '5901' \
|
||||
>> "/home/designer/.vnc/$(hostname):$DISPLAY.log" 2>&1
|
||||
echo 'Running VNC Server'
|
||||
mkdir -p $HOME/.vnc
|
||||
touch "$HOME/.Xauthority"
|
||||
touch "$HOME/.vnc/passwd"
|
||||
|
||||
echo -e "${LOGIN_PASSWORD}\n${LOGIN_PASSWORD}\n" | vncpasswd -u ${LOGIN_USER} -w -r
|
||||
echo -e "$LOGIN_PASSWORD\n$LOGIN_PASSWORD\n" | vncpasswd -u $LOGIN_USER -w -r
|
||||
|
||||
# Wait for VNC server to start
|
||||
sleep 2
|
||||
while ! xset q &>/dev/null;
|
||||
do
|
||||
echo "XServer not responsive, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
kasm_vnc_options="
|
||||
-httpd /usr/share/kasmvnc/www \
|
||||
-SecurityTypes None \
|
||||
-disableBasicAuth \
|
||||
-KasmPasswordFile $HOME/.kasmpasswd \
|
||||
-MaxVideoResolution 1920x1080 \
|
||||
-interface 0.0.0.0 \
|
||||
-websocketPort 8444 \
|
||||
-cert /etc/ssl/certs/ssl-cert-snakeoil.pem \
|
||||
-key /etc/ssl/private/ssl-cert-snakeoil.key \
|
||||
-auth $HOME/.Xauthority \
|
||||
-sslOnly 0 \
|
||||
-desktop osicstacks \
|
||||
-rfbauth $HOME/.vnc/passwd"
|
||||
|
||||
echo "XServer has been found, running desktop environment"
|
||||
vncserver -select-de xfce -fg -xstartup $HOME/.scripts/xstartup $kasm_vnc_options &
|
||||
|
||||
# Run desktop environment (XFCE)
|
||||
xfce4-session --display=$DISPLAY
|
||||
|
||||
volare_set_latest
|
||||
#if ! docker info > /dev/null 2>&1; then
|
||||
sudo dockerd &
|
||||
#fi
|
||||
|
||||
# Keep container alive
|
||||
sleep infinity
|
||||
sleep infinity
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
if [[ -z "$1"]]; then PDK=$1 fi
|
||||
if [[ -z "${PDK}" ]]; then
|
||||
PDK_VERSION=$(volare ls-remote --pdk $PDK | sed -n '1 p')
|
||||
volare enable --pdk $PDK $PDK_VERSION
|
||||
if [[ ! -z "$1" ]]; then PDK_TECH=$1; fi
|
||||
if [[ ! -z "${PDK_TECH}" ]]; then
|
||||
echo "Installing $PDK_TECH ($PDK_VERSION)"
|
||||
PDK_VERSION=$(volare ls-remote --pdk $PDK_TECH | sed -n '1 p')
|
||||
volare enable --pdk $PDK_TECH $PDK_VERSION
|
||||
fi
|
14
scripts/xstartup
Normal file
14
scripts/xstartup
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for VNC server to start
|
||||
sleep 2
|
||||
while ! xdpyinfo -display $DISPLAY &> /dev/null;
|
||||
do
|
||||
echo "XServer not responsive, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "XServer has been found, running desktop environment"
|
||||
|
||||
# Run desktop environment (XFCE)
|
||||
dbus-launch xfce4-session --display=$DISPLAY
|
Loading…
Reference in New Issue
Block a user