secours-catholique

Des scripts pour aider à l'installation des postes en libre service du secours catholique de calais - retour accueil

git clone git://bebou.netlib.re/secours-catholique
Log | Files | Refs |

makeuserfile (843B)


      1 #! /bin/sh
      2 
      3 set -e
      4 
      5 name="$1";locale="$2";layout="$3";dir="$4"
      6 homefolder=$(find /home -mindepth 1 -maxdepth 1 -type d | grep "$name")
      7 
      8 <<-. cat > "$dir/users/$name"
      9 [org.freedesktop.DisplayManager.AccountsService]
     10 BackgroundFile='/usr/share/images/desktop-base/desktop-background'
     11 
     12 [User]
     13 Language=$locale
     14 Session=
     15 XSession=lightdm-xsession
     16 Icon=$dir/icons/$icon
     17 SystemAccount=false
     18 .
     19 
     20 <<. cat > "$homefolder/.xsessionrc"
     21 LC_ALL=$locale
     22 export GDM_LANG=$locale
     23 export LANG=$locale
     24 .
     25 
     26 mkdir -p "$homefolder/.config/autostart"
     27 <<. cat > "$homefolder/.config/autostart/keyboard.desktop"
     28 [Desktop Entry]
     29 Type=Application
     30 Name=keyboard
     31 Exec=dconf write /org/gnome/libgnomekbd/keyboard/layouts "$layout"
     32 .
     33 username=$(echo "$homefolder" | xargs basename)
     34 chmod +x "$homefolder/.config/autostart/keyboard.desktop"
     35 chown -R "$username" "$homefolder"
     36