mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-21 15:03:14 +01:00
KasmOS
This commit is contained in:
parent
e383e43210
commit
424b740d28
@ -1,2 +1,3 @@
|
|||||||
*
|
*
|
||||||
!src
|
!src
|
||||||
|
!kasm-desktop-kde
|
||||||
|
@ -13,6 +13,8 @@ stages:
|
|||||||
- run
|
- run
|
||||||
- test
|
- test
|
||||||
variables:
|
variables:
|
||||||
|
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
|
||||||
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
KASM_RELEASE: "1.14.0"
|
KASM_RELEASE: "1.14.0"
|
||||||
TEST_INSTALLER: "https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_backend/1e99090dadb026f1e37e34e53334da20061bc21c/kasm_workspaces_feature_tester-1.15-pre-release_1.15.0.1e9909.tar.gz"
|
TEST_INSTALLER: "https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_backend/1e99090dadb026f1e37e34e53334da20061bc21c/kasm_workspaces_feature_tester-1.15-pre-release_1.15.0.1e9909.tar.gz"
|
||||||
SCAN_CONTAINERS: "true"
|
SCAN_CONTAINERS: "true"
|
||||||
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[submodule "kasm-desktop-kde"]
|
||||||
|
path = kasm-desktop-kde
|
||||||
|
branch = develop
|
||||||
|
url = https://github.com/kasmtech/KasmOS-KDE-Desktop
|
@ -14,9 +14,17 @@ PULL_BRANCH=${SANITIZED_BRANCH}
|
|||||||
|
|
||||||
# Determine if this is a private or public build
|
# Determine if this is a private or public build
|
||||||
if [[ "${CI_COMMIT_REF_NAME}" == release/* ]] || [[ "${CI_COMMIT_REF_NAME}" == "develop" ]]; then
|
if [[ "${CI_COMMIT_REF_NAME}" == release/* ]] || [[ "${CI_COMMIT_REF_NAME}" == "develop" ]]; then
|
||||||
ENDPOINT="core-${NAME1}-${NAME2}"
|
if [[ "${NAME1}" == "${NAME2}" ]]; then
|
||||||
|
ENDPOINT="core-${NAME1}"
|
||||||
|
else
|
||||||
|
ENDPOINT="core-${NAME1}-${NAME2}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ENDPOINT="core-${NAME1}-${NAME2}-private"
|
if [[ "${NAME1}" == "${NAME2}" ]]; then
|
||||||
|
ENDPOINT="core-${NAME1}-private"
|
||||||
|
else
|
||||||
|
ENDPOINT="core-${NAME1}-${NAME2}-private"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine if this is a rolling build
|
# Determine if this is a rolling build
|
||||||
|
@ -27,6 +27,20 @@ files: &UNIVERSAL_CHANGE_FILES
|
|||||||
- .gitlab-ci.yml
|
- .gitlab-ci.yml
|
||||||
|
|
||||||
multiImages:
|
multiImages:
|
||||||
|
- name1: kasmos
|
||||||
|
name2: kasmos
|
||||||
|
base: debian:bookworm-slim
|
||||||
|
bg: kasmos.png
|
||||||
|
distro: debian
|
||||||
|
dockerfile: dockerfile-kasm-core-kasmos
|
||||||
|
changeFiles:
|
||||||
|
- dockerfile-kasm-core-kasmos
|
||||||
|
- src/ubuntu/install/package_rules/**
|
||||||
|
- src/ubuntu/nvidia/**
|
||||||
|
- src/ubuntu/sysbox/**
|
||||||
|
- src/ubuntu/virtualgl/**
|
||||||
|
- src/ubuntu/install/kde/**
|
||||||
|
- kasm-desktop-kde/**
|
||||||
- name1: ubuntu
|
- name1: ubuntu
|
||||||
name2: bionic
|
name2: bionic
|
||||||
base: ubuntu:18.04
|
base: ubuntu:18.04
|
||||||
|
@ -13,7 +13,7 @@ ignore {
|
|||||||
# KASM-5262 - False positives in libssl1.1 library that is manually installed on some distros
|
# KASM-5262 - False positives in libssl1.1 library that is manually installed on some distros
|
||||||
ignore {
|
ignore {
|
||||||
input.PkgName == "libssl1.1"
|
input.PkgName == "libssl1.1"
|
||||||
input.InstalledVersion == "1.1.1f-1ubuntu2.20"
|
input.InstalledVersion == "1.1.1f-1ubuntu2.22"
|
||||||
|
|
||||||
# Evaluate CWE-ID
|
# Evaluate CWE-ID
|
||||||
deny_vulnerability_ids := {
|
deny_vulnerability_ids := {
|
||||||
|
233
dockerfile-kasm-core-kasmos
Normal file
233
dockerfile-kasm-core-kasmos
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
#### Build Stage ####
|
||||||
|
ARG BASE_IMAGE="debian:bookworm-slim"
|
||||||
|
FROM $BASE_IMAGE AS base_layer
|
||||||
|
|
||||||
|
### Environment config
|
||||||
|
ARG BG_IMG=bg_kasmos.png
|
||||||
|
ARG DISTRO=debian
|
||||||
|
ARG LANG='en_US.UTF-8'
|
||||||
|
ARG LANGUAGE='en_US:en'
|
||||||
|
ARG LC_ALL='en_US.UTF-8'
|
||||||
|
ARG TZ='Etc/UTC'
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
|
DISTRO=$DISTRO \
|
||||||
|
HOME=/home/kasm-default-profile \
|
||||||
|
INST_SCRIPTS=/dockerstartup/install \
|
||||||
|
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||||
|
LANG=$LANG \
|
||||||
|
LANGUAGE=$LANGUAGE \
|
||||||
|
LC_ALL=$LC_ALL \
|
||||||
|
TZ=$TZ \
|
||||||
|
STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
|
### Home setup
|
||||||
|
WORKDIR $HOME
|
||||||
|
RUN mkdir -p $HOME/Desktop
|
||||||
|
|
||||||
|
### Support NVIDIA gpus for graphics acceleration
|
||||||
|
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
|
||||||
|
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
|
||||||
|
COPY src/ubuntu/install/nvidia/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
|
||||||
|
|
||||||
|
### Setup package rules
|
||||||
|
COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/
|
||||||
|
RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/
|
||||||
|
|
||||||
|
### Install common tools
|
||||||
|
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||||
|
RUN bash $INST_SCRIPTS/tools/install_tools.sh && rm -rf $INST_SCRIPTS/tools/
|
||||||
|
|
||||||
|
### Copy over the maximization script to our startup dir for use by app images.
|
||||||
|
COPY ./src/ubuntu/install/maximize_script $STARTUPDIR/
|
||||||
|
|
||||||
|
### Install custom fonts
|
||||||
|
COPY ./src/ubuntu/install/fonts $INST_SCRIPTS/fonts/
|
||||||
|
RUN bash $INST_SCRIPTS/fonts/install_custom_fonts.sh && rm -rf $INST_SCRIPTS/fonts/
|
||||||
|
|
||||||
|
### Install KDE
|
||||||
|
COPY ./src/ubuntu/install/kde $INST_SCRIPTS/kde/
|
||||||
|
RUN bash $INST_SCRIPTS/kde/install_kde.sh && rm -rf $INST_SCRIPTS/kde/
|
||||||
|
COPY ./src/ubuntu/install/kde/desktop_environment_policy.sh $STARTUPDIR/
|
||||||
|
COPY ./src/ubuntu/install/kde/auto_start.desktop $HOME/.config/autostart/apply_policy.desktop
|
||||||
|
|
||||||
|
### Install kasm_vnc dependencies and binaries
|
||||||
|
COPY ./src/ubuntu/install/kasm_vnc $INST_SCRIPTS/kasm_vnc/
|
||||||
|
RUN bash $INST_SCRIPTS/kasm_vnc/install_kasm_vnc.sh && rm -rf $INST_SCRIPTS/kasm_vnc/
|
||||||
|
COPY ./src/common/install/kasm_vnc/kasmvnc.yaml /etc/kasmvnc/
|
||||||
|
|
||||||
|
### Install Kasm Profile Sync
|
||||||
|
COPY ./src/ubuntu/install/profile_sync $INST_SCRIPTS/profile_sync/
|
||||||
|
RUN bash $INST_SCRIPTS/profile_sync/install_profile_sync.sh
|
||||||
|
|
||||||
|
### Install Kasm Upload Server
|
||||||
|
COPY ./src/ubuntu/install/kasm_upload_server $INST_SCRIPTS/kasm_upload_server/
|
||||||
|
RUN bash $INST_SCRIPTS/kasm_upload_server/install_kasm_upload_server.sh && rm -rf $INST_SCRIPTS/kasm_upload_server/
|
||||||
|
|
||||||
|
### Install Audio
|
||||||
|
COPY ./src/ubuntu/install/audio $INST_SCRIPTS/audio/
|
||||||
|
RUN bash $INST_SCRIPTS/audio/install_audio.sh && rm -rf $INST_SCRIPTS/audio/
|
||||||
|
|
||||||
|
### Install Audio Input
|
||||||
|
COPY ./src/ubuntu/install/audio_input $INST_SCRIPTS/audio_input/
|
||||||
|
RUN bash $INST_SCRIPTS/audio_input/install_audio_input.sh && rm -rf $INST_SCRIPTS/audio_input/
|
||||||
|
|
||||||
|
### Install Gamepad Service
|
||||||
|
COPY ./src/ubuntu/install/gamepad $INST_SCRIPTS/gamepad/
|
||||||
|
RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepad/
|
||||||
|
|
||||||
|
### Install Webcam Service
|
||||||
|
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
|
||||||
|
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
|
||||||
|
|
||||||
|
### Install Printer
|
||||||
|
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
|
||||||
|
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
|
||||||
|
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
|
||||||
|
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
|
||||||
|
|
||||||
|
### Install custom cursors
|
||||||
|
COPY ./src/ubuntu/install/cursors $INST_SCRIPTS/cursors/
|
||||||
|
RUN bash $INST_SCRIPTS/cursors/install_cursors.sh && rm -rf $INST_SCRIPTS/cursors/
|
||||||
|
|
||||||
|
### Install Squid
|
||||||
|
COPY ./src/ubuntu/install/squid/install/ $INST_SCRIPTS/squid_install/
|
||||||
|
RUN bash $INST_SCRIPTS/squid_install/install_squid.sh && rm -rf $INST_SCRIPTS/squid_install/
|
||||||
|
COPY ./src/ubuntu/install/squid/resources/*.conf /etc/squid/
|
||||||
|
COPY ./src/ubuntu/install/squid/resources/start_squid.sh /etc/squid/start_squid.sh
|
||||||
|
COPY ./src/ubuntu/install/squid/resources/SN.png /usr/local/squid/share/icons/SN.png
|
||||||
|
RUN chown proxy:proxy /usr/local/squid/share/icons/SN.png
|
||||||
|
COPY ./src/ubuntu/install/squid/resources/error_message/access_denied.html /usr/local/squid/share/errors/en/ERR_ACCESS_DENIED
|
||||||
|
RUN chown proxy:proxy /usr/local/squid/share/errors/en/ERR_ACCESS_DENIED
|
||||||
|
RUN rm -rf $INST_SCRIPTS/resources/
|
||||||
|
RUN chmod +x /etc/squid/kasm_squid_adapter
|
||||||
|
RUN chmod +x /etc/squid/start_squid.sh && chmod 4755 /etc/squid/start_squid.sh
|
||||||
|
|
||||||
|
### configure startup
|
||||||
|
COPY ./src/common/scripts/kasm_hook_scripts $STARTUPDIR
|
||||||
|
ADD ./src/common/startup_scripts $STARTUPDIR
|
||||||
|
RUN bash $STARTUPDIR/set_user_permission.sh $STARTUPDIR $HOME && \
|
||||||
|
echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
|
### VirtualGL
|
||||||
|
COPY ./src/ubuntu/install/virtualgl $INST_SCRIPTS/virtualgl/
|
||||||
|
RUN bash $INST_SCRIPTS/virtualgl/install_virtualgl.sh && rm -rf $INST_SCRIPTS/virtualgl/
|
||||||
|
|
||||||
|
### Sysbox support
|
||||||
|
COPY ./src/ubuntu/install/sysbox $INST_SCRIPTS/sysbox/
|
||||||
|
RUN bash $INST_SCRIPTS/sysbox/install_systemd.sh && rm -rf $INST_SCRIPTS/sysbox/
|
||||||
|
|
||||||
|
## Apply KDE theme
|
||||||
|
COPY ./kasm-desktop-kde/src /tmp/theme-src
|
||||||
|
RUN /tmp/theme-src/install-theme
|
||||||
|
COPY ./kasm-desktop-kde/kde-config/.config $HOME/.config
|
||||||
|
COPY ./kasm-desktop-kde/kde-config/.local/share/plasma $HOME/.local/share/plasma
|
||||||
|
|
||||||
|
## Base Apps
|
||||||
|
COPY ./src/kasmos/install/baseapps/ $INST_SCRIPTS/baseapps/
|
||||||
|
RUN bash $INST_SCRIPTS/baseapps/install_baseapps.sh \
|
||||||
|
&& cp $INST_SCRIPTS/baseapps/*.desktop /usr/share/applications/ \
|
||||||
|
&& cp $INST_SCRIPTS/baseapps/notify-send /usr/bin/ \
|
||||||
|
&& rm -rf $INST_SCRIPTS/baseapps/
|
||||||
|
|
||||||
|
### Create user and home directory for base images that don't already define it
|
||||||
|
RUN (groupadd -g 1000 kasm-user \
|
||||||
|
&& useradd -M -u 1000 -g 1000 -s /bin/bash kasm-user \
|
||||||
|
&& usermod -a -G kasm-user kasm-user) ; exit 0
|
||||||
|
ENV HOME=/home/kasm-user
|
||||||
|
WORKDIR $HOME
|
||||||
|
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
|
||||||
|
|
||||||
|
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
|
||||||
|
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
|
||||||
|
RUN touch $STARTUPDIR/wm.log \
|
||||||
|
&& touch $STARTUPDIR/window_manager_startup.log \
|
||||||
|
&& touch $STARTUPDIR/vnc_startup.log \
|
||||||
|
&& touch $STARTUPDIR/no_vnc_startup.log \
|
||||||
|
&& chown -R root:root $STARTUPDIR \
|
||||||
|
&& find $STARTUPDIR -type d -exec chmod 755 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -exec chmod 644 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -iname "*.sh" -exec chmod 755 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -iname "*.py" -exec chmod 755 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -iname "*.rb" -exec chmod 755 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -iname "*.pl" -exec chmod 755 {} \; \
|
||||||
|
&& find $STARTUPDIR -type f -iname "*.log" -exec chmod 666 {} \; \
|
||||||
|
&& chmod 755 $STARTUPDIR/upload_server/kasm_upload_server \
|
||||||
|
&& chmod 755 $STARTUPDIR/audio_input/kasm_audio_input_server \
|
||||||
|
&& chmod 755 $STARTUPDIR/gamepad/kasm_gamepad_server \
|
||||||
|
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
|
||||||
|
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \
|
||||||
|
&& chmod 755 $STARTUPDIR/generate_container_user \
|
||||||
|
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
|
||||||
|
&& rm -rf $STARTUPDIR/install \
|
||||||
|
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \
|
||||||
|
&& chown 1000:1000 $STARTUPDIR/kasmrx/Downloads \
|
||||||
|
&& chown -R root:root /usr/local/bin \
|
||||||
|
&& chown 1000:root /var/run/pulse \
|
||||||
|
&& rm -Rf /home/kasm-default-profile/.launchpadlib
|
||||||
|
|
||||||
|
### Cleanup job
|
||||||
|
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||||
|
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh kasmos && rm -rf $INST_SCRIPTS/cleanup/
|
||||||
|
|
||||||
|
#### Runtime Stage ####
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=base_layer / /
|
||||||
|
|
||||||
|
### Labels
|
||||||
|
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||||
|
LABEL "com.kasmweb.image"="true"
|
||||||
|
LABEL "com.kasmweb.gpu_acceleration_egl"="nvidia"
|
||||||
|
|
||||||
|
### Environment config
|
||||||
|
ARG DISTRO=debian
|
||||||
|
ARG LANG='en_US.UTF-8'
|
||||||
|
ARG LANGUAGE='en_US:en'
|
||||||
|
ARG LC_ALL='en_US.UTF-8'
|
||||||
|
ARG START_PULSEAUDIO=1
|
||||||
|
ARG START_DE=kde5
|
||||||
|
ARG TZ='Etc/UTC'
|
||||||
|
ENV AUDIO_PORT=4901 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
DISPLAY=:1 \
|
||||||
|
DISTRO=$DISTRO \
|
||||||
|
GOMP_SPINCOUNT=0 \
|
||||||
|
HOME=/home/kasm-user \
|
||||||
|
INST_SCRIPTS=/dockerstartup/install \
|
||||||
|
KASMVNC_AUTO_RECOVER=true \
|
||||||
|
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||||
|
LANG=$LANG \
|
||||||
|
LANGUAGE=$LANGUAGE \
|
||||||
|
LC_ALL=$LC_ALL \
|
||||||
|
LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64/:/usr/local/lib/ \
|
||||||
|
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 \
|
||||||
|
MAX_FRAME_RATE=24 \
|
||||||
|
NO_VNC_PORT=6901 \
|
||||||
|
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||||
|
OMP_WAIT_POLICY=PASSIVE \
|
||||||
|
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||||
|
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||||
|
SHELL=/bin/bash \
|
||||||
|
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||||
|
STARTUPDIR=/dockerstartup \
|
||||||
|
START_DE=$START_DE \
|
||||||
|
TERM=xterm \
|
||||||
|
VNC_COL_DEPTH=24 \
|
||||||
|
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||||
|
VNC_PORT=5901 \
|
||||||
|
VNC_PORT=5901 \
|
||||||
|
VNC_PW=vncpassword \
|
||||||
|
VNC_RESOLUTION=1280x1024 \
|
||||||
|
VNC_RESOLUTION=1280x720 \
|
||||||
|
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||||
|
TZ=$TZ
|
||||||
|
|
||||||
|
### Ports and user
|
||||||
|
EXPOSE $VNC_PORT \
|
||||||
|
$NO_VNC_PORT \
|
||||||
|
$UPLOAD_PORT \
|
||||||
|
$AUDIO_PORT
|
||||||
|
WORKDIR $HOME
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||||
|
CMD ["--wait"]
|
7
docs/core-kasmos/README.md
Normal file
7
docs/core-kasmos/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# About This Image
|
||||||
|
|
||||||
|
This image contains a browser-accessible version of KasmOS.
|
||||||
|
|
||||||
|
![Screenshot][Image_Screenshot]
|
||||||
|
|
||||||
|
[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/core-kasmos.png "Image Screenshot"
|
9
docs/core-kasmos/demo.txt
Normal file
9
docs/core-kasmos/demo.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Live Demo
|
||||||
|
|
||||||
|
**Launch a real-time demo in a new browser window:** <a href="https://app.kasmweb.com/#/cast/kasmos" target="_blank">Live Demo</a>.
|
||||||
|
|
||||||
|
<a href="https://app.kasmweb.com/#/cast/kasmos" target="_blank"><img src="https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/Kasm_Cube_Square.png" width="300" height="104"></a>
|
||||||
|
|
||||||
|
∗*This demo links to a KasmOS Desktop image to show the basic functionality of Kasm Workspaces.*
|
||||||
|
|
||||||
|
∗*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.*
|
1
docs/core-kasmos/description.txt
Normal file
1
docs/core-kasmos/description.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
KasmOS base image for Kasm Workspaces
|
1
kasm-desktop-kde
Submodule
1
kasm-desktop-kde
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 44b1b9a5c00f111575e93c64f8674cc33c4eb805
|
@ -29,6 +29,9 @@ if [ "${LC_ALL}" != "en_US.UTF-8" ]; then
|
|||||||
export LANGUAGE=${LC_ALL}
|
export LANGUAGE=${LC_ALL}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Dbus
|
||||||
|
export $(dbus-launch)
|
||||||
|
|
||||||
# dict to store processes
|
# dict to store processes
|
||||||
declare -A KASM_PROCS
|
declare -A KASM_PROCS
|
||||||
|
|
||||||
@ -190,24 +193,39 @@ function start_kasmvnc (){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function start_window_manager (){
|
function start_window_manager (){
|
||||||
log "Starting Window Manager"
|
echo -e "\n------------------ Xfce4 window manager startup------------------"
|
||||||
|
if [ "${START_XFCE4}" == "1" ] || [ "${START_DE}" == "xfce4-session" ]; then
|
||||||
if [ "${START_XFCE4}" == "1" ] ; then
|
|
||||||
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "${KASM_EGL_CARD}" ] && [ ! -z "${KASM_RENDERD}" ] && [ -O "${KASM_RENDERD}" ] && [ -O "${KASM_EGL_CARD}" ] ; then
|
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "${KASM_EGL_CARD}" ] && [ ! -z "${KASM_RENDERD}" ] && [ -O "${KASM_RENDERD}" ] && [ -O "${KASM_EGL_CARD}" ] ; then
|
||||||
echo "Starting XFCE with VirtualGL using EGL device ${KASM_EGL_CARD}"
|
echo "Starting XFCE with VirtualGL using EGL device ${KASM_EGL_CARD}"
|
||||||
DISPLAY=:1 /opt/VirtualGL/bin/vglrun -d "${KASM_EGL_CARD}" /usr/bin/startxfce4 --replace &
|
DISPLAY=:1 /opt/VirtualGL/bin/vglrun -d "${KASM_EGL_CARD}" /usr/bin/startxfce4 --replace &
|
||||||
else
|
else
|
||||||
echo "Starting XFCE"
|
echo "Starting XFCE"
|
||||||
if [ -f '/usr/bin/zypper' ]; then
|
DISPLAY=:1 /usr/bin/startxfce4 --replace &
|
||||||
DISPLAY=:1 /usr/bin/dbus-launch /usr/bin/startxfce4 --replace &
|
|
||||||
else
|
|
||||||
/usr/bin/startxfce4 --replace &
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
KASM_PROCS['window_manager']=$!
|
KASM_PROCS['window_manager']=$!
|
||||||
else
|
else
|
||||||
echo "Skipping XFCE Startup"
|
echo "Skipping XFCE Startup"
|
||||||
fi
|
fi
|
||||||
|
echo -e "\n------------------ Openbox window manager startup------------------"
|
||||||
|
if [ "${START_DE}" == "openbox" ] ; then
|
||||||
|
/usr/bin/openbox-session &
|
||||||
|
KASM_PROCS['window_manager']=$!
|
||||||
|
else
|
||||||
|
echo "Skipping OpenBox Startup"
|
||||||
|
fi
|
||||||
|
echo -e "\n------------------ KDE window manager startup------------------"
|
||||||
|
if [ "${START_DE}" == "kde5" ] ; then
|
||||||
|
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "${KASM_EGL_CARD}" ] && [ ! -z "${KASM_RENDERD}" ] && [ -O "${KASM_RENDERD}" ] && [ -O "${KASM_EGL_CARD}" ] ; then
|
||||||
|
echo "Starting KDE with VirtualGL using EGL device ${KASM_EGL_CARD}"
|
||||||
|
DISPLAY=:1 /opt/VirtualGL/bin/vglrun -d "${KASM_EGL_CARD}" /usr/bin/startplasma-x11 &
|
||||||
|
else
|
||||||
|
echo "Starting KDE"
|
||||||
|
DISPLAY=:1 /usr/bin/startplasma-x11 &
|
||||||
|
fi
|
||||||
|
KASM_PROCS['window_manager']=$!
|
||||||
|
else
|
||||||
|
echo "Skipping KDE Startup"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_audio_out_websocket (){
|
function start_audio_out_websocket (){
|
||||||
@ -517,7 +535,7 @@ do
|
|||||||
# TODO: This will only work if both processes are killed, requires more work
|
# TODO: This will only work if both processes are killed, requires more work
|
||||||
start_upload
|
start_upload
|
||||||
;;
|
;;
|
||||||
kasm_gamepad)
|
kasm_gamepad)
|
||||||
echo "Gamepad Service Failed"
|
echo "Gamepad Service Failed"
|
||||||
# TODO: Needs work in python project to support auto restart
|
# TODO: Needs work in python project to support auto restart
|
||||||
# start_gamepad
|
# start_gamepad
|
||||||
|
13
src/kasmos/install/baseapps/browser.desktop
Normal file
13
src/kasmos/install/baseapps/browser.desktop
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Chromium Web Browser
|
||||||
|
Exec=kdialog --msgbox "A default internet browser is not installed."
|
||||||
|
Terminal=false
|
||||||
|
X-MultipleArgs=false
|
||||||
|
Type=Application
|
||||||
|
Icon=chromium
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
MimeType=text/html;text/xml;application/xhtml_xml;application/x-mimearchive;x-scheme-handler/http;x-scheme-handler/https;
|
||||||
|
StartupWMClass=chromium
|
||||||
|
StartupNotify=true
|
||||||
|
Keywords=browser
|
21
src/kasmos/install/baseapps/docs-editor.desktop
Normal file
21
src/kasmos/install/baseapps/docs-editor.desktop
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Docs
|
||||||
|
GenericName=Document Editor
|
||||||
|
Comment=Document Editor
|
||||||
|
Type=Application
|
||||||
|
Exec=kdialog --msgbox "A default document editing program is not installed."
|
||||||
|
Terminal=false
|
||||||
|
Icon=application-msword
|
||||||
|
Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
|
||||||
|
Categories=Office;WordProcessor;Spreadsheet;
|
||||||
|
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;
|
||||||
|
Actions=NewDocument;
|
||||||
|
|
||||||
|
[Desktop Action NewDocument]
|
||||||
|
Name=New Document
|
||||||
|
Name[de]=Neues Dokument
|
||||||
|
Name[fr]=Nouveau document
|
||||||
|
Name[es]=Documento nuevo
|
||||||
|
Name[ru]=Создать документ
|
||||||
|
Exec=/usr/bin/onlyoffice-desktopeditors --new:word
|
50
src/kasmos/install/baseapps/install_baseapps.sh
Normal file
50
src/kasmos/install/baseapps/install_baseapps.sh
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Remove unneeded apps
|
||||||
|
apt remove -y libnotify4
|
||||||
|
|
||||||
|
# Remove menu shortcuts for stuff we don't care to show the user, but don't want to uninstall
|
||||||
|
rm /usr/share/applications/vim.desktop
|
||||||
|
rm /usr/share/applications/org.kde.plasma.emojier.desktop
|
||||||
|
rm /usr/share/applications/kvantummanager.desktop
|
||||||
|
|
||||||
|
# Rename the title of some applications
|
||||||
|
sed -i 's#Name=KFind#Name=Find#' /usr/share/applications/org.kde.kfind.desktop
|
||||||
|
sed -r -i 's#Name(\[\w+\])?=gedit#Name\1=Editor#g' /usr/share/applications/org.gnome.gedit.desktop
|
||||||
|
|
||||||
|
# Download Base Elementory applications compiled by Kasm
|
||||||
|
# https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_desktop_apps/66826216f0024f5455d18d241dc3e44adbf2c41c/calculator_2.0.3-1_amd64.deb
|
||||||
|
BASEURL="https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_desktop_apps"
|
||||||
|
COMMITID="3c732e03a9e755aaa1b69f3d56a69964ddf8b8d5"
|
||||||
|
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
|
||||||
|
|
||||||
|
|
||||||
|
APPS=("calculator_2.0.3-1" "calendar_7.0.0-1" "camera_6.2.2-1" "music_7.0.0-1" "terminal_6.1.2-1" "filemanager_6.5.3-1")
|
||||||
|
|
||||||
|
cd $INST_SCRIPTS/baseapps/
|
||||||
|
for app in ${APPS[@]}; do
|
||||||
|
wget "${BASEURL}/${COMMITID}/${app}_${ARCH}.deb"
|
||||||
|
apt install -y ./${app}_${ARCH}.deb
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install base apt apps
|
||||||
|
apt update
|
||||||
|
apt install -y gedit evince shotwell mpv
|
||||||
|
|
||||||
|
# Hide stuff in the menu that we don't want there
|
||||||
|
rm -f /usr/share/applications/vim.desktop
|
||||||
|
rm -f /usr/share/applications/org.kde.plasma.emojier.desktop
|
||||||
|
rm -f /usr/share/applications/kvantummanager.desktop
|
||||||
|
|
||||||
|
# Add Custom icons
|
||||||
|
cp $INST_SCRIPTS/baseapps/videos.svg /usr/share/icons/hicolor/scalable/apps/
|
||||||
|
|
||||||
|
# Customize desktop menu shortcuts
|
||||||
|
sed -i 's#Name=KFind#Name=Find#' /usr/share/applications/org.kde.kfind.desktop
|
||||||
|
sed -r -i 's#Name(\[\w+\])?=gedit#Name\1=Editor#g' /usr/share/applications/org.gnome.gedit.desktop
|
||||||
|
sed -r -i 's#Name(\[\w+\])?=[Ss]hotwell#Name\1=Photos#g' /usr/share/applications/shotwell.desktop
|
||||||
|
sed -r -i 's#Icon=.+#Icon=videos#' /usr/share/applications/mpv.desktop
|
||||||
|
sed -r -i 's#Name(\[\w+\])?=.+#Name\1=Videos#g' /usr/share/applications/mpv.desktop
|
||||||
|
sed -r -i 's#Categories=.+#Categories=System;#' /usr/share/applications/org.kde.kdeconnect.app.desktop
|
||||||
|
sed -r -i 's#Categories=.+#Categories=System;#' /usr/share/applications/org.kde.kdeconnect.sms.desktop
|
||||||
|
sed -r -i 's#Categories=.+#Categories=System;#' /usr/share/applications/org.kde.kdeconnect_open.desktop
|
33
src/kasmos/install/baseapps/notify-send
Executable file
33
src/kasmos/install/baseapps/notify-send
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TIMEOUT=
|
||||||
|
ICON="/usr/share/icons/Papirus-Dark/24x24/actions/dialog-information.svg"
|
||||||
|
TITLE=
|
||||||
|
MESSAGE=
|
||||||
|
LASTARG=
|
||||||
|
|
||||||
|
for var in "$@"
|
||||||
|
do
|
||||||
|
if [[ "$var" == -* ]] ; then
|
||||||
|
LASTARG="$var"
|
||||||
|
else
|
||||||
|
if [ -z "$LASTARG" ] ; then
|
||||||
|
if [ -z "$TITLE" ] ; then
|
||||||
|
TITLE="$var"
|
||||||
|
else
|
||||||
|
MESSAGE="$var "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
case $LASTARG in
|
||||||
|
-t)
|
||||||
|
TIMEOUT=$var
|
||||||
|
;;
|
||||||
|
-i)
|
||||||
|
ICON=$var
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
kdialog --passivepopup "$MESSAGE" --icon "$ICON" --title "$TITLE" $TIMEOUT &
|
21
src/kasmos/install/baseapps/present-editor.desktop
Normal file
21
src/kasmos/install/baseapps/present-editor.desktop
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Slides
|
||||||
|
GenericName=Slide Deck Editor
|
||||||
|
Comment=Slide Deck Editor
|
||||||
|
Type=Application
|
||||||
|
Exec=kdialog --msgbox "A default presentation editing program is not installed."
|
||||||
|
Terminal=false
|
||||||
|
Icon=application-mspowerpoint
|
||||||
|
Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
|
||||||
|
Categories=Office;
|
||||||
|
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;
|
||||||
|
Actions=NewPresentation;
|
||||||
|
|
||||||
|
[Desktop Action NewPresentation]
|
||||||
|
Name=New Presentation
|
||||||
|
Name[de]=Neue Präsentation
|
||||||
|
Name[fr]=Nouvelle présentation
|
||||||
|
Name[es]=Presentación nueva
|
||||||
|
Name[ru]=Создать презентацию
|
||||||
|
Exec=/usr/bin/onlyoffice-desktopeditors --new:slide
|
21
src/kasmos/install/baseapps/sheets-editor.desktop
Normal file
21
src/kasmos/install/baseapps/sheets-editor.desktop
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Sheets
|
||||||
|
GenericName=Spreadsheet Editor
|
||||||
|
Comment=Spreadsheet Editor
|
||||||
|
Type=Application
|
||||||
|
Exec=kdialog --msgbox "A default spreadsheet editing program is not installed."
|
||||||
|
Terminal=false
|
||||||
|
Icon=application-x-excel
|
||||||
|
Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
|
||||||
|
Categories=Office;WordProcessor;Spreadsheet;
|
||||||
|
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;
|
||||||
|
Actions=NewSpreadsheet;
|
||||||
|
|
||||||
|
[Desktop Action NewSpreadsheet]
|
||||||
|
Name=New Spreadsheet
|
||||||
|
Name[de]=Neues Tabellendokument
|
||||||
|
Name[fr]=Nouveau classeur
|
||||||
|
Name[es]=Hoja de cálculo nueva
|
||||||
|
Name[ru]=Создать эл.таблицу
|
||||||
|
Exec=/usr/bin/onlyoffice-desktopeditors --new:cell
|
364
src/kasmos/install/baseapps/videos.svg
Normal file
364
src/kasmos/install/baseapps/videos.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 22 KiB |
@ -58,7 +58,12 @@ elif [ "${DISTRO}" == "alpine" ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y curl git ffmpeg
|
apt-get install -y \
|
||||||
|
curl \
|
||||||
|
ffmpeg \
|
||||||
|
git \
|
||||||
|
pulseaudio \
|
||||||
|
pulseaudio-utils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /var/run/pulse
|
mkdir -p /var/run/pulse
|
||||||
|
@ -62,3 +62,19 @@ rm -f \
|
|||||||
/etc/xdg/autostart/xfce4-screensaver.desktop \
|
/etc/xdg/autostart/xfce4-screensaver.desktop \
|
||||||
/etc/xdg/autostart/xfce-polkit.desktop \
|
/etc/xdg/autostart/xfce-polkit.desktop \
|
||||||
/etc/xdg/autostart/xscreensaver.desktop
|
/etc/xdg/autostart/xscreensaver.desktop
|
||||||
|
|
||||||
|
# Cleanup specific to KasmOS
|
||||||
|
if [ "$1" = "kasmos" ] ; then
|
||||||
|
echo "Removing packages from base"
|
||||||
|
packages=("konsole" "geeqie" "gwenview" "imagemagick-6.q16" "kate" "dolphin")
|
||||||
|
for package in ${packages[@]}; do
|
||||||
|
if [[ $(apt -qq list "$package") ]] ; then
|
||||||
|
echo "Removing package $package."
|
||||||
|
apt remove -y ${package}
|
||||||
|
else
|
||||||
|
echo "Package ${package} not found."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
|
fi
|
||||||
|
20
src/ubuntu/install/kde/auto_start.desktop
Normal file
20
src/ubuntu/install/kde/auto_start.desktop
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Comment[en_US]=
|
||||||
|
Comment=
|
||||||
|
Exec=/dockerstartup/desktop_environment_policy.sh
|
||||||
|
GenericName[en_US]=
|
||||||
|
GenericName=
|
||||||
|
Icon=dialog-scripts
|
||||||
|
MimeType=
|
||||||
|
Name[en_US]=Unlock KeePassXC database
|
||||||
|
Name=Unlock KeePassXC database
|
||||||
|
Path=
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
TerminalOptions=
|
||||||
|
Type=Application
|
||||||
|
X-DBUS-ServiceName=
|
||||||
|
X-DBUS-StartupType=
|
||||||
|
X-KDE-AutostartScript=true
|
||||||
|
X-KDE-SubstituteUID=false
|
||||||
|
X-KDE-Username=
|
8
src/ubuntu/install/kde/desktop_environment_policy.sh
Normal file
8
src/ubuntu/install/kde/desktop_environment_policy.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# TODO: Find explicit way to determine that KDE is ready
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
# Disable screen lock
|
||||||
|
kwriteconfig5 --file kscreenlockerrc --group Daemon --key Autolock false
|
||||||
|
qdbus org.freedesktop.ScreenSaver /ScreenSaver configure
|
164
src/ubuntu/install/kde/install_kde.sh
Normal file
164
src/ubuntu/install/kde/install_kde.sh
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
### every exit != 0 fails the script
|
||||||
|
set -e
|
||||||
|
|
||||||
|
disable_epel_nss_wrapper_that_breaks_firefox() {
|
||||||
|
yum-config-manager --setopt=epel.exclude=nss_wrapper --save
|
||||||
|
}
|
||||||
|
|
||||||
|
replace_default_xinit() {
|
||||||
|
|
||||||
|
mkdir -p /etc/X11/xinit
|
||||||
|
cat >/etc/X11/xinit/xinitrc <<EOL
|
||||||
|
#!/bin/sh
|
||||||
|
for file in /etc/X11/xinit/xinitrc.d/* ; do
|
||||||
|
. \$file
|
||||||
|
done
|
||||||
|
. /etc/X11/Xsession
|
||||||
|
EOL
|
||||||
|
|
||||||
|
chmod +x /etc/X11/xinit/xinitrc
|
||||||
|
}
|
||||||
|
|
||||||
|
replace_default_99x11_common_start() {
|
||||||
|
if [ -f /etc/X11/Xsession.d/99x11-common_start ] ; then
|
||||||
|
cat >/etc/X11/Xsession.d/99x11-common_start <<EOL
|
||||||
|
# This file is sourced by Xsession(5), not executed.
|
||||||
|
# exec $STARTUP
|
||||||
|
EOL
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Install KDE UI components"
|
||||||
|
if [[ "${DISTRO}" != @(centos|oracle7|oracle8|opensuse|fedora37|fedora38|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9|alpine) ]]; then
|
||||||
|
apt-get update
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$DISTRO" = @(ubuntu|debian|parrotos5) ]]; then
|
||||||
|
apt-get install -y x11-utils
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
dolphin \
|
||||||
|
gwenview \
|
||||||
|
kde-config-gtk-style \
|
||||||
|
kdialog \
|
||||||
|
kfind \
|
||||||
|
khotkeys \
|
||||||
|
kio-extras \
|
||||||
|
knewstuff-dialog \
|
||||||
|
konsole \
|
||||||
|
ksystemstats \
|
||||||
|
kwin-addons \
|
||||||
|
kwin-x11 \
|
||||||
|
kwrite \
|
||||||
|
plasma-desktop \
|
||||||
|
plasma-workspace \
|
||||||
|
qml-module-qt-labs-platform \
|
||||||
|
systemsettings \
|
||||||
|
x11-xserver-utils \
|
||||||
|
xclip \
|
||||||
|
libnotify-bin libnotify4 \
|
||||||
|
kde-config-screenlocker
|
||||||
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||||
|
locale-gen
|
||||||
|
elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||||
|
if [ "${DISTRO}" == centos ]; then
|
||||||
|
yum install -y epel-release
|
||||||
|
else
|
||||||
|
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||||
|
fi
|
||||||
|
disable_epel_nss_wrapper_that_breaks_firefox
|
||||||
|
yum install -y \
|
||||||
|
curl \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [ "$DISTRO" = "oracle8" ]; then
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [ "$DISTRO" = "oracle9" ]; then
|
||||||
|
dnf config-manager --set-enabled ol9_codeready_builder
|
||||||
|
dnf config-manager --set-enabled ol9_distro_builder
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [[ "$DISTRO" == @(rockylinux9|almalinux9) ]]; then
|
||||||
|
dnf config-manager --set-enabled crb
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [[ "$DISTRO" == @(rockylinux8|almalinux8) ]]; then
|
||||||
|
dnf config-manager --set-enabled powertools
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [ "$DISTRO" = "opensuse" ]; then
|
||||||
|
zypper install -yn \
|
||||||
|
curl \
|
||||||
|
gvfs \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [[ "$DISTRO" = @(fedora37|fedora38) ]]; then
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
gvfs \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset
|
||||||
|
elif [ "$DISTRO" = "alpine" ]; then
|
||||||
|
apk add --no-cache \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
mesa \
|
||||||
|
mesa-dri-gallium \
|
||||||
|
mesa-gl
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${DISTRO}" != @(centos|oracle7|oracle8|fedora37|fedora38|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9|alpine) ]]; then
|
||||||
|
replace_default_xinit
|
||||||
|
if [ "${START_XFCE4}" == "1" ] ; then
|
||||||
|
replace_default_99x11_common_start
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >/usr/bin/desktop_ready <<EOL
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
until pids=\$(pidof plasma_session); do sleep .5; done
|
||||||
|
EOL
|
||||||
|
chmod +x /usr/bin/desktop_ready
|
||||||
|
|
||||||
|
# Support desktop icon trust
|
||||||
|
cat >>/etc/xdg/autostart/desktop-icons.desktop<<EOL
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Desktop Icon Trust
|
||||||
|
Exec=/dockerstartup/trustdesktop.sh
|
||||||
|
EOL
|
||||||
|
chmod +x /etc/xdg/autostart/desktop-icons.desktop
|
||||||
|
|
||||||
|
# Add theme and tweaks
|
||||||
|
sed -i \
|
||||||
|
-e 's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \
|
||||||
|
-e 's#,preferred://browser##g' \
|
||||||
|
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
|
||||||
|
rm -Rf $HOME/.cache
|
164
src/ubuntu/install/openbox/install_openbox.sh
Normal file
164
src/ubuntu/install/openbox/install_openbox.sh
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
### every exit != 0 fails the script
|
||||||
|
set -e
|
||||||
|
|
||||||
|
disable_epel_nss_wrapper_that_breaks_firefox() {
|
||||||
|
yum-config-manager --setopt=epel.exclude=nss_wrapper --save
|
||||||
|
}
|
||||||
|
|
||||||
|
replace_default_xinit() {
|
||||||
|
|
||||||
|
mkdir -p /etc/X11/xinit
|
||||||
|
cat >/etc/X11/xinit/xinitrc <<EOL
|
||||||
|
#!/bin/sh
|
||||||
|
for file in /etc/X11/xinit/xinitrc.d/* ; do
|
||||||
|
. \$file
|
||||||
|
done
|
||||||
|
. /etc/X11/Xsession
|
||||||
|
EOL
|
||||||
|
|
||||||
|
chmod +x /etc/X11/xinit/xinitrc
|
||||||
|
}
|
||||||
|
|
||||||
|
replace_default_99x11_common_start() {
|
||||||
|
if [ -f /etc/X11/Xsession.d/99x11-common_start ] ; then
|
||||||
|
cat >/etc/X11/Xsession.d/99x11-common_start <<EOL
|
||||||
|
# This file is sourced by Xsession(5), not executed.
|
||||||
|
# exec $STARTUP
|
||||||
|
EOL
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Install Openbox UI components"
|
||||||
|
if [[ "${DISTRO}" != @(centos|oracle7|oracle8|opensuse|fedora37|fedora38|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9|alpine) ]]; then
|
||||||
|
apt-get update
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$DISTRO" = @(ubuntu|debian|parrotos5) ]]; then
|
||||||
|
apt-get install -y x11-utils
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
openbox \
|
||||||
|
x11-xserver-utils \
|
||||||
|
xclip \
|
||||||
|
xterm
|
||||||
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||||
|
locale-gen
|
||||||
|
elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||||
|
if [ "${DISTRO}" == centos ]; then
|
||||||
|
yum install -y epel-release
|
||||||
|
else
|
||||||
|
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||||
|
fi
|
||||||
|
disable_epel_nss_wrapper_that_breaks_firefox
|
||||||
|
yum install -y \
|
||||||
|
curl \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [ "$DISTRO" = "oracle8" ]; then
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [ "$DISTRO" = "oracle9" ]; then
|
||||||
|
dnf config-manager --set-enabled ol9_codeready_builder
|
||||||
|
dnf config-manager --set-enabled ol9_distro_builder
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [[ "$DISTRO" == @(rockylinux9|almalinux9) ]]; then
|
||||||
|
dnf config-manager --set-enabled crb
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [[ "$DISTRO" == @(rockylinux8|almalinux8) ]]; then
|
||||||
|
dnf config-manager --set-enabled powertools
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [ "$DISTRO" = "opensuse" ]; then
|
||||||
|
zypper install -yn \
|
||||||
|
curl \
|
||||||
|
gvfs \
|
||||||
|
openbox \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [[ "$DISTRO" = @(fedora37|fedora38) ]]; then
|
||||||
|
dnf install -y \
|
||||||
|
curl \
|
||||||
|
gvfs \
|
||||||
|
openbox \
|
||||||
|
wmctrl \
|
||||||
|
xclip \
|
||||||
|
xset \
|
||||||
|
xterm
|
||||||
|
elif [ "$DISTRO" = "alpine" ]; then
|
||||||
|
apk add --no-cache \
|
||||||
|
curl \
|
||||||
|
dbus-x11 \
|
||||||
|
gvfs \
|
||||||
|
mesa \
|
||||||
|
mesa-dri-gallium \
|
||||||
|
mesa-gl \
|
||||||
|
openbox \
|
||||||
|
xterm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${DISTRO}" != @(centos|oracle7|oracle8|fedora37|fedora38|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9|alpine) ]]; then
|
||||||
|
replace_default_xinit
|
||||||
|
if [ "${START_XFCE4}" == "1" ] ; then
|
||||||
|
replace_default_99x11_common_start
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >/usr/bin/desktop_ready <<EOL
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
if [ -z \${START_DE+x} ]; then \
|
||||||
|
START_DE="xfce4-session"
|
||||||
|
fi
|
||||||
|
until pids=\$(pidof \${START_DE}); do sleep .5; done
|
||||||
|
EOL
|
||||||
|
chmod +x /usr/bin/desktop_ready
|
||||||
|
|
||||||
|
# Support desktop icon trust
|
||||||
|
cat >>/etc/xdg/autostart/desktop-icons.desktop<<EOL
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Desktop Icon Trust
|
||||||
|
Exec=/dockerstartup/trustdesktop.sh
|
||||||
|
EOL
|
||||||
|
chmod +x /etc/xdg/autostart/desktop-icons.desktop
|
||||||
|
|
||||||
|
# OpenBox tweaks
|
||||||
|
sed -i \
|
||||||
|
's/NLIMC/NLMC/g' \
|
||||||
|
/etc/xdg/openbox/rc.xml
|
@ -204,7 +204,10 @@ chmod +x /usr/bin/execThunar.sh
|
|||||||
|
|
||||||
cat >/usr/bin/desktop_ready <<EOL
|
cat >/usr/bin/desktop_ready <<EOL
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
until pids=\$(pidof xfce4-session); do sleep .5; done
|
if [ -z \${START_DE+x} ]; then \
|
||||||
|
START_DE="xfce4-session"
|
||||||
|
fi
|
||||||
|
until pids=\$(pidof \${START_DE}); do sleep .5; done
|
||||||
EOL
|
EOL
|
||||||
chmod +x /usr/bin/desktop_ready
|
chmod +x /usr/bin/desktop_ready
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user