...
 
Commits (166)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import yaml
import argparse
import os
import subprocess
import re
def find_desktop(name):
if not re.search(r'\.desktop$', name):
name = '{}.desktop'.format(name)
if os.path.exists(name):
return name
output = subprocess.run(['find', '/usr/share', '-name', name], stdout=subprocess.PIPE).stdout.decode()
return output.split("\n")[0]
def parse_desktop(desktop):
out = {}
with open(desktop) as f:
text = "\n".join(f.readlines())
p = re.compile(r'((Exec|Icon|Name=|Name\[fr\]|GenericName\[fr\]).*)')
matches = p.findall(text)
return {k: m.split("=")[1] for m, k in matches}
def add_to_handymenu(user, cmd, category):
path = '/etc/handymenu/handymenu-{}.default.yaml'.format(user)
subprocess.run(['sed', '-i', '-e', 's/!!python\/str//g', path])
print(path)
with open(path) as stream:
try:
yml = yaml.safe_load(stream)
except yaml.YAMLError as exc:
print(exc)
lastId = 0
found = alreadyIn = False
for app in yml:
lastId = max(app['id'], lastId)
if(app['name'] == category):
for launcher in app['apps']:
if(launcher['name'] == cmd['name']):
alreadyIn = True
launcher['cmd'] = cmd['cmd']
launcher['generic'] = cmd['generic']
launcher['icon'] = cmd['icon']
if(not alreadyIn):
app['apps'] += [cmd]
found = True
if(not found):
yml += [{
'apps': [cmd],
'name': category,
'id': lastId+1,
}]
with open(path, 'w') as f:
yaml.dump(yml, f, default_flow_style=False, allow_unicode=True)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Add proggrams to handy menu.')
parser.add_argument('app', type=str, nargs=1, help='The app to add (name of a .desktop app or a path to the file)')
parser.add_argument('category', type=str, nargs=1, help='The name of the category in which add the app')
parser.add_argument('users', type=str, nargs='+', help='The users that should see the programm in their handy menu')
args = parser.parse_args()
print("Retrieving desktop file")
desktop = find_desktop(args.app[0])
print("parsing desktop info")
values = parse_desktop(desktop)
links = {
'Exec': 'cmd',
'GenericName': 'generic',
'GenericName[fr]': 'generic',
'Name[fr]': 'name',
'Name': 'name',
'Icon': 'icon',
}
cmd = {}
for k, v in links.items():
try:
cmd[v] = values[k]
except KeyError:
pass
for user in args.users:
print("Updating handymenu for {}".format(user))
add_to_handymenu(user, cmd, args.category[0])
#!/bin/bash
DIR=$(realpath $(dirname $0))
cd $DIR
echo "Starting update on $(date)"
echo "Updating Primtux4"
git reset --hard HEAD
export HTTPS_PROXY="http://dnsproxy:3128"
git pull
git log -n 1
$DIR/update_configurations.sh
error=$?
echo "Update done on $(date) code $error"
<?xml version="1.0"?>
<pinboard>
<backdrop style="Scaled">/opt/primtux-eole/fond admin.png</backdrop>
<icon x="672" y="32" label="postinstall.desktop">/opt/primtux-eole/postinstall.desktop</icon>
</pinboard>
......@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
conky.config = {
alignment = 'top_left',
alignment = 'top_middle',
background = false,
border_width = 1,
cpu_avg_samples = 2,
......@@ -39,8 +39,6 @@ conky.config = {
draw_shades = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=14',
gap_x = 5,
gap_y = 60,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
......@@ -64,10 +62,16 @@ conky.text = [[
Voici les informations nécessaires
pour le service d'assistance de la DSI
Assistance téléphonique
Du lundi au vendredi de 08h à 18h
04.76.86.31.31
$hr
Informations générales :
${color grey}Nom du serveur :$color ${exec dig wpad.ecole.lan | awk '/86400/{print $5}' | head -n 1 | nslookup | grep grenoble | awk '/name/{print $4}' | cut -d . -f 1}.grenoble.ecole.fr
${color grey}Nom du serveur :$color ${exec dig wpad.ecole.lan | awk '/86400/{print $5}' | head -n 1 | nslookup | grep grenoble | awk '/name/{print $4}' | cut -d . -f 1}.ecole.grenoble.fr
${color grey}Nom du poste :$color $nodename
${color grey}Version :$color ${exec lsb_release -d | awk '{print $2" "$3" "$4}'}
${color grey}Démarré depuis :$color $uptime
......
......@@ -5,12 +5,19 @@ then
apt-get -y install cifs-utils smbclient
fi
for d in /home/shares/*/*
do
umount $d > /dev/null 2>&1 || umount $d/* > /dev/null 2>&1
rmdir $d/* > /dev/null 2>&1
rmdir $d > /dev/null 2>&1
done
# Remove all ^//ecole-dc lines in fstab
sed -i.bak '/^\/\/ecole-dc/d' /etc/fstab
declare -A LEVELS
LEVELS=(['01-mini']='cp' ['02-super']='ce' ['03-maxi']='cm')
CLASSES=(['01-mini']='01-cp' ['02-super']='02-ce1-ce2' ['03-maxi']='03-cm1-cm2')
LEVELS=(['01-mini']='CP' ['02-super']='CE' ['03-maxi']='CM')
CLASSES=(['01-mini']='01-CP' ['02-super']='02-CE1-CE2' ['03-maxi']='03-CM1-CM2')
# Students
for usr in 01-mini 02-super 03-maxi
......@@ -19,35 +26,36 @@ do
mkdir -p /home/shares/$usr/PROFESSEURS
chown -R $usr:$usr /home/shares/$usr
lvl=${LEVELS[$usr]}
if [ $lvl != 'cp' ]
if [ $lvl != 'CP' ]
then
lvl2="${lvl}1-${lvl}2"
else
lvl2=$lvl
fi
lvlcred=$(echo "$lvl" | awk '{print tolower($0)}')
cat <<EOF>>/etc/fstab
//ecole-dc/$lvl2/donnees /home/shares/$usr/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/$lvl,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/travail /home/shares/$usr/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/$lvl,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/donnees /home/shares/$usr/PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
//ecole-dc/$lvl2/travail /home/shares/$usr/ELEVES/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/$lvlcred,uid=$usr,gid=$usr 0 0
EOF
done
# profs
for usr in prof direction
do
mkdir -p /home/shares/$usr/SCAN
for classe in 01-cp 02-ce1-ce2 03-cm1-cm2
for classe in 01-CP 02-CE1-CE2 03-CM1-CM2
do
mkdir -p /home/shares/$usr/$classe/PROFESSEURS
mkdir -p /home/shares/$usr/$classe/ELEVES
lvl=`echo $classe | sed 's/^[0-9]*-//'`
# Should not be prof-cp
cat <<EOF>>/etc/fstab
//ecole-dc/profs-$lvl/classe/donnees /home/shares/$usr/$classe/PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/travail /home/shares/$usr/$classe/ELEVES/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/donnees /home/shares/$usr/$classe/PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/profs-$lvl/classe/travail /home/shares/$usr/$classe/ELEVES/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
EOF
done
chown -R $usr:$usr /home/shares/$usr
cat <<EOF>>/etc/fstab
//ecole-dc/SCAN /home/shares/$usr/SCAN/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
//ecole-dc/SCAN /home/shares/$usr/SCAN/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=$usr,gid=$usr 0 0
EOF
done
......@@ -56,12 +64,18 @@ mkdir -p /home/shares/prof/CONFIDENTIEL
mkdir -p /home/shares/direction/CONFIDENTIEL_PROFESSEURS
mkdir -p /home/shares/direction/CONFIDENTIEL_DIRECTION
cat <<EOF>>/etc/fstab
//ecole-dc/svc-prof/perso /home/shares/prof/CONFIDENTIEL/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=prof,gid=prof 0 0
//ecole-dc/svc-prof/perso /home/shares/direction/CONFIDENTIEL_PROFESSEURS/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/prof,uid=direction,gid=direction 0 0
//ecole-dc/svc-dir/perso /home/shares/direction/CONFIDENTIEL_DIRECTION/ cifs _netdev,users,noauto,credentials=/etc/cifs/secrets/dir,uid=direction,gid=direction 0 0
//ecole-dc/svc-prof/perso /home/shares/prof/CONFIDENTIEL/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=prof,gid=prof 0 0
//ecole-dc/svc-prof/perso /home/shares/direction/CONFIDENTIEL_PROFESSEURS/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/prof,uid=direction,gid=direction 0 0
//ecole-dc/svc-dir/perso /home/shares/direction/CONFIDENTIEL_DIRECTION/ cifs _netdev,users,noauto,vers=1.0,credentials=/etc/cifs/secrets/dir,uid=direction,gid=direction 0 0
EOF
cp `dirname $0`/mount_shares.service /etc/systemd/system/
systemctl daemon-reload
systemctl start mount_shares.service
ping -c 3 ecole-dc
if [ $? -eq 0 ]
then
systemctl start mount_shares.service
else
echo "ATTENTION : les montages sont actives mais ecole-dc n'est pas joignable"
fi
systemctl enable mount_shares.service
#!/bin/bash
logfile="/var/log/`basename $0`_`date +%Y%m%d-%H%M`"
exec &> >(tee -a "$logfile")
if [ `whoami` != "root" ]
then
echo "Ce script devrait être exécuté en sudo"
exit 1
fi
export https_proxy="http://pedago:3142"
echo "Acquire::http::Proxy \"$https_proxy\";" >> /etc/apt/apt.conf.d/70debconf
echo "Acquire::https::Proxy \"$https_proxy\";" >> /etc/apt/apt.conf.d/70debconf
export https_proxy="http://dnsproxy:3128"
apt-get update && apt-get install git
# En cas d’erreur verifier les commandes echo et au besoin editer le fichier /etc/apt/apt.conf.d/70debconf
cd /opt
git clone --branch Primtux4 https://gitecoles.grenoble.fr/grenoble/primtux-eole
cd primtux-eole
DIR=$PWD
./fix_network.sh
# Testing network
ping -c 3 dnsproxy
if [ $? -ne 0 ]
then
zenity --question --text "Je n'arrive pas à joindre dnsproxy. Soit vous n'etes pas derrière un serveur eole, soit il y a un soucis de reseau, veuillez recommencer"
exit 1
fi
echo " debut de la preinstall"
./preinstall.sh
# changement des mots de passe
$DIR/update_passwords.sh
#!/bin/bash
logfile="/var/log/`basename $0`_`date +%Y%m%d-%H%M`"
exec &> >(tee -a "$logfile")
# Copyright (C) 2018 Tetras Libre <Contact@Tetras-Libre.fr>
# Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr>
#
......@@ -23,19 +28,20 @@ then
fi
DIR=`dirname $0`
cp "$DIR/fond admin.png" /home/administrateur/Documents/
cp $DIR/conky.conf /etc/conky/
cp $DIR/session.sh /usr/local/bin/
$DIR/add_session_script.sh
$DIR/create_cifs_mounts.sh
$DIR/set_mime_apps.sh
$DIR/set_screens.sh
$DIR/install_print_drivers.sh
$DIR/update_configurations.sh
sed -i -e 's/lametro.fr/perdu.com/' /etc/conky/conky.conf
echo "Récupération de la clef ssh du serveur"
echo "Synchronisation de l'heure"
export DEBIAN_FRONTEND=noninteractive
apt-get install -o Dpkg::Options::="--force-confold" -y --force-yes \
ntpdate openssh-server
systemctl stop ntp
systemctl disable ntp
cp $DIR/ntpdate /etc/default
ntpdate-debian
echo "Récupération TFTP sur le serveur"
tftp ecole-dc <<'EOF'
get id_rsa.pub
get secret.tgz
......@@ -45,6 +51,8 @@ sshdir="/root/.ssh/"
mkdir -p $sshdir
mv id_rsa.pub $sshdir/authorized_keys
chown -R root:root $sshdir
systemctl enable ssh
systemctl start ssh
mkdir -p /etc/cifs/secrets
mv secret.tgz /etc/cifs/secrets/
......@@ -54,10 +62,8 @@ rm secret.tgz
chown -R root:root /etc/cifs
cd -
hostn=`hostname`
echo "Veuillez entrer le numéro de poste"
read numero
numero=$(zenity --title "Post installation" --text "Veuillez entrer le numéro d'inventaire à 9 chiffres" --entry)
newhost="u$numero"
sudo sed -i "s/$hostn/$newhost/g" /etc/hosts
sudo sed -i "s/$hostn/$newhost/g" /etc/hostname
......@@ -69,5 +75,8 @@ $DIR/register.sh $newhost
cp $DIR/register.sh /etc/cron.weekly/
chmod +x /etc/cron.weekly/register.sh
read -p "L'ordinateur va redémarrer, appuyez sur n'importe quelle touche"
reboot
zenity --title "Redémarrage" --question --text "Un redémarrage est nécessaire, procéder immédiatement ?"
if [ $? -eq 0 ]
then
reboot
fi
#!/bin/bash
echo "$(date)" > /var/log/end_session.log
kill -9 $(ps aux | grep "pactl_watch\|pactl.*subscribe" | awk '{print $2}')
#!/bin/bash
net=$(ip a | awk '/inet 10\./{print $2}' | head -n 1 | cut -d . -f 1-3)
ip="$net.3"
file="/etc/cups/cups-browsed.conf"
if [ -z "$(grep $ip $file)" ]
then
echo BrowseAllow $ip >> $file
echo BrowsePoll $ip >> $file
systemctl restart cups cups-browsed
fi
#!/bin/bash
USERS="01-mini 02-super 03-maxi administrateur prof direction"
for u in $USERS
do
profile=`awk -F = '/^Path/{print $2}' /home/$u/.mozilla/firefox/profiles.ini`
#echo "$u uses profile $profile"
preffile="/home/$u/.mozilla/firefox/$profile/user.js"
#echo $preffile
for pref in "browser.newtabpage.activity-stream.prerender" "browser.newtabpage.activity-stream.showTopSites"
do
if [ -z "$(grep "$pref" $preffile)" ]
then
echo "user_pref(\"$pref\", false);" >> $preffile
else
sed -i -e "s/\(user_pref(\"$pref\",\).*)/\1, false)/" $preffile
fi
done
done
#!/bin/bash
if [ -z "$(grep fsck /etc/default/grub)" ]
then
sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 fsck.mode=force fsck.repair=yes"/' /etc/default/grub
fi
update-grub
#!/bin/bash
# Copyright (C) 2018 Tetras Libre <Contact@Tetras-Libre.fr>
# Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [ "`whoami`" != "root" ]
then
echo "This script should be run as root"
exit 1
fi
# Install missing libreoffice gtk
if [ -z "`dpkg -l | grep libreoffice-gtk`" ]
then
apt-get install -y libreoffice-gtk
fi
cd /home
for u in *
do
if [ $u != "shares" ]
then
echo $u
cd $u/.config/libreoffice/4/user
sed -i.bak -e 's@^\(.*CreateBackup.*\)true\(.*\)$@\1false\2@' registrymodifications.xcu
if [ $u != "01-mini" ] && [ $u != "02-super" ]
then
sed -i -e 's@\(private:resource/toolbar/textobjectbar.*Visible.*\)false@\1true@' registrymodifications.xcu
fi
sed -i.bak -e "s/administrateur/$u/g" ecole/nom_rep.ini
if [ -z "$(grep '$(work)/Partages_Serveur' registrymodifications.xcu)" ]
then
sed -i "/<\/oor:items>/d" registrymodifications.xcu
cat <<EOF >> registrymodifications.xcu
<item oor:path="/org.openoffice.Office.Common/Path/Info"><prop oor:name="WorkPathChanged" oor:op="fuse"><value>true</value></prop></item>
<item oor:path="/org.openoffice.Office.Common/Path/Current"><prop oor:name="Work" oor:op="fuse"><value xsi:nil="true"/></prop></item>
<item oor:path="/org.openoffice.Office.Paths/Paths/org.openoffice.Office.Paths:NamedPath['Work']"><prop oor:name="WritePath" oor:op="fuse"><value>\$(work)/Partages_Serveur</value></prop></item>
</oor:items>
EOF
fi
diff registrymodifications.xcu registrymodifications.xcu.bak
fi
cd /home
done
if [ -z "$(dpkg -l | grep ttf-mscorefonts-installer)" ]
then
DEBIAN_FRONTEND='noninteractive' apt-get install -y ttf-mscorefonts-installer
fi
#!/bin/bash
# Fix ethernet issues
echo "# The primary eth0 interface" | sudo tee --append /etc/network/interfaces
echo "auto eth0" | sudo tee --append /etc/network/interfaces
echo "allow-hotplug eth0" | sudo tee --append /etc/network/interfaces
echo "iface eth0 inet dhcp" | sudo tee --append /etc/network/interfaces
sudo sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"/\1 pcie_aspm=off"/' /etc/default/grub
sudo update-grub
modif=0
INTERFACES_IN_CONF=`awk '/^auto/{print $2}' /etc/network/interfaces | grep -v "^lo$"`
# Clean /etc/network/interfaces
for i in $INTERFACES_IN_CONF
do
if [ -z "$(grep $i /etc/network/interfaces)" ]
then
modif=1
fi
sed -i -e "/$i/d" /etc/network/interfaces;
done
INTERFACES=`ip a | awk '/^[0-9]:/ {print $2}' | tr -d :* | grep -v "^lo$"`
for i in $INTERFACES
do
cat <<EOF >> /etc/network/interfaces
# The primary $i interface
auto $i
allow-hotplug $i
iface $i inet dhcp
EOF
done
sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"/\1 pcie_aspm=off"/' /etc/default/grub
cat <<EOF > /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
EOF
if [ $modif -ne 0 ]
then
update-grub
systemctl restart networking
fi
#!/bin/bash
DISABLED="places_network places_applications thumbnail_local"
USERS="01-mini 02-super 03-maxi prof direction administrateur"
for u in $USERS
do
file="/home/$u/.config/libfm/libfm.conf"
for d in $DISABLED
do
sed -i "s/$d=1/$d=0/" $file
done
done
#!/bin/bash
file="/etc/apt/apt.conf.d/70debconf"
sed -i '/Acquire::.*::Proxy/d' $file
https_proxy="http://pedago:3142"
echo "Acquire::http::Proxy \"$https_proxy\";" >> $file
echo "Acquire::https::Proxy \"$https_proxy\";" >> $file
https_proxy="http://dnsproxy:3128"
for PROXY in HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy
do
echo "export $PROXY=$https_proxy" >> /tmp/$$-bashrc
done
for h in /home/* /root;
do
if [ -z "$(grep HTTP_PROXY $h/.bashrc)" ]
then
u=$(basename $h)
cat /tmp/$$-bashrc $h/.bashrc > $h/.bashrc.new
mv $h/.bashrc.new $h/.bashrc
chown $u:$u $h/.bashrc
fi
done
rm /tmp/$$-bashrc
#!/bin/bash
kmajor=$(uname -r | cut -d '.' -f 1)
kminor=$(uname -r | cut -d '.' -f 2)
echo $kver
if (( $(echo "$kmajor <= 4" | bc -l) )) && (( $(echo "$kminor < 19" | bc -l) ))
then
rm -f /etc/modprobe.d/alsa-base.conf
echo "deb http://deb.debian.org/debian stretch-backports main" \
> /etc/apt/sources.list.d/backports.list
apt-get update
pkg=$(apt-cache search "linux-image-4.19.*[0-9]-amd64" | \
sort -n | grep -v "amd64-.*" | tail -n 1 | awk '{print $1}')
apt-get install -y $pkg
echo "Pour prise en compte de la configuration de son, un redémarrage peut être nécessaire"
else
echo "kernel $kmajor.$kminor >= to 4.19, doing nothing"
fi
sed -i -e 's@^#\(session-cleanup-script=\)@\1/opt/primtux-eole/end_session.sh@' /etc/lightdm/lightdm.conf
#!/bin/bash
sudo apt-get install linux-headers-generic build-essential dkms;
cd /opt
git clone https://github.com/Mange/rtl8192eu-linux-driver;
cd rtl8192eu-linux-driver;
sudo dkms add .;
sudo dkms install rtl8192eu/1.0;
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf;
echo -e "8192eu\n\nloop" | sudo tee /etc/modules;
echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf;
sudo update-grub;
sudo update-initramfs -u;
#!/bin/bash
USERS="01-mini 02-super 03-maxi prof direction administrateur"
for u in $USERS
do
file="/home/$u/.xscreensaver"
if [ ! -e $file ]
then
cat <<EOF >$file
# XScreenSaver Preferences File
# Written by xscreensaver-demo 5.36 for david on Sat Jan 27 19:16:00 2018.
# https://www.jwz.org/xscreensaver/
timeout: 0:30:00
cycle: 0:10:00
lock: False
lockTimeout: 0:00:00
passwdTimeout: 0:00:30
visualID: default
installColormap: True
verbose: False
timestamp: True
splash: True
splashDuration: 0:00:05
demoCommand: xscreensaver-demo
prefsCommand: xscreensaver-demo -prefs
nice: 10
memoryLimit: 0
fade: True
unfade: False
fadeSeconds: 0:00:03
fadeTicks: 20
captureStderr: True
ignoreUninstalledPrograms:False
font: *-medium-r-*-140-*-m-*
dpmsEnabled: False
dpmsQuickOff: False
dpmsStandby: 2:00:00
dpmsSuspend: 2:00:00
dpmsOff: 4:00:00
grabDesktopImages: False
grabVideoFrames: False
chooseRandomImages: False
imageDirectory:
mode: random
selected: -1
textMode: url
textLiteral: XScreenSaver
textFile:
textProgram: fortune
textURL: http://planet.debian.org/rss20.xml
programs: \
- maze -root \n\
- GL: superquadrics -root \n\
attraction -root \n\
blitspin -root \n\
- greynetic -root \n\
- helix -root \n\
- hopalong -root \n\
- imsmap -root \n\
- noseguy -root \n\
- pyro -root \n\
- qix -root \n\
- rocks -root \n\
- rorschach -root \n\
- decayscreen -root \n\
- flame -root \n\
- halo -root \n\
- slidescreen -root \n\
- pedal -root \n\
bouboule -root \n\
- braid -root \n\
- coral -root \n\
- deco -root \n\
- drift -root \n\
- fadeplot -root \n\
galaxy -root \n\
- goop -root \n\
- grav -root \n\
- ifs -root \n\
- unicode -root \n\
- GL: jigsaw -root \n\
- julia -root \n\
- kaleidescope -root \n\
- GL: moebius -root \n\
- moire -root \n\
- GL: morph3d -root \n\
- mountain -root \n\
- munch -root \n\
penrose -root \n\
- GL: pipes -root \n\
- rd-bomb -root \n\
- GL: rubik -root \n\
- sierpinski -root \n\
- slip -root \n\
- GL: sproingies -root \n\
- starfish -root \n\
- strange -root \n\
- swirl -root \n\
- triangle -root \n\
- xjack -root \n\
xlyap -root \n\
- GL: atlantis -root \n\
bsod -root \n\
- GL: bubble3d -root \n\
- GL: cage -root \n\
- crystal -root \n\
- cynosure -root \n\
- discrete -root \n\
- distort -root \n\
- epicycle -root \n\
- flow -root \n\
- GL: glplanet -root \n\
- interference -root \n\
- kumppa -root \n\
- GL: lament -root \n\
- moire2 -root \n\
- GL: sonar -root \n\
- GL: stairs -root \n\
- truchet -root \n\
- vidwhacker -root \n\
blaster -root \n\
bumps -root \n\
ccurve -root \n\
- compass -root \n\
- deluxe -root \n\
- demon -root \n\
- GL: extrusion -root \n\
- loop -root \n\
- penetrate -root \n\
- petri -root \n\
- phosphor -root \n\
- GL: pulsar -root \n\
- ripples -root \n\
shadebobs -root \n\
- GL: sierpinski3d -root \n\
- spotlight -root \n\
- squiral -root \n\
- wander -root \n\
- webcollage -root \n\
- xflame -root \n\
- xmatrix -root \n\
- GL: gflux -root \n\
- nerverot -root \n\
- xrayswarm -root \n\
- xspirograph -root \n\
- GL: circuit -root \n\
- GL: dangerball -root \n\
- GL: engine -root \n\
- GL: flipscreen3d -root \n\
- GL: gltext -root \n\
- GL: menger -root \n\
- GL: molecule -root \n\
- rotzoomer -root \n\
- speedmine -root \n\
- GL: starwars -root \n\
- GL: stonerview -root \n\
- vermiculate -root \n\
- whirlwindwarp -root \n\
- zoom -root \n\
- anemone -root \n\
apollonian -root \n\
- GL: boxed -root \n\
- GL: cubenetic -root \n\
- GL: endgame -root \n\
- euler2d -root \n\
- fluidballs -root \n\
- GL: flurry -root \n\
- GL: glblur -root \n\
- GL: glsnake -root \n\
- halftone -root \n\
- GL: juggler3d -root \n\
- GL: lavalite -root \n\
- polyominoes -root \n\
- GL: queens -root \n\
- GL: sballs -root \n\
- GL: spheremonics -root \n\
- thornbird -root \n\
- twang -root \n\
- GL: antspotlight -root \n\
apple2 -root \n\
- GL: atunnel -root \n\
barcode -root \n\
- GL: blinkbox -root \n\
- GL: blocktube -root \n\
- GL: bouncingcow -root \n\
- cloudlife -root \n\
- GL: cubestorm -root \n\
- eruption -root \n\
- GL: flipflop -root \n\
- GL: flyingtoasters -root \n\
- fontglide -root \n\
- GL: gleidescope -root \n\
- GL: glknots -root \n\
- GL: glmatrix -root \n\
- GL: glslideshow -root \n\
- GL: hypertorus -root \n\
- GL: jigglypuff -root \n\
metaballs -root \n\
- GL: mirrorblob -root \n\
- piecewise -root \n\
- GL: polytopes -root \n\
- pong -root \n\
- popsquares -root \n\
- GL: surfaces -root \n\
- xanalogtv -root \n\
abstractile -root \n\
anemotaxis -root \n\
- GL: antinspect -root \n\
- fireworkx -root \n\
- fuzzyflakes -root \n\
- interaggregate -root \n\
- intermomentary -root \n\
- memscroller -root \n\
- GL: noof -root \n\
- pacman -root \n\
- GL: pinion -root \n\
- GL: polyhedra -root \n\
- GL: providence -root \n\
- substrate -root \n\
- wormhole -root \n\
- GL: antmaze -root \n\
- GL: boing -root \n\
boxfit -root \n\
- GL: carousel -root \n\
- celtic -root \n\
- GL: crackberg -root \n\
- GL: cube21 -root \n\
fiberlamp -root \n\
- GL: fliptext -root \n\
- GL: glhanoi -root \n\
- GL: tangram -root \n\
- GL: timetunnel -root \n\
- GL: glschool -root \n\
- GL: topblock -root \n\
- GL: cubicgrid -root \n\
- cwaves -root \n\
- GL: gears -root \n\
- GL: glcells -root \n\
- GL: lockward -root \n\
- m6502 -root \n\
- GL: moebiusgears -root \n\
- GL: voronoi -root \n\
- GL: hypnowheel -root \n\
- GL: klein -root \n\
- lcdscrub -root \n\
- GL: photopile -root \n\
- GL: skytentacles -root \n\
- GL: rubikblocks -root \n\
- GL: companioncube -root \n\
- GL: hilbert -root \n\
- GL: tronbit -root \n\
- GL: geodesic -root \n\
- hexadrop -root \n\
- GL: kaleidocycle -root \n\
- GL: quasicrystal -root \n\
- GL: unknownpleasures -root \n\
binaryring -root \n\
- GL: cityflow -root \n\
- GL: geodesicgears -root \n\
- GL: projectiveplane -root \n\
- GL: romanboy -root \n\
- tessellimage -root \n\
- GL: winduprobot -root \n\
- GL: splitflap -root \n\
- GL: cubestack -root \n\
- GL: cubetwist -root \n\
- GL: discoball -root \n\
- GL: dymaxionmap -root \n\
- GL: energystream -root \n\
- GL: hexstrut -root \n\
- GL: hydrostat -root \n\
- GL: raverhoop -root \n\
- GL: splodesic -root \n\
- GL: unicrud -root \n\
pointerPollTime: 0:00:05
pointerHysteresis: 10
windowCreationTimeout:0:00:30
initialDelay: 0:00:00
GetViewPortIsFullOfLies:False
procInterrupts: True
xinputExtensionDev: False
overlayStderr: True
authWarningSlack: 20
EOF
else
sed -ie 's/\(timeout:\s*\)\S*\s*$/\1\t0:30:00/' $file
fi
done
fond admin.png

93.8 KB | W: | H:

fond admin.png

93.8 KB | W: | H:

fond admin.png
fond admin.png
fond admin.png
fond admin.png
  • 2-up
  • Swipe
  • Onion skin
#!/bin/bash
# from https://askubuntu.com/questions/458194/switching-to-hdmi-audio-when-hdmi-is-plugged-into-a-laptop-14-04
# Get rights to access display
user=$(who | grep -v "root" | head -n 1 | cut -d ' ' -f 1)
if [ ! -z "$user" ]
then
id=$(id -u $user)
export DISPLAY=:0
export XAUTHORITY="/home/$user/.Xauthority"
fi
pulsecmd(){
cmd=$1
shift
if [ $cmd == "pactl" ]
then
cmd="$cmd --server unix:/run/user/$id/pulse/native"
fi
# set -x
if [ "$(whoami)" != "root" ]
then
$cmd $@
else
sudo -u $user XDG_RUNTIME_DIR="/run/user/$id/" $cmd $@
fi
# set +x
}
HDMI_STATUS=`grep "^connected$" /sys/class/drm/card0/*HDMI*/status`
HEADPHONE_STATUS=`pulsecmd pacmd list-sinks | grep "headphones.*available: yes"`
INPUTS=$(pulsecmd pacmd list-sink-inputs | grep index | awk '{print $2}')
# Compute output name
echo $INPUTS
if [ ! -z "$HDMI_STATUS" ] && [ -z "$HEADPHONE_STATUS" ]
then
name="hdmi"
plusname=".monitor"
type="output"
else
name="analog"
type="input"
fi
name="$name-stereo"
echo "name $name"
card=`pulsecmd pacmd list-cards | grep device.bus_path | head -n 1 | awk '{print $3}' \
| sed -e 's/"//g' -e 's/:/_/g' `
echo "card $card"
output="alsa_output.$card.$name"
echo "out $output"
io=`pulsecmd pacmd list-cards | grep "output:$name.*input:" | awk '{print $1}' \
| head -n 1 | sed 's/:$//' `
if [ -z "$io" ]
then
# Io does not support input mode
io=`pulsecmd pacmd list-cards | grep "output:$name" | awk '{print $1}' \
| head -n 1 | sed 's/:$//' `
fi
echo "io $io"
# Iterate over all cards
for i in $(seq 0 $(($(pulsecmd pacmd list-cards | grep index |wc -l)-1)))
do
# Set profile or turn card off
pulsecmd pactl set-card-profile $i $io
if [ $? -ne 0 ]
then
pulsecmd pactl set-card-profile $i off
else
pulsecmd pactl set-default-sink $output
pulsecmd pactl set-source-mute alsa_$type.$card.$name$plusname 1
fi
done
# Move all sources to the right sink
for i in $INPUTS
do
pulsecmd pacmd move-sink-input $i $output
done
#!/bin/bash
if [ -z "$(dpkg -l | grep catfish)" ]
then
export DEBIAN_FRONTEND=noninteractive
apt-get install -y catfish
fi
USERS="prof direction administrateur"
for u in $USERS
do
launcher_path="/home/$u/.config/xfce4/panel/launcher-18/catfish.desktop"
mkdir -p /home/$u/.config/xfce4/panel/launcher-18
cp /usr/share/applications/catfish.desktop $launcher_path
xml_path="/home/$u/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
if [ -z "`grep plugin-18 $xml_path`" ]
then
sed -i.bak \
-e 's@\(\s*\)\(<value type="int" value="2"/>\)@\1<value type="int" value="18"/>\n\1\2@' \
$xml_path
tmp_path="/tmp/$$"
head -n -2 $xml_path > $tmp_path
cat << EOF >> $tmp_path
<property name="plugin-18" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="catfish.desktop"/>
</property>
</property>
</property>
</channel>
EOF
mv /tmp/$$ $xml_path
chown -R $u:$u $xml_path
chown $u:$u $xml_path
fi
done
#!/bin/bash
USERS="prof direction administrateur"
for u in $USERS
do
launcher_path="/home/$u/.config/xfce4/panel/launcher-11/15502394761.desktop"
mkdir -p /home/$u/.config/xfce4/panel/launcher-11
cat << EOF > $launcher_path
[Desktop Entry]
Version=1.0
Type=Application
Name=Assistance Informatique
Comment=
Exec=/usr/bin/conky
Icon=4137_winhlp32.0
Path=
Terminal=false
StartupNotify=false
EOF
xml_path="/home/$u/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
if [ -z "`grep plugin-11 $xml_path`" ]
then
sed -i.bak \
-e 's@\(\s*\)\(<value type="int" value="2"/>\)@\1\2\n\1<value type="int" value="11"/>@' \
$xml_path
tmp_path="/tmp/$$"
head -n -2 $xml_path > $tmp_path
cat << EOF >> $tmp_path
<property name="plugin-11" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="15502394761.desktop"/>
</property>
</property>
</property>
</channel>
EOF
mv /tmp/$$ $xml_path
chown -R $u:$u $xml_path
chown $u:$u $xml_path
fi
done
#!/bin/bash
DIR=$(realpath $(dirname $0))
USERS="01-mini 02-super 03-maxi prof"
if [ -z "$(dpkg -l | grep orca)" ]
then
apt-get update
apt-get install -y gnome-orca speech-dispatcher-espeak-ng python3-yaml
fi
for u in $USERS
do
confdir="/home/$u/.local/share/orca/"
mkdir -p $confdir
cp $DIR/orca.conf $confdir/user-settings.conf
chown -R $u:$u $confdir
done
$DIR/add_to_handy_menu.py $DIR/orca.desktop "Accessibilité langue" mini maxi super prof
#!/bin/bash
# Already configured, abort
if [ "$1" != "force" ] && [ -e "/etc/systemd/system/vnc.service" ]
then
exit
fi
tftp ecole-dc <<'EOF'
get vnc.passwd
quit
EOF
mv vnc.passwd /etc/.vnc.passwd
chown administrateur:administrateur /etc/.vnc.passwd
chmod 600 /etc/.vnc.passwd
cp vnc.service /etc/systemd/system/
systemctl daemon-reload
systemctl start vnc
systemctl enable vnc
......@@ -4,20 +4,26 @@ application/vnd.ms-excel=libreoffice-calc.desktop;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-startcenter.desktop;
application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop;
application/vnd.oasis.opendocument.graphics=libreoffice-draw.desktop;
image/jpeg=mirage.desktop;
image/jpeg=shutter.desktop;
image/gif=shutter.desktop;
image/png=shutter.desktop;
image/tiff=shutter.desktop;
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
application/vnd.openxmlformats-officedocument.presentationml.presentation=libreoffice-impress.desktop;
application/vnd.oasis.opendocument.presentation=libreoffice-impress.desktop;
inode/directory=exo-file-manager.desktop
inode/directory=pcmanfm.desktop
x-scheme-handler/trash=exo-file-manager.desktop
application/msword=libreoffice-writer.desktop;
inode/directory=vlc.desktop
x-content/audio-cdda=vlc.desktop
x-content/audio-player=vlc.desktop
audio/mpeg=vlc.desktop
audio/x-mpegurl=vlc.desktop
audio/x-scpls=vlc.desktop
audio/x-vorbis+ogg=vlc.desktop
audio/x-wav=vlc.desktop
audio/x-flac=vlc.desktop
audio/midi=vlc.desktop
video/mp4=vlc.desktop
video/mpeg=vlc.desktop
video/mp2t=vlc.desktop
......@@ -29,7 +35,6 @@ video/x-flv=vlc.desktop
video/x-matroska=vlc.desktop
video/x-mpeg=vlc.desktop
video/x-ogm+ogg=vlc.desktop
inode/directory=caja-folder-handler.desktop;vlc.desktop;
audio/mpeg=vlc.desktop;
audio/x-mpegurl=vlc.desktop;
audio/x-scpls=vlc.desktop;
......
[Unit]
Description=Mount ecole-dc sharing
After=multi-user.target
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
......
#!/bin/bash
[ `grep -c '^//ecole-dc/' /etc/mtab` -gt 0 ] && exit 0
# Ensure ecole-dc is reachable before mounts
while ! ping -c 1 ecole-dc > /dev/null 2>&1
do
echo "Cannot reach ecole-dc, waiting 10 sec"
sleep 10
done
#[ `grep -c '^//ecole-dc/' /etc/mtab` -gt 0 ] && exit 0
awk '/^\/\/ecole-dc/{print $2}' /etc/fstab | \
while read dest
do
umount -f $dest
mount $dest
done
# The settings in this file are used by the program ntpdate-debian, but not
# by the upstream program ntpdate.
# Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
# so you only have to keep it in one place.
NTPDATE_USE_NTP_CONF=yes
# List of NTP servers to use (Separate multiple servers with spaces.)
# Not used if NTPDATE_USE_NTP_CONF is yes.
#NTPSERVERS="0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org"
NTPSERVERS="pedago.ecole.lan"
# Additional options to pass to ntpdate
NTPOPTIONS="-u"
{
"pronunciations": {},
"profiles": {
"default": {
"voices": {
"default": {
"family": {
"dialect": null,
"name": "voix par d\u00e9faut espeak-ng",
"locale": "fr"
}
},
"system": {
"established": false
},
"hyperlink": {
"established": false
},
"uppercase": {
"average-pitch": 7.0
}
},
"speechServerFactory": "orca.speechdispatcherfactory",
"keybindings": {},
"speechServerInfo": [
"espeak-ng",
"espeak-ng"
],
"pronunciations": {},
"profile": [
"Default",
"default"
],
"brailleContractionTable": "/usr/share/liblouis/tables/en-us-interline.ctb"
}
},
"keybindings": {},
"general": {
"enablePauseBreaks": true,
"enableFlashMessages": true,
"enableContractedBraille": false,
"speakCellSpan": true,
"enableBraille": true,
"enableSpeechIndentation": false,
"beepProgressBarUpdates": false,
"layoutMode": true,
"structNavTriggersFocusMode": false,
"speakCellCoordinates": true,
"presentToolTips": false,
"ignoreStatusBarProgressBars": true,
"speakNumbersAsDigits": false,
"enableTutorialMessages": false,
"structNavInSayAll": false,
"caretNavTriggersFocusMode": false,
"enableEchoByCharacter": false,
"enableBrailleMonitor": false,
"soundVolume": 0.5,
"brailleLinkIndicator": 192,
"chatAnnounceBuddyTyping": false,
"presentTimeFormat": "%X",
"playSoundForState": false,
"mouseDwellDelay": null,
"enableMnemonicSpeaking": false,
"brailleFlashTime": 5000,
"brailleContractionTable": "",
"flashIsDetailed": true,
"rewindAndFastForwardInSayAll": false,
"enableEchoByWord": false,
"brailleVerbosityLevel": 1,
"chatSpeakRoomName": false,
"verbalizePunctuationStyle": 1,
"findResultsVerbosity": 2,
"startingProfile": [
"Default",
"default"
],
"playSoundForPositionInSet": false,
"keyboardLayout": 1,
"speakMultiCaseStringsAsWords": false,
"wrappedStructuralNavigation": true,
"skipBlankCells": false,
"enabledBrailledTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; text-spelling:none;",
"enableSpeech": true,
"speakMisspelledIndicator": true,
"enableMouseReview": false,
"enableSpace": true,
"disableBrailleEOL": false,
"orcaModifierKeys": [
"Insert",
"KP_Insert"
],
"readFullRowInDocumentTable": true,
"speakProgressBarUpdates": true,
"readFullRowInGUITable": true,
"enableSound": true,
"brailleAlignmentStyle": 0,
"progressBarUpdateInterval": 10,
"textAttributesBrailleIndicator": 0,
"enablePositionSpeaking": false,
"speechServerInfo": null,
"enableBrailleContext": true,
"spellcheckPresentContext": true,
"profile": [
"Default",
"default"
],
"speechVerbosityLevel": 1,
"messagesAreDetailed": true,
"structuralNavigationEnabled": true,
"chatMessageVerbosity": 0,
"enableDiacriticalKeys": false,
"onlySpeakDisplayedText": false,
"capitalizationStyle": "none",
"brailleRolenameStyle": 1,
"voices": {
"default": {
"established": false
},
"uppercase": {
"average-pitch": 7.0
},
"hyperlink": {
"established": false
},
"system": {
"established": false
}
},
"speechServerFactory": "speechdispatcherfactory",
"enableKeyEcho": true,
"speakSpreadsheetCoordinates": true,
"largeObjectTextLength": 75,
"findResultsMinimumLength": 4,
"enableModifierKeys": true,
"enabledSpokenTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; paragraph-style:; text-spelling:none; fg-color:; bg-color:;",
"brailleSelectorIndicator": 192,
"enableActionKeys": true,
"readFullRowInSpreadSheet": false,
"speakCellHeaders": true,
"enablePunctuationKeys": true,
"brailleProgressBarUpdates": false,
"enableAlphabeticKeys": true,
"enableNavigationKeys": false,
"progressBarVerbosity": 1,
"activeProfile": [
"Default",
"default"
],
"playSoundForValue": false,
"chatRoomHistories": false,
"useColorNames": true,
"presentDateFormat": "%x",
"spellcheckSpellSuggestion": true,
"spellcheckSpellError": true,
"flashIsPersistent": false,
"speakBlankLines": true,
"enableEchoBySentence": false,
"enableFunctionKeys": true,
"playSoundForRole": false,
"enableNumericKeys": true,
"sayAllStyle": 1
}
}
[Desktop Entry]
Name=Orca
Name[fr]=Orca
GenericName[fr]=Lecteur d'écran
Exec=/usr/bin/orca --replace
Icon=orca
#!/bin/bash
DIR=$(realpath $(dirname $0))
user=$(who | grep -v "root" | head -n 1 | cut -d ' ' -f 1)
if [ ! -z "$user" ]
then
id=$(id -u $user)
export DISPLAY=:0
export XAUTHORITY="/home/$user/.Xauthority"
fi
pacmd(){
# set -x
cmd="pactl --server unix:/run/user/$id/pulse/native $@"
if [ "$(whoami)" != "root" ]
then
$cmd
else
sudo -u $user XDG_RUNTIME_DIR="/run/user/$id/" $cmd
fi
# set +x
}
# Initial config
$DIR/hdmi_sound_toggle.sh
date=$(date +%Y%m%d%H%M%S)
pacmd subscribe | while read line
do
ndate=$(date +%Y%m%d%H%M%S)
if [ $ndate != $date ]
then
$DIR/hdmi_sound_toggle.sh
fi
date=$ndate
done
......@@ -18,6 +18,7 @@
DIR=$(dirname $0)
cd $DIR
./fix_network.sh
export HTTPS_PROXY="http://dnsproxy:3128"
git pull
./do_postinstall.sh
#!/bin/bash
logfile="/var/log/`basename $0`_`date +%Y%m%d-%H%M`"
exec &> >(tee -a "$logfile")
# Usage test_and_fail $? "message"
# If the return code is not 0, fails displaying the message
function test_and_fail(){
code=$1
shift
if [ $code -ne 0 ]
then
echo $@
exit $code
fi
}
if [ `whoami` != "root" ]
then
echo "This script should be run as root"
......@@ -6,6 +21,10 @@ then
fi
DIR=`dirname $0`
echo "Fixing network issues"
$DIR/fix_network.sh
NEW_USERS="prof direction"
USERS="01-mini 02-super 03-maxi administrateur $NEW_USERS"
declare -A USER_COMMENTS
......@@ -24,35 +43,53 @@ PROXY_URL="http://dnsproxy:3128"
echo "Installating packages"
apt-get update
apt-get -y install \
test_and_fail $? "Cannot update apt cache"
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y upgrade
test_and_fail $? "Cannot run upgrade"
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
test_and_fail $? "Cannot run dist upgrade"
logicielsAllFile="/usr/local/bin/primtux/logiciels-all"
if [ -x "$logicielsAllFile" ]
then
export DEBIAN_FRONTEND='noninteractive'
$logicielsAllFile
else
additionalSoftwares=$(cat $logicielsAllFile)
fi
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y install \
appliplanet-primtux \
ardora-primtux \
cifs-utils \
conky \
cups-browsed \
evince \
flash-primtux \
libdvdcss2 \
libreoffice-gtk \
logiciels-primtux-maxi \
logiciels-primtux-mini \
logiciels-primtux-super \
netcat \
oracle-java8-installer \
openjdk-8-jre \
openjdk-8-jdk \
photofiltre-primtux \
polices-ecole-primtux \
tftp \
thunderbird \
thunderbird-l10n-fr \
webstrict-primtux \
vlc-plugin-fluidsynth \
x11vnc \
xnview
apt-get -y remove --purge \
dansguardian \
xnview \
$additionalSoftwares
test_and_fail $? "Cannot install required packages"
DEBIAN_FRONTEND='noninteractive' apt-get -y remove --purge \
ctparental \
dillo \
proxy-protect-firefox-esr \
tinyproxy \
webstrict-primtux \
xournal \
xpdf
apt-get -y autoremove --purge
systemctl disable dnsmasq
echo "Adding x11vnc"
cp $DIR/x11vnc.desktop /usr/share/applications/
......@@ -83,8 +120,6 @@ do
echo $preffile
sed -i.bak -e '/user_pref("network.proxy.type")/d' $preffile
echo 'user_pref("network.proxy.type", 4);' >> $preffile
# Script session de Eric
sudo -u $u /usr/local/bin/session.sh
done
echo "Adding apt proxy"
......@@ -98,12 +133,27 @@ for u in $USERS
do
for prog in $MANUAL_APP_TO_REMOVE
do
find ~$u -name "seamonkey*" -exec rm -rf {} \;
find /home/$u -name "*$prog*" -exec rm -rf {} \;
done
done
echo "Fixing network issues"
$DIR/fix_network.sh
$DIR/fix_libreoffice.sh
# Copy .config files
echo "Copying conf files"
OLDDIR=$PWD
cd $DIR/config
for u in *
do
cd $u
for f in `find . -type f`
do
dir="/home/$u/.config/`dirname $f`"
mkdir -p $dir
cp -v $f $dir