Update after finals 2023

This commit is contained in:
Jan Schär 2023-06-01 15:25:01 +02:00
parent 295a111cec
commit 9e9cfaabea
12 changed files with 78 additions and 28 deletions

View file

@ -9,7 +9,7 @@ if [ X$action = Xdirinstall ]; then
return 0
fi
grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
#grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
[ "$flag_menu" ] || return 0
out=$(tty)

View file

@ -3,6 +3,6 @@
# assign classes to hosts based on their hostname
# do not use this if a menu will be presented
[ "$flag_menu" ] && exit 0
#[ "$flag_menu" ] && exit 0
echo "FAIBASE DEBIAN XORG GNOME PARTICIPANT CONTESTANT"

View file

@ -19,6 +19,10 @@ MAXPACKAGES=800
PARTICIPANT_USER_NAME=soi
PARTICIPANT_USER_PW='$y$j9T$h5VhMd4KkdmbxdZD1gO0N/$1hvwZgO8pQw13Xd6jaNXbtkbqVOC4W/ia/KXOcCGYvB'
if [ $FAI_ACTION = "install" ]; then
if [ "$FAI_ACTION" = "" ]; then
FAI_ACTION=install
fi
if [ "$FAI_ACTION" = "install" ]; then
LOGUSER=fai
fi

View file

@ -8,7 +8,7 @@ netcat htop
chromium-l10n
codeblocks emacs geany gedit joe kate kdevelop nano vim vim-gtk3
gcc g++ gdb ddd valgrind python3 pypy
evince gnome-terminal konsole byobu
evince gnome-terminal konsole byobu cmake
# from third-party repositories
atom sublime-text code
# requested by particants (gnome-tweaks can be used e.g. to change the function of Caps Lock key)

View file

@ -16,6 +16,7 @@ $ROOTCMD systemctl disable bluetooth.service
$ROOTCMD systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
sed -i 's|"homepage": ".*"|"homepage": "https://finals.soi.ch/"|' $target/etc/chromium/master_preferences
sed -i 's|"homepage_is_newtabpage": true,|"homepage_is_newtabpage": false,|' $target/etc/chromium/master_preferences
# Disable panels in gnome-control-center
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"

View file

@ -36,6 +36,20 @@ if ! grep -q '_T("soi")' $target/usr/share/codeblocks/templates/wizard/config.sc
sed -i 's|// project wizards|RegisterWizard(wizProject, _T("soi"), _T("A SOI task"), _T("Console"));|' $target/usr/share/codeblocks/templates/wizard/config.script
fi
# Add a default keyring to avoid a prompt to create one when launching Chromium
mkdir -p $target/etc/skel/.local/share/keyrings/
chmod og= $target/etc/skel/.local/share/keyrings/
echo -n "Default_keyring" > $target/etc/skel/.local/share/keyrings/default
cat > $target/etc/skel/.local/share/keyrings/Default_keyring.keyring << EOF
[keyring]
display-name=Default keyring
ctime=0
mtime=0
lock-on-idle=false
lock-after=false
EOF
chmod og= $target/etc/skel/.local/share/keyrings/Default_keyring.keyring
# add super user account
if [ -n "$SUPER_USER_NAME" ]; then
if ! $ROOTCMD getent passwd $SUPER_USER_NAME ; then

View file

@ -5,7 +5,7 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
FAI=/var/lib/bernconfig
target=/
apt-get install libnss3-tools gnome-tweaks fonts-firacode
apt-get install -y libnss3-tools cmake gnome-tweaks fonts-firacode
rsync --archive \
--exclude /etc/apt \
@ -20,22 +20,40 @@ rsync --archive \
--exclude /root \
$FAI/simplefiles/CONTESTANT/ $target
sed -i 's|firefox-esr|firefox_firefox|' $target/etc/dconf/db/local.d/00-favorite-apps
$ROOTCMD dconf update
# Install soi header
tar --overwrite -xf $FAI/downloads/soi-header.tar.gz -C $target/usr/local/include --strip-components=2 soi-header/include/
sed -i 's|"homepage": ".*"|"homepage": "https://finals.soi.ch/"|' $target/etc/chromium/master_preferences
sed -i 's|"homepage_is_newtabpage": true,|"homepage_is_newtabpage": false,|' $target/etc/chromium/master_preferences
# Disable sleep
$ROOTCMD systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
# Disable panels in gnome-control-center
DISABLE_DESKTOP="$ROOTCMD dpkg-statoverride --force-statoverride-add --update --add root root 640"
$DISABLE_DESKTOP /usr/share/applications/gnome-bluetooth-panel.desktop
$DISABLE_DESKTOP /usr/share/applications/gnome-online-accounts-panel.desktop
$DISABLE_DESKTOP /usr/share/applications/gnome-sharing-panel.desktop
# Add a default keyring to avoid a prompt to create one when launching Chromium
mkdir -p $target/etc/skel/.local/share/keyrings/
chmod og= $target/etc/skel/.local/share/keyrings/
echo -n "Default_keyring" > $target/etc/skel/.local/share/keyrings/default
cat > $target/etc/skel/.local/share/keyrings/Default_keyring.keyring << EOF
[keyring]
display-name=Default keyring
ctime=0
mtime=0
lock-on-idle=false
lock-after=false
EOF
chmod og= $target/etc/skel/.local/share/keyrings/Default_keyring.keyring
# Auto login
sed -i 's/# AutomaticLoginEnable = true/AutomaticLoginEnable = true/g' $target/etc/gdm3/custom.conf
sed -i 's/# AutomaticLogin = user1/AutomaticLogin = contestant/g' $target/etc/gdm3/custom.conf
sed -i 's/# AutomaticLoginEnable = true/AutomaticLoginEnable = true/g' $target/etc/gdm3/daemon.conf
sed -i 's/# AutomaticLogin = user1/AutomaticLogin = contestant/g' $target/etc/gdm3/daemon.conf
exit $error

View file

@ -1,3 +1,2 @@
[Time]
NTP=finals.soi.ch
FallbackNTP=10.0.0.9
NTP=finals.soi.ch 10.0.0.9

View file

@ -158,6 +158,11 @@ function updateCountdown () {
minutesToStart.toString().padStart(2, '0') + '' +
secondsToStart.toString().padStart(2, '0');
// Force a redraw of the entire label widget. Without this, there sometimes
// appears a small artifact to the right of the text, which is only visible
// every other second. This seems to be a bug in the rendering engine itself.
labelCountdown.queue_redraw();
const nextUpdateTime = 1000 - nowTime % 1000
countdownTimeoutId = GLib.timeout_add(
GLib.PRIORITY_HIGH,