Working version on Linux Mint

parent ae3d47ac
#!/bin/bash
USERS="01-mini 02-super 03-maxi prof direction"
DIR=$(realpath $(dirname $0))
USERS="direction"
for u in $USERS
do
if [ -z "`grep '^exec /usr/local/bin/session.sh' /home/$u/.fluxbox/startup `" ]
then
sed -i -e 's@^exec fluxbox$@exec /usr/local/bin/session.sh \&\nexec fluxbox@' /home/$u/.fluxbox/startup
fi
cat <<EOF >/home/$u/.config/autostart/mounts.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Montages reseau
Comment=
Exec=$DIR/session.sh
Icon=4137_winhlp32.0
Path=
Terminal=false
StartupNotify=false
EOF
done
......@@ -24,7 +24,7 @@ for usr in 01-mini 02-super 03-maxi
do
mkdir -p /home/shares/$usr/ELEVES
mkdir -p /home/shares/$usr/PROFESSEURS
chown -R $usr:$usr /home/shares/$usr
chown -R direction:direction /home/shares/$usr
lvl=${LEVELS[$usr]}
if [ $lvl != 'CP' ]
then
......
......@@ -16,7 +16,7 @@ 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
git clone --branch Mint https://gitecoles.grenoble.fr/grenoble/primtux-eole
cd primtux-eole
DIR=$PWD
......
......@@ -2,17 +2,19 @@
USERS="administrateur 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"
for profile in `awk -F = '/^Path/{print $2}' /home/$u/.mozilla/firefox/profiles.ini`
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
echo "$u uses profile $profile"
preffile="/home/$u/.mozilla/firefox/$profile/prefs.js"
echo $preffile
for pref in "browser.newtabpage.activity-stream.feeds.section.highlights" "browser.newtabpage.activity-stream.feeds.topsites"
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
done
#!/bin/bash
add-apt-repository ppa:libreoffice/ppa
export https_proxy="http://dnsproxy:3128"
export http_proxy="http://dnsproxy:3128"
add-apt-repository -y ppa:libreoffice/ppa
key=$(apt-get update 2> /dev/null | grep NO_PUBKEY | rev | cut -d ' ' -f 1 | rev)
apt-key adv --keyserver-options http-proxy=$http_proxy --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys $key
apt-get update
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y upgrade
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
#!/bin/bash
cat << EOF> /etc/lightdm/slick-greeter.conf
[Greeter]
activate-numlock=true
EOF
#!/bin/bash
# TODO install package
apt-get update
if [ -z "$(dpkg -l | grep language-selector-common)" ]
then
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y install \
language-selector-common
fi
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y install \
$(check-language-support)
#!/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
launcher_path="/usr/share/applications/conky.desktop"
cat << EOF > $launcher_path
[Desktop Entry]
Version=1.0
Type=Application
......@@ -17,26 +14,8 @@ 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
for u in $USERS
do
echo TODO set conky in cinnamon applet
done
......@@ -41,13 +41,14 @@ DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y
conky \
cups-browsed \
libdvdcss2 \
language-selector-common \
netcat \
numlockx \
tftp \
ttf-mscorefonts-installer \
vlc \
vlc-plugin-fluidsynth \
x11vnc \
xnview \
x11vnc
test_and_fail $? "Cannot install required packages"
echo "Adding x11vnc"
......
......@@ -31,3 +31,4 @@ run_script fix_firefox.sh
run_script fix_proxy.sh
run_script register.sh
run_script install_polices.sh
run_script fix_locales.sh
#!/bin/bash
for u in prof direction administrateur root
for u in direction administrateur root
do
pass=$(zenity --title "pré installation" --text "Veuillez entrer le nouveau mot de passe $u" --entry)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment