Advertisement
s243a

LN#430-454 of tazx (/usr/bin -- TazPup FileSystem)

Mar 5th, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. # ~/.config/slitaz/applications.conf: Missing = failed to login
  2. # Make users applications.conf in /etc/skel so new added user will get
  3. # a working X session. Note --> flavors can have a custom config in
  4. # /etc/slitaz/applications that we must use.
  5.  
  6. slitaz_apps_conf() {
  7.     apps_conf=/etc/slitaz/applications.conf
  8.  
  9.     [ -f $apps_conf ] || inst_pkg slitaz-configs --forced
  10.  
  11.     if [ "$(id -u)" -eq 0 ]; then
  12.         user_conf="$apps_conf"
  13.         new_user_conf='/etc/skel/.config/slitaz/applications.conf'
  14.         mkdir -p $(dirname $new_user_conf)
  15.         cp -f $apps_conf $new_user_conf
  16.     else
  17.         # If started by: startx and with boot opts screen=text
  18.         user_conf="${XDG_CONFIG_HOME:-$HOME/.config}/slitaz/applications.conf"
  19.         if [ ! -f "$user_conf" ]; then
  20.             mkdir -p $(dirname $user_conf)
  21.             cp $apps_conf $user_conf
  22.         fi
  23.     fi
  24.     [ -f "$HOME/.xinitrc" ] || inst_pkg slitaz-configs-base --forced
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement