Skip to content
Snippets Groups Projects
Commit adfaf3c1 authored by ping's avatar ping
Browse files

Add new live_exam_os

parent 97c9bb74
No related branches found
No related tags found
No related merge requests found
Showing
with 416 additions and 337 deletions
output/
*.iso
#-------------------------------------------------------------------------------------------------------------------- ARG ALPINE_VERSION
# Builder stage that generates nexus-exam
FROM alpine:${ALPINE_VERSION}
RUN apk add mtools xorriso squashfs-tools cryptsetup e2fsprogs limine-x86_64 limine-cd
RUN apk update && apk add --no-cache \
gcc \
musl-dev \
pkgconf \
git \
wget \
make \
ca-certificates \
glfw-dev \
libxcursor-dev \
libxinerama-dev \
libxi-dev \
libxxf86vm-dev \
libxrandr-dev \
upx \
glfw \
xrandr
FROM ubuntu:22.04 as nexus-exam-builder
ARG base_dir
ARG server_ip
ARG server_port
ARG cert
ARG exam_user
ARG exam_pwd
RUN apt-get update && apt-get install -y gcc pkg-config git wget make ca-certificates libglfw3-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev upx-ucl
# Install go 1.22 from the official GO site
ENV archive=go1.22.6.linux-amd64.tar.gz ENV archive=go1.22.6.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin ENV PATH=$PATH:/usr/local/go/bin
WORKDIR /go WORKDIR /go
RUN wget https://go.dev/dl/$archive
RUN tar -C /usr/local -xzf $archive
# Compile nexus-exam
WORKDIR /nexus
COPY ${base_dir} .
RUN make build_nexus-exam SERVER=${server_ip}:${server_port} CERT=${cert} EXAM_USER=${exam_user} EXAM_PWD=${exam_pwd}
#--------------------------------------------------------------------------------------------------------------------
# Final builder stage that generates the live nexus-exam ISO image
FROM debian:12
ARG server_ip
ARG server_port
ARG cert
ARG exam_user
ARG exam_pwd
RUN apt-get update && apt-get install -y live-build live-config && rm -rf /var/lib/apt/lists/*
WORKDIR /live-default
# Install grub config (used when booting on UEFI systems)
ADD config/00-bootloader/grub_config.cfg config/includes.binary/boot/grub/config.cfg
# Install syslinux config (used when booting on BIOS systems)
# See here for customizing it: https://wiki.koozali.org/Isolinux_menu.c32
ADD config/00-bootloader/isolinux.cfg config/includes.binary/isolinux/isolinux.cfg
ADD config/00-bootloader/isolinux.png config/includes.binary/isolinux/splash.png
# Add additionnal Debian packages
ADD config/01-build_hooks/packages.list.chroot config/package-lists/
## Add swiss-french keyboard config
ADD config/01-build_hooks/keyboard/keyboard config/includes.chroot/etc/default/
# Install wifi connection
ADD config/01-build_hooks/wifi/wifi.nmconnection config/includes.chroot/etc/NetworkManager/system-connections/
RUN chmod 0600 config/includes.chroot/etc/NetworkManager/system-connections/wifi.nmconnection
## Specify groups for live user (dialout is required to access serial interfaces)
# RUN mkdir -p config/includes.chroot/etc/live/config.conf.d
# RUN echo "LIVE_USER_DEFAULT_GROUPS=\"cdrom floppy sudo audio dip video plugdev users netdev bluetooth scanner dialout\"" > config/includes.chroot/etc/live/config.conf.d/10-user-setup.conf
# Copy nexus-exam from builder container
COPY --from=nexus-exam-builder /nexus/build/nexus-exam config/includes.chroot/usr/local/bin/
## Run nexus-exam as soon as user logs in
ADD config/01-build_hooks/nexus-exam.desktop config/includes.chroot/etc/xdg/autostart/
# Add nexus-exam desktop shortcut
ADD config/01-build_hooks/nexus-exam.desktop config/includes.chroot/home/nexus/Bureau/
RUN chmod +x config/includes.chroot/home/nexus/Bureau/nexus-exam.desktop
# The chown doesn't affect the file because it's created at boot time
#RUN chown 1000:1000 config/includes.chroot/home/nexus/Bureau/nexus-exam.desktop
## Run various X11 settings as soon as user logs in
ADD config/01-build_hooks/x11/x11_settings.sh config/includes.chroot/usr/local/bin/
ADD config/01-build_hooks/x11/x11_settings.desktop config/includes.chroot/etc/xdg/autostart/
# Systemd service to set various X11 settings (does not work - not sure why)
# ADD config/01-build_hooks/systemd/x11_settings.sh config/includes.chroot/usr/local/bin/
# RUN chmod +x config/includes.chroot/usr/local/bin/x11_settings.sh
# ADD config/01-build_hooks/systemd/x11_settings.service config/includes.chroot/etc/systemd/system/
# Customize xfce4 desktop
ADD config/01-build_hooks/wallpapers/wallpaper.png config/includes.chroot/usr/share/images/desktop-base/default
ADD config/01-build_hooks/xfce/xfce4-desktop.xml config/includes.chroot/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
ADD config/01-build_hooks/xfce/xfce4-panel.xml config/includes.chroot/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
ADD config/01-build_hooks/xfce/xfce4-settings-manager.xml config/includes.chroot/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
ADD config/01-build_hooks/xfce/xfce4-power-manager.xml config/includes.chroot/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
ADD config/01-build_hooks/xfce/xfwm4.xml config/includes.chroot/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
## Install themes for xfwm4
ADD config/01-build_hooks/themes config/includes.chroot/usr/share/themes/
# NTP server configuration
ADD config/01-build_hooks/ntp/timesyncd.conf config/includes.chroot/etc/systemd/
## Post install hooks
ADD config/02-post_install_hooks/* config/hooks/live/
# Boot time hooks
ADD config/03-boot_hooks/* config/includes.chroot/lib/live/config/
# Configure firewall hook
RUN echo "firewall ${server_ip} ${server_port}\n" >> config/includes.chroot/lib/live/config/9999-firewall
# Add config file
ADD config/config auto/
RUN lb config
CMD ["lb", "build"] RUN wget https://go.dev/dl/$archive && \
tar -C /usr/local -xzf $archive && \
rm $archive
image_name := builder_alpine_iso
alpine_version := "3.20.3"
iso_file := image.iso
output := output
squashfs_file := ${output}/squash.rootfs
root_fs := ${output}/rootfs
initrd_fs := ${output}/initrd
iso_path := ${output}/iso
server_ip := "127.0.0.1"
server_port := "1077"
cert := "ca-cert.pem"
exam_user := "user"
exam_pwd := "password"
all: build
build: build_container clean
sudo docker run -it --rm -v $(PWD)/..:/data --workdir /data/live_exam_os --privileged -e SQUASHFS=${squashfs_file} -e ROOTFS_DIR=${root_fs} -e INITRD_DIR=${initrd_fs} -e ISO_DIR=${iso_path} -e SERVER="${server_ip}:${server_port}" -e CERT=${cert} -e EXAM_USER=${exam_user} -e EXAM_PWD=${exam_pwd} ${image_name} ./build.sh ${iso_file} "123" --alpine-version ${alpine_version} --user-password "0"
sudo chown ${USER}:${USER} ${iso_file}
no_luks: build_container clean
sudo docker run -it --rm -v $(PWD)/..:/data --workdir /data/live_exam_os --privileged -e SQUASHFS=${squashfs_file} -e ROOTFS_DIR=${root_fs} -e INITRD_DIR=${initrd_fs} -e ISO_DIR=${iso_path} -e SERVER="${server_ip}:${server_port}" -e CERT=${cert} -e EXAM_USER=${exam_user} -e EXAM_PWD=${exam_pwd} ${image_name} ./build.sh ${iso_file} '' --no-luks --alpine-version ${alpine_version} --user-password "0"
sudo chown ${USER}:${USER} ${iso_file}
build_container:
sudo docker build -t ${image_name} --build-arg ALPINE_VERSION=${alpine_version} .
clean:
sudo rm -rf ${iso_file} ${output}
uefi:
qemu-system-x86_64 -bios /usr/share/OVMF/x64/OVMF.fd -drive file=${iso_file},format=raw -boot d -m 16G -smp 4 -netdev user,id=n1 -device virtio-net-pci,netdev=n1
bios:
qemu-system-x86_64 -drive file=${iso_file},format=raw -boot d -m 4G -smp 4
bios_cd:
qemu-system-x86_64 -drive file=${iso_file},media=cdrom,if=ide,readonly=on -boot d -m 4G -smp 4
# live_exam_os
This project aims to create a minimal live operating system in the form of an ISO image, specifically designed for use on any computer. The generated ISO boots directly into a lightweight XFCE desktop environment and automatically launches the nexus-client. The focus is on simplicity, speed and portability.
The ISO is based on Alpine Linux, known for its small footprint and security. LUKS encryption to secure the filesystem is enabled by default and can be disabled.
## Features
- Minimal ISO: Starts with a lightweight Alpine Linux base.
- Encryption: Utilizes LUKS encryption for securing the filesystem (optional).
- Desktop Environment: Configured for autologin with a minimal desktop environment.
- Nexus Client: Auto-launches the nexus-client at startup.
- Customizable: Flexible options for user credentials, Alpine version, and additional files.
## Prerequisites
- Docker: Used to containerize the build process.
- QEMU: Optional, for testing the generated ISO.
## Environment Setup
The build.sh script use several environment variables for flexibility:
| Variable | Description |Example|
|-|-|-|
| SQUASHFS | Path to SquashFS file | out/squash.rootfs |
| ROOTFS_DIR | Temporary root filesystem directory | out/rootfs |
| INITRD_DIR | Temporary initrd directory | out/initrd |
| ISO_DIR| Temporary ISO directory | out/iso |
| SERVER | Server details | 127.0.0.1:1077 |
| CERT| Path to Certificate file |ca-cert.pem |
| EXAM_USER| Default user for exam client| user |
| EXAM_PWD| Default password for exam client | password |
## build.sh Script
The script build.sh generates the live ISO with various options for customization.
### Syntax
./build.sh iso_output_path luks_passphrase [options]
### Required Arguments
- iso_output_path: Path to save the generated ISO image (e.g., out/iso/alpine.iso).
- luks_passphrase: Passphrase for LUKS encryption. Leave blank when using --no-luks.
### Options
- --no-luks: Disable LUKS encryption (makes luks_passphrase optional).
- --alpine-version: Specify Alpine Linux version (default: 3.20.3).
- --root-enabled: Enable root access (default: disabled).
- --root-password: Set the root password (ignored if root is disabled).
- --user-password: Set the default user password.
### Example Usage
#### With Encryption:
```bash
./build.sh out/iso/alpine.iso 'my_luks_pass' --alpine-version 3.16 --root-enabled yes --root-password 'rootpass' --user-password 'userpass'
```
#### Without Encryption:
```bash
./build.sh out/iso/alpine.iso '' --no-luks --alpine-version 3.18
```
## Usage Instructions
### Build the ISO
The core ISO creation is handled by the script build.sh. For development, a Makefile is included to set up the environment and execute the script inside a Docker container.
#### Buld the ISO with encryption
Builds an encrypted ISO using LUKS with a default password of "123".
```
make build
```
#### Build the ISO without encryption
```
make no_luks
```
### Testing the ISO
After building the ISO, you can test it using QEMU:
#### UEFI Environment:
```
make uefi
```
#### BIOS Environment:
```
make bios
```
#### BIOS as CD-ROM:
```
make bios_cd
```
#!/bin/sh
ALPINE_VERSION="3.20.3"
ROOT_ENABLED="no"
LUKS_ENABLED="yes"
ROOT_PASSWORD=""
USER_PASSWORD=""
LUKS_IMG="squash.rootfs.luks"
BOOT_FOLDER="$ISO_DIR/boot"
helper() {
echo "USAGE: $(basename "$0") iso_output_path luks_passphrase [options]"
echo
echo "Required arguments:"
echo " iso_output_path Path where the generated ISO image will be saved (e.g., out/iso/alpine.iso)"
echo " luks_passphrase LUKS encryption passphrase for securing the filesystem"
echo
echo "Options:"
echo " --no-luks Disable LUKS encryption (makes luks_passphrase optional)"
echo " --alpine-version Specify the Alpine Linux version to use (default: 3.20.3)"
echo " --root-enabled Enable root access (default: disabled)"
echo " --root-password Set the root password (ignored if root is disabled)"
echo " --user-password Set the default user password"
echo
echo "Environment Setup Parameters:"
echo " SQUASHFS Path to the SquashFS file (e.g., out/squash.rootfs)"
echo " ROOTFS_DIR Path to the temporary filesystem directory (e.g., out/rootfs)"
echo " INITRD_DIR Temporary directory for initrd (e.g., out/initrd)"
echo " ISO_DIR Path to the temporary ISO directory (e.g., out/iso)"
echo " SERVER IP of the nexus server (e.g., 127.0.0.1:1077)"
echo " CERT Path to the Certificate file (e.g., ca-cert.pem)"
echo " EXAM_USER Default user for exam client (e.g., user)"
echo " EXAM_PWD Default password for exam client (e.g., password)"
echo
echo "Example Usage:"
echo " $(basename "$0") out/iso/alpine.iso 'my_luks_pass' --alpine-version 3.16 --root-enabled yes --root-password 'rootpass' --user-password 'userpass'"
echo " $(basename "$0") out/iso/alpine.iso '' --no-luks --alpine-version 3.18"
exit 1
}
check_container_and_alpine_version() {
if [ ! -f "/.dockerenv" ] && [ ! -f "/run/.containerenv" ]; then
echo "Error: This script should be run inside a container environment on Alpine Linux version $ALPINE_VERSION."
helper
fi
if [ -f "/etc/os-release" ]; then
. /etc/os-release
if [ "$ID" != "alpine" ] || [ "$VERSION_ID" != "$ALPINE_VERSION" ]; then
echo "Error: This script should be run inside a container environment on Alpine Linux version $ALPINE_VERSION."
echo "Actual version: $VERSION_ID"
helper
fi
else
echo "Error: This script should be run inside a container environment on Alpine Linux version $ALPINE_VERSION."
helper
fi
}
check_environment_var() {
if [ -z $SQUASHFS ] || [ -z $ROOTFS_DIR ] || [ -z $INITRD_DIR ] || [ -z $ISO_DIR ]; then
echo "Error: Environment variables aren't set"
helper
fi
}
run() {
chroot "$ROOTFS_DIR" $@
}
if [ "$#" -lt 2 ]; then
helper
fi
ISO_OUTPUT_PATH="$1"
LUKS_PASSPHRASE="$2"
shift 2
while [ "$#" -gt 0 ]; do
case "$1" in
--no-luks)
LUKS_ENABLED="no"
shift
;;
--alpine-version)
if [ -n "$2" ]; then
ALPINE_VERSION="$2"
shift 2
else
echo "Error: --alpine-version requires an argument" >&2
helper
fi
;;
--root-enabled)
if [ "$2" = "yes" ] || [ "$2" = "no" ]; then
ROOT_ENABLED="$2"
shift 2
else
echo "Error: --root-enabled must be 'yes' or 'no'" >&2
helper
fi
;;
--root-password)
if [ -n "$2" ]; then
ROOT_PASSWORD="$2"
shift 2
else
echo "Error: --root-password requires an argument" >&2
helper
fi
;;
--user-password)
if [ -n "$2" ]; then
USER_PASSWORD="$2"
shift 2
else
echo "Error: --user-password requires an argument" >&2
helper
fi
;;
*)
echo "Unknown option: $1" >&2
helper
;;
esac
done
if [ "$LUKS_ENABLED" = "yes" ] && [ -z "$LUKS_PASSPHRASE" ]; then
echo "Error: LUKS encryption is enabled, but no passphrase was provided." >&2
helper
fi
check_container_and_alpine_version
check_environment_var
echo "[Compiling nexus-exam...]"
cd ..
make build_nexus-exam
mkdir -p live_exam_os/$ROOTFS_DIR/usr/local/bin
cp build/nexus-exam live_exam_os/$ROOTFS_DIR/usr/local/bin/nexus-exam
make clean_client
cd -
echo "[Create initramfs...]"
rm -rf $INITRD_DIR
mkdir -p "$INITRD_DIR"
apk update
if [ $LUKS_ENABLED = "yes" ]; then
cp config/01-initramfs/init $INITRD_DIR/init
packages="busybox musl cryptsetup cryptsetup-libs popt libuuid libblkid
device-mapper-libs libcrypto3 argon2-libs json-c libeconf
udev kmod-libs zlib xz-libs zstd-libs"
else
cp config/01-initramfs/init_no_luks $INITRD_DIR/init
packages="busybox musl libblkid libeconf libcrypto3
udev kmod-libs zlib xz-libs zstd-libs"
fi
chmod +x $INITRD_DIR/init
for package in $packages; do
apk fetch -s "$package" > "$INITRD_DIR/$package.apk"
tar -xzf "$INITRD_DIR/$package.apk" -C $INITRD_DIR
rm "$INITRD_DIR/$package.apk"
done
echo "[Create filesystem...]"
mkdir -p "$ROOTFS_DIR"
apk add --initdb --root "$ROOTFS_DIR"
cp /etc/apk/repositories "$ROOTFS_DIR/etc/apk/repositories"
echo "[Installing packages...]"
apk update --root "$ROOTFS_DIR" --allow-untrusted
apk add --root "$ROOTFS_DIR" --allow-untrusted $(cat config/02-packages_install/packages) &>/dev/null
mkdir -p $INITRD_DIR/lib
cp -r $ROOTFS_DIR/lib/modules $INITRD_DIR/lib/
echo "[Uploading configuration file...]"
cd config/03-customisation
cp -R --parents * ../../$ROOTFS_DIR
cd ../..
echo "[Post-install...]"
for script in config/04-post_install/*.sh; do
./$script
done
echo "[Moving kernel from rootfs to iso/boot...]"
mkdir -p $BOOT_FOLDER
cp $ROOTFS_DIR/boot/vmlinuz-* $BOOT_FOLDER
rm -rf $ROOTFS_DIR/boot
echo "[Create initrd...]"
mkdir -p "$INITRD_DIR/usr/bin"
chroot "$INITRD_DIR" /bin/busybox --install
TMP_PWD=$(pwd)
cd $INITRD_DIR
find . | cpio -R root:root -H newc -o | gzip > $TMP_PWD/$BOOT_FOLDER/initrd
cd $TMP_PWD
echo "[Create squash.rootfs..]"
mksquashfs "$ROOTFS_DIR" "$SQUASHFS" &>/dev/null
if [ $LUKS_ENABLED = "yes" ]; then
echo "[Encrypt squash.rootfs..]"
SQUASHFS_SIZE=$(stat -c %s "$SQUASHFS")
LUKS_HEADER_SIZE=$((1024 * 1024 * 16)) # 16 MiB header LUKS2
TOTAL_SIZE=$((SQUASHFS_SIZE + LUKS_HEADER_SIZE))
SECTOR_SIZE=512
TOTAL_SIZE=$(( (TOTAL_SIZE + SECTOR_SIZE - 1) / SECTOR_SIZE * SECTOR_SIZE ))
fallocate -l $TOTAL_SIZE "$ISO_DIR/$LUKS_IMG"
echo -n "$LUKS_PASSPHRASE" | cryptsetup luksFormat "$ISO_DIR/$LUKS_IMG" --batch-mode
echo -n "$LUKS_PASSPHRASE" | cryptsetup luksOpen "$ISO_DIR/$LUKS_IMG" container
dd if="$SQUASHFS" of=/dev/mapper/container bs=4M
cryptsetup luksClose container
else
cp "$SQUASHFS" "$ISO_DIR/squash.rootfs"
fi
echo "[Create iso...]"
mkdir -p "$ISO_DIR/EFI/BOOT"
chown -R root:root $ISO_DIR
cp /usr/share/limine/BOOTX64.EFI "$ISO_DIR/EFI/BOOT/"
cp /usr/share/limine/*.bin "$ISO_DIR/"
cp /usr/share/limine/*.sys "$ISO_DIR/"
cp config/00-bootloader/limine.cfg "$ISO_DIR/limine.cfg"
xorriso -as mkisofs -R -r -J -b "limine-bios-cd.bin" \
-no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus \
-apm-block-size 2048 --efi-boot "limine-uefi-cd.bin" \
-efi-boot-part --efi-boot-image --protective-msdos-label \
-volid "NEXUSCLIENTISO" \
"$ISO_DIR" -o image.iso
limine bios-install image.iso
#!/bin/bash
LIVEBUILD_ISO_NAME=live-image-amd64.hybrid.iso
#LIVEBUILD_ISO_NAME=live-image-amd64.iso
TMP_CONTAINER_NAME=`echo $RANDOM | md5sum | head -c 20; echo;`
IMG_SUFFIX=`echo $RANDOM | md5sum | head -c 8; echo;`
DOCKER_IMG="nexus-live-exam-os_"$IMG_SUFFIX
abort () {
echo "ABORT."
exit 1
}
usage () {
app=`basename $0`
echo "USAGE: $app -s IP -p PORT -c CERT -u USER -w PWD -o ISO" >&2
echo "Build an ISO image of a nexus live exam OS." >&2
echo " -s ip address of the nexus-server" >&2
echo " -p port on which nexus-server listens" >&2
echo " -c path to public CA certificate file (ca-cert.pem)" >&2
echo " -u user nexus-exam uses to connect to nexus server" >&2
echo " -w password (in clear) for user above" >&2
echo " -o name of ISO image to create" >&2
exit 1
}
build_docker_image () {
# Create temp directory where nexus-exam will be compiled
dir=tmp.dir.$$
mkdir $dir || abort
# Copy pub certificate
cp $CERT $dir || abort
# Copy Makefile, sources files and git files (as we insert the git commit hash into nexus-exam)
cp ../Makefile $dir || abort
cp -r ../src $dir || abort
cp -r ../.git $dir || abort
cert_file=`basename $CERT`
# build context is ".." since we need access to the ../src directory in order to build nexus-exam
docker buildx build . -f Dockerfile -t "$DOCKER_IMG" --build-arg base_dir=$dir --build-arg server_ip=$SERVER_IP --build-arg server_port=$SERVER_PORT --build-arg cert=$cert_file --build-arg exam_user=$EXAM_USER --build-arg exam_pwd=$EXAM_PWD
build_status=$?
rm -rf $dir
if [ $build_status -ne 0 ] ; then
echo "FAILED building docker image!"
abort
fi
echo "Docker image \"$DOCKER_IMG\" sucessfully built"
}
remove_image_and_tmp_container () {
# Remove temporary container
if docker rm "$TMP_CONTAINER_NAME" ; then
echo "Successfully removed $TMP_CONTAINER_NAME container"
else
echo "FAILED removing $TMP_CONTAINER_NAME container!"
fi
# Remove image
docker rmi $DOCKER_IMG
}
if [ $# -ne 12 ] ; then usage ; fi
while getopts 's:p:c:u:w:o:' OPTION; do
case "$OPTION" in
s) SERVER_IP="$OPTARG" ;;
p) SERVER_PORT="$OPTARG" ;;
c) CERT="$OPTARG" ;;
u) EXAM_USER="$OPTARG" ;;
w) EXAM_PWD="$OPTARG" ;;
o) ISO="$OPTARG" ;;
*) usage
esac
done
error=0
echo "Building nexus live exam OS image \"$ISO\" ..."
echo "Using nexus-server @ $SERVER_IP:$SERVER_PORT"
build_docker_image
# Run temporary live-build container
if docker run --privileged --cgroupns private --name $TMP_CONTAINER_NAME $DOCKER_IMG ; then
echo "ISO image $ISO successfully built"
else
echo "FAILED building ISO image $ISO!"
remove_image_and_tmp_container
abort
fi
# Retrieve live-image from temporary container
if docker cp $TMP_CONTAINER_NAME:/live-default/$LIVEBUILD_ISO_NAME $ISO ; then
echo "Successfully extracted $ISO from $TMP_CONTAINER_NAME container"
else
error=1
echo "FAILED extracting $ISO from $TMP_CONTAINER_NAME container!"
fi
remove_image_and_tmp_container
if [[ -e $ISO ]] ; then
echo -e "\nSUCCESSFULLY created $ISO"
else
echo -e "\nFAILED creating $ISO!"
exit 1
fi
exit 0
set default=0
set timeout=0
TIMEOUT=0
:AlpineLinux
PROTOCOL=linux
KERNEL_PATH=boot:///boot/vmlinuz-lts
KERNEL_CMDLINE=quiet
MODULE_PATH=boot:///boot/initrd
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the timesyncd.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# See timesyncd.conf(5) for details.
[Time]
NTP=pool.ntp.org 0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org 0.north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org
FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#ConnectionRetrySec=30
#SaveIntervalSec=60
task-laptop
xfce4
xfce4-terminal
xfce4-power-manager
xfce4-battery-plugin
ufw
virt-viewer
firmware-iwlwifi
network-manager
network-manager-gnome
systemd-timesyncd
light
numlockx
[Unit]
Description=Screen settings
After=display-manager.service
Requires=display-manager.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/screen_settings.sh
[Install]
WantedBy=default.target
#!/bin/bash
# Set brightness at 100%
screen=`xrandr -q|grep ' connected'|head -n1|cut -d ' ' -f1`
xrandr --output $screen --brightness 1
# Disable screen blanking
xset s off
Daloa
-----
An original theme for xfwm4.
Created May 2006 by Mike Massonnet <mmassonnet@gmail.com>
Modified June 2006 by Olivier Fourdan <fourdan@xfce.org>
Redone in SVG, Nov 2006 by Olivier Fourdan <fourdan@xfce.org>.
Based on xfwm4 4.4 Default theme.
Theme released under GNU GPL license.
live_exam_os/config/01-build_hooks/themes/Daloa/xfwm4/bottom-active.png

73 B

/* XPM */
static char * bottom_active_xpm[] = {
"24 5 5 1",
" c None",
"+ c #E0E0FF s active_hilight_1",
"@ c #A0A0FF s active_shadow_1",
"$ c #B0B0B0 s active_mid_2",
"# c #C0C0C0 s active_color_2",
"########################",
"########################",
"########################",
"++++++++++++++++++++++++",
"@@@@@@@@@@@@@@@@@@@@@@@@"};
live_exam_os/config/01-build_hooks/themes/Daloa/xfwm4/bottom-inactive.png

73 B

/* XPM */
static char * bottom_inactive_xpm[] = {
"24 5 5 1",
" c None",
"+ c #E0E0FF s inactive_hilight_1",
"@ c #A0A0FF s inactive_shadow_1",
"$ c #B0B0B0 s inactive_mid_2",
"# c #C0C0C0 s inactive_color_2",
"########################",
"########################",
"########################",
"++++++++++++++++++++++++",
"@@@@@@@@@@@@@@@@@@@@@@@@"};
/* XPM */
static char * bottom_left_active_xpm[] = {
"16 16 5 1",
" c None",
"+ c #E0E0FF s active_hilight_1",
"@ c #A0A0FF s active_shadow_1",
"$ c #B0B0B0 s active_mid_2",
"# c #C0C0C0 s active_color_2",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+### ",
"@+##############",
"@+##############",
"@+##############",
"@+++++++++++++++",
" @@@@@@@@@@@@@@@"};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment