slitaz-tools rev 939

tazbox: fix subox icon when ~/.local/share/applications is absent; fix working with freegeoip; write full list of icons used; all other files: 2015 and insert blank lines.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Apr 17 07:35:02 2015 +0300 (2015-04-17)
parents 7bda33bbdf48
children 6ca520c64f35
files applications/burn-box.desktop applications/passwd.desktop applications/slitaz-logout.desktop applications/tazbox-manage_i18n.desktop applications/tazbox-tz.desktop boxes/burn-box boxes/scp-box boxes/wifi-box etc/init.d/firewall icons.list jwm/jwm-menu tazbox/tazbox tazdrop/tazdrop tinyutils/browser tinyutils/decode tinyutils/editor tinyutils/file-manager tinyutils/frugal tinyutils/history tinyutils/hwsetup tinyutils/setmixer tinyutils/slitaz-config tinyutils/startd tinyutils/stopd tinyutils/subox tinyutils/tazhw tinyutils/tazkeymap tinyutils/tazlocale tinyutils/tazx tinyutils/terminal
line diff
     1.1 --- a/applications/burn-box.desktop	Sat Apr 11 16:46:26 2015 +0300
     1.2 +++ b/applications/burn-box.desktop	Fri Apr 17 07:35:02 2015 +0300
     1.3 @@ -8,5 +8,5 @@
     1.4  Comment=Burn ISO images or audio tracks to CD or DVD
     1.5  Comment[ru]=Запись образа ISO или аудио-дорожек на CD или DVD
     1.6  Exec=burn-box
     1.7 -Icon=media-optical-burn
     1.8 +Icon=burn-box
     1.9  Categories=GTK;Utility;AudioVideo;DiscBurning;
     2.1 --- a/applications/passwd.desktop	Sat Apr 11 16:46:26 2015 +0300
     2.2 +++ b/applications/passwd.desktop	Fri Apr 17 07:35:02 2015 +0300
     2.3 @@ -6,5 +6,5 @@
     2.4  Name[pt_BR]=Mudar Senha de Usuário
     2.5  Name[ru]=Пароль учётной записи
     2.6  Exec=terminal -h -T Passwd -geometry 60x10 -e passwd
     2.7 -Icon=password
     2.8 +Icon=user_auth
     2.9  Categories=ConsoleOnly;Settings;DesktopSettings;
     3.1 --- a/applications/slitaz-logout.desktop	Sat Apr 11 16:46:26 2015 +0300
     3.2 +++ b/applications/slitaz-logout.desktop	Fri Apr 17 07:35:02 2015 +0300
     3.3 @@ -17,5 +17,5 @@
     3.4  Name[zh_CN]=注销
     3.5  Name[zh_TW]=登出
     3.6  Exec=tazbox logout
     3.7 -Icon=slitaz-logout
     3.8 +Icon=system-shutdown-panel-restart
     3.9  StartupNotify=false
     4.1 --- a/applications/tazbox-manage_i18n.desktop	Sat Apr 11 16:46:26 2015 +0300
     4.2 +++ b/applications/tazbox-manage_i18n.desktop	Fri Apr 17 07:35:02 2015 +0300
     4.3 @@ -3,5 +3,5 @@
     4.4  Name=Manage locale packages
     4.5  Name[ru]=Управление пакетами локалей
     4.6  Exec=tazbox su "tazbox manage_i18n"
     4.7 -Icon=config-language
     4.8 +Icon=preferences-desktop-locale
     4.9  Categories=GTK;Settings;DesktopSettings;
     5.1 --- a/applications/tazbox-tz.desktop	Sat Apr 11 16:46:26 2015 +0300
     5.2 +++ b/applications/tazbox-tz.desktop	Fri Apr 17 07:35:02 2015 +0300
     5.3 @@ -6,5 +6,5 @@
     5.4  Name[pt_BR]=Configuração de Zona Horária
     5.5  Name[ru]=Часовой пояс
     5.6  Exec=tazbox su "tazbox tz"
     5.7 -Icon=time
     5.8 +Icon=preferences-system-time
     5.9  Categories=GTK;Settings;DesktopSettings;
     6.1 --- a/boxes/burn-box	Sat Apr 11 16:46:26 2015 +0300
     6.2 +++ b/boxes/burn-box	Fri Apr 17 07:35:02 2015 +0300
     6.3 @@ -4,30 +4,38 @@
     6.4  # window uncluttered and use a wizard to create audio/video/data CD/DVD.
     6.5  # The main box lets users burn an ISO and audio files from a single directory.
     6.6  #
     6.7 -# Copyright (C) 2012-2014 SliTaz GNU/Linux - BSD License
     6.8 +# Copyright (C) 2012-2015 SliTaz GNU/Linux - BSD License
     6.9  #
    6.10  # Author: Christophe Lincoln <pankso@slitaz.org>
    6.11  #
    6.12 +
    6.13  . /lib/libtaz.sh
    6.14  export TEXTDOMAIN='slitaz-boxes' # i18n
    6.15  
    6.16 +
    6.17  # LibTaz parser and store options. Burn-box can be used with an ISO image
    6.18  # or an audio directory in option: burn-box --iso=/path/to/image.iso
    6.19 +
    6.20  [ "$iso" ] || iso=" "
    6.21  [ "$audio" ] || audio="$HOME"
    6.22  
    6.23 +
    6.24  # Internal variables
    6.25 +
    6.26  boxopts="--height=300 --width=620"
    6.27  icon=media-optical-dvd-rw
    6.28  options="-eject -multi"
    6.29  speed=$(fgrep "drive speed" /proc/sys/dev/cdrom/info | cut -f3)
    6.30  tmpdir=$(mktemp -d)
    6.31  
    6.32 +
    6.33  #
    6.34  # Functions
    6.35  #
    6.36  
    6.37 +
    6.38  # Help and usage
    6.39 +
    6.40  usage() {
    6.41  	newline; _ 'Burn-box a small front end to cdrkit powered by Yad/GTK.'
    6.42  	newline; boldify $(_ 'Usage:')
    6.43 @@ -52,14 +60,18 @@
    6.44  	newline
    6.45  }
    6.46  
    6.47 +
    6.48  # Ouput a command to a Yad/GTK box. Usage: cmd | out --title="Title" --tail
    6.49 +
    6.50  gtkout() {
    6.51  	yad --window-icon=$icon $boxopts \
    6.52  		--margins=4 --fontname=monospace \
    6.53  		--text-info "$@" --button="gtk-close:1"
    6.54  }
    6.55  
    6.56 +
    6.57  # Decode audio files with: decode [file]
    6.58 +
    6.59  decode_audio() {
    6.60  	_ 'Decoding files from: $audio'
    6.61  	for f in "$audio"/*.*
    6.62 @@ -78,7 +90,9 @@
    6.63  	done
    6.64  }
    6.65  
    6.66 +
    6.67  # Burn an ISO image.
    6.68 +
    6.69  burn_iso() {
    6.70  	if [ "${iso##*.}" != "iso" ]; then
    6.71  		_ 'Not an ISO image: "$iso"'; exit 1
    6.72 @@ -86,7 +100,9 @@
    6.73  	wodim -v speed=$speed $options "$iso"
    6.74  }
    6.75  
    6.76 +
    6.77  # Burn some audio tracks from a directory.
    6.78 +
    6.79  burn_audio() {
    6.80  	decode_audio
    6.81  	echo "TODO: check_size"
    6.82 @@ -95,7 +111,9 @@
    6.83  	rm -rf $tmpdir
    6.84  }
    6.85  
    6.86 +
    6.87  # Main GUI box function with pure Yad spec
    6.88 +
    6.89  burn_main() {
    6.90  	yad --title="$(_ 'Burn-box')" --window-icon=$icon $boxopts \
    6.91  		--image=$icon --image-on-top \
    6.92 @@ -111,7 +129,9 @@
    6.93  		--button="gtk-close:1"
    6.94  }
    6.95  
    6.96 +
    6.97  # Main function
    6.98 +
    6.99  burn() {
   6.100  	# Store box results
   6.101  	main=$(burn_main)
   6.102 @@ -138,6 +158,7 @@
   6.103  	fi
   6.104  }
   6.105  
   6.106 +
   6.107  #
   6.108  # Commands
   6.109  #
     7.1 --- a/boxes/scp-box	Sat Apr 11 16:46:26 2015 +0300
     7.2 +++ b/boxes/scp-box	Fri Apr 17 07:35:02 2015 +0300
     7.3 @@ -2,32 +2,40 @@
     7.4  #
     7.5  # SCP Box - Small front end to the secure file copy utility.
     7.6  #
     7.7 -# Copyright (C) 2008-2014 SliTaz GNU/Linux - BSD License
     7.8 +# Copyright (C) 2008-2015 SliTaz GNU/Linux - BSD License
     7.9  #
    7.10  # Author: Christophe Lincoln <pankso@slitaz.org>
    7.11  #
    7.12 +
    7.13  . /lib/libtaz.sh
    7.14  export TEXTDOMAIN='slitaz-boxes' # i18n
    7.15  
    7.16  [ "$file" ] || file="$HOME"
    7.17  [ "$dir" ] || dir="$HOME"
    7.18  
    7.19 +
    7.20  # Internal variables (we need a space before options).
    7.21 +
    7.22  config=$HOME/.config/scpbox
    7.23  term="terminal -geometry 80x16"
    7.24  scpopts=" -r -P 22"
    7.25  
    7.26 +
    7.27  # Make sure we have config files.
    7.28 +
    7.29  if [ ! -d "$config" ] || [ -f "$config/hosts" ]; then
    7.30  	mkdir -p $config
    7.31  	touch $config/hosts && chmod 0600 $config/hosts
    7.32  fi
    7.33  
    7.34 +
    7.35  #
    7.36  # Functions
    7.37  #
    7.38  
    7.39 +
    7.40  # Help and usage
    7.41 +
    7.42  usage() {
    7.43  	cat << EOT
    7.44  
    7.45 @@ -49,16 +57,20 @@
    7.46  EOT
    7.47  }
    7.48  
    7.49 +
    7.50  # List last used hosts.
    7.51 +
    7.52  list_hosts() {
    7.53  	for h in $(cat $config/hosts); do
    7.54  		echo -n "!$h"
    7.55  	done
    7.56  }
    7.57  
    7.58 +
    7.59  # Main GUI box function with pure Yad spec
    7.60 +
    7.61  scpbox_main() {
    7.62 -	icon=folder-remote
    7.63 +	icon='folder-remote'
    7.64  	yad --title="$(_n 'SCP Box')" --window-icon=$icon \
    7.65  		--width=400 \
    7.66  		--image=$icon --image-on-top \
    7.67 @@ -76,7 +88,9 @@
    7.68  		--button="gtk-close:1"
    7.69  }
    7.70  
    7.71 +
    7.72  # Main function
    7.73 +
    7.74  scpbox() {
    7.75  	# Store box results
    7.76  	main=$(scpbox_main)
    7.77 @@ -129,6 +143,7 @@
    7.78  	esac
    7.79  }
    7.80  
    7.81 +
    7.82  #
    7.83  # Commands
    7.84  #
     8.1 --- a/boxes/wifi-box	Sat Apr 11 16:46:26 2015 +0300
     8.2 +++ b/boxes/wifi-box	Fri Apr 17 07:35:02 2015 +0300
     8.3 @@ -4,10 +4,11 @@
     8.4  # is most important, this tool provides a quick way to connect or change Wi-Fi
     8.5  # settings while full network configuration is done in TazPanel.
     8.6  #
     8.7 -# Copyright (C) 2012-2014 SliTaz GNU/Linux - GNU GPL v2
     8.8 +# Copyright (C) 2012-2015 SliTaz GNU/Linux - GNU GPL v2
     8.9  #
    8.10  # Authors: Christophe Lincoln <pankso@slitaz.org>
    8.11  #
    8.12 +
    8.13  . /lib/libtaz.sh
    8.14  export TEXTDOMAIN='slitaz-boxes' #i18n
    8.15  
    8.16 @@ -18,7 +19,9 @@
    8.17  	newline
    8.18  }
    8.19  
    8.20 +
    8.21  # Start a Wi-Fi connection
    8.22 +
    8.23  start_wifi() {
    8.24  	sed -i \
    8.25  		-e s'/^DHCP=.*/DHCP="yes"/' \
    8.26 @@ -30,8 +33,10 @@
    8.27  	/etc/init.d/network.sh start
    8.28  }
    8.29  
    8.30 +
    8.31  # Catch ESSIDs and format output for GTK tree. We get the list of
    8.32  # networks by Cell and without spaces.
    8.33 +
    8.34  detect_wifi() {
    8.35  	if [ -d /sys/class/net/$WIFI_INTERFACE/wireless ]; then
    8.36  		ifconfig $WIFI_INTERFACE up
    8.37 @@ -69,7 +74,9 @@
    8.38  	fi
    8.39  }
    8.40  
    8.41 +
    8.42  # Prompt for password or connect
    8.43 +
    8.44  connect_main() {
    8.45  	case $keytype in
    8.46  		WPA)	label="$(_n 'WPA Password:')" ;;
    8.47 @@ -78,7 +85,7 @@
    8.48  	esac
    8.49  	case $keytype in
    8.50  		WPA|WEP)
    8.51 -			icon=network-wireless
    8.52 +			icon='network-wireless'
    8.53  			yad --title="$(_n 'Wi-Fi connection')" --window-icon=$icon \
    8.54  				--width=520 --height=140 --on-top --center \
    8.55  				--image=$icon --image-on-top \
    8.56 @@ -90,6 +97,7 @@
    8.57  	esac
    8.58  }
    8.59  
    8.60 +
    8.61  connect() {
    8.62  	main=$(connect_main)
    8.63  	ret=$?
    8.64 @@ -109,9 +117,11 @@
    8.65  	start_wifi
    8.66  }
    8.67  
    8.68 +
    8.69  # Main GUI box function with pure Yad spec
    8.70 +
    8.71  wifi_main() {
    8.72 -	icon=network-wireless
    8.73 +	icon='network-wireless'
    8.74  	detect_wifi | yad --title="$(_n 'Wi-Fi network')" --window-icon=$icon \
    8.75  		--width=520 --height=300 --on-top --center \
    8.76  		--image=$icon --image-on-top \
    8.77 @@ -123,7 +133,9 @@
    8.78  		--button="gtk-preferences:2" --button="gtk-close:1"
    8.79  }
    8.80  
    8.81 +
    8.82  # Main function
    8.83 +
    8.84  wifi() {
    8.85  	# Store box results
    8.86  	main=$(wifi_main)
    8.87 @@ -143,6 +155,7 @@
    8.88  	fi
    8.89  }
    8.90  
    8.91 +
    8.92  #
    8.93  # Script commands
    8.94  #
     9.1 --- a/etc/init.d/firewall	Sat Apr 11 16:46:26 2015 +0300
     9.2 +++ b/etc/init.d/firewall	Fri Apr 17 07:35:02 2015 +0300
     9.3 @@ -4,6 +4,7 @@
     9.4  # Configuration file   : /etc/slitaz/firewall.conf
     9.5  # Firewall script      : /etc/slitaz/firewall.sh
     9.6  #
     9.7 +
     9.8  . /etc/init.d/rc.functions
     9.9  . /etc/slitaz/firewall.conf
    9.10  
    9.11 @@ -13,6 +14,7 @@
    9.12  		#
    9.13  		if [ "$KERNEL_SECURITY" = "yes" ] ; then
    9.14  			echo -n "Setting up kernel security rules... "
    9.15 +
    9.16  			# ICMP redirects acceptance.
    9.17  			for conf in /proc/sys/net/ipv4/conf/*/accept_redirects ; do
    9.18  				echo "0" > $conf
    9.19 @@ -20,14 +22,17 @@
    9.20  			for conf in /proc/sys/net/ipv4/conf/*/secure_redirects ; do
    9.21  				echo "0" > $conf
    9.22  			done
    9.23 +
    9.24  			# IP source routing.
    9.25  			for conf in /proc/sys/net/ipv4/conf/*/accept_source_route ; do
    9.26  				echo "0" > $conf
    9.27  			done
    9.28 +
    9.29  			# Log impossible addresses.
    9.30  			for conf in /proc/sys/net/ipv4/conf/*/log_martians ; do
    9.31  				echo "1" > $conf
    9.32  			done
    9.33 +
    9.34  			# Ip spoofing protection
    9.35  			for conf in /proc/sys/net/ipv4/conf/*/rp_filter; do
    9.36  				echo "1" > $conf
    10.1 --- a/icons.list	Sat Apr 11 16:46:26 2015 +0300
    10.2 +++ b/icons.list	Fri Apr 17 07:35:02 2015 +0300
    10.3 @@ -1,23 +1,118 @@
    10.4 +#
    10.5 +# applications
    10.6 +#
    10.7 +
    10.8  # slitaz-logout.desktop
    10.9 -system-log-out: menu
   10.10 +system-shutdown-panel-restart: panel(22)
   10.11 +
   10.12  # burn-box.desktop
   10.13 -media-optical-burn: menu
   10.14 +burn-box: menu(16) big(48)
   10.15 +
   10.16  # burn-iso.desktop
   10.17 -iso-image-burn: menu
   10.18 +iso-image-burn: context-menu(16) big(48)?
   10.19 +
   10.20  # scp-box.desktop
   10.21 -folder-remote: menu
   10.22 +folder-remote: menu(16) big(48)
   10.23 +
   10.24 +# tazbox-tazapps.desktop
   10.25 +preferences-desktop-default-applications: menu(16) big(48)
   10.26 +
   10.27 +# slitaz-cofig.desktop
   10.28 +slitaz-icon: menu(16) big(48)
   10.29 +
   10.30  # wifi-box.desktop
   10.31 -network-wireless: menu
   10.32 +network-wireless: menu(16) big(48)
   10.33 +
   10.34  # gpl-license.desktop
   10.35 -text-x-readme: menu
   10.36 +text-x-readme: menu(16) big(48)
   10.37 +
   10.38  # passwd.desktop
   10.39 -user_auth: menu
   10.40 +user_auth: menu(16) big(48)
   10.41 +
   10.42  # tazbox-keymap.desktop
   10.43 -preferences-desktop-keyboard: menu
   10.44 +preferences-desktop-keyboard: menu(16) big(48)
   10.45 +
   10.46 +# tazbox-locale.desktop
   10.47 +preferences-desktop-locale: menu(16) big(48)
   10.48 +
   10.49  # tazbox-tz.desktop
   10.50 -preferences-system-time: menu
   10.51 -# tazbox-locale.desktop
   10.52 -preferences-desktop-locale: menu
   10.53 +preferences-system-time: menu(16) big(48)
   10.54 +
   10.55 +
   10.56 +#
   10.57 +# boxes
   10.58 +#
   10.59  
   10.60  # burn-box
   10.61 -media-optical-dvd-rw: window big
   10.62 +media-optical-dvd-rw: title(16) big(48)
   10.63 +
   10.64 +# scp-box
   10.65 +folder-remote: title(16) big(48)
   10.66 +gtk-close: button(16)
   10.67 +
   10.68 +# wifi-box
   10.69 +network-wireless: title(16) big(48)
   10.70 +gtk-preferences(16)
   10.71 +gtk-close(16)
   10.72 +
   10.73 +
   10.74 +#
   10.75 +# jwm
   10.76 +#
   10.77 +
   10.78 +# jwm-menu
   10.79 +applications-accessories.png
   10.80 +applications-internet.png
   10.81 +applications-graphics.png
   10.82 +applications-multimedia.png
   10.83 +applications-games.png
   10.84 +applications-development.png
   10.85 +text-x-generic.png
   10.86 +applications-system.png
   10.87 +
   10.88 +
   10.89 +#
   10.90 +# tazbox
   10.91 +#
   10.92 +
   10.93 +# tazbox
   10.94 +dialog-password: title(16) big(48)
   10.95 +dialog-error: title(16) big(48)
   10.96 +gtk-close: button(16)
   10.97 +dialog-information: title(16)
   10.98 +/usr/share/pixmaps/slitaz-icon.png: title(16) big(48)
   10.99 +system-log-out: button(16)
  10.100 +system-reboot: button(16)
  10.101 +system-shutdown: button(16)
  10.102 +locale: title(16) big(48)
  10.103 +preferences-desktop-locale: title(16) big(48)
  10.104 +gtk-cancel: button(16)
  10.105 +gtk-ok: button(16)
  10.106 +preferences-desktop-keyboard: title(16) big(48)
  10.107 +gtk-go-forward: button(16)
  10.108 +appointment-soon: big(48)
  10.109 +stock_properties: title(16) big(48)
  10.110 +reload: button(16)
  10.111 +system-upgrade: button(16)
  10.112 +tazpkg: title(16)
  10.113 +gtk-new: title(16) big(48)
  10.114 +editclear: button(16)
  10.115 +application-x-shellscript: button(16)
  10.116 +folder: button(16)
  10.117 +empty: button(16)
  10.118 +stock_bookmark: title(16)
  10.119 +folder-downloads: title(16)
  10.120 +preferences-desktop-default-applications: title(16) big(48)
  10.121 +text-x-generic: title(16)
  10.122 +/usr/share/pixmaps/gpl3.png
  10.123 +
  10.124 +
  10.125 +#
  10.126 +# tazdrop
  10.127 +#
  10.128 +
  10.129 +# tazdrop
  10.130 +text-editor: title(16) big(48)
  10.131 +gtk-remove: button(16)
  10.132 +gtk-save: button(16)
  10.133 +gtk-close: button(16)
    11.1 --- a/jwm/jwm-menu	Sat Apr 11 16:46:26 2015 +0300
    11.2 +++ b/jwm/jwm-menu	Fri Apr 17 07:35:02 2015 +0300
    11.3 @@ -1,7 +1,7 @@
    11.4  #!/bin/sh
    11.5  #
    11.6  # JWM Menus generator
    11.7 -# (C) 2014 SliTaz GNU/Linux - BSD Licence
    11.8 +# (C) 2014-2015 SliTaz GNU/Linux - BSD Licence
    11.9  #
   11.10  
   11.11  menus="/etc/xdg/jwm/menus.jwmrc"
    12.1 --- a/tazbox/tazbox	Sat Apr 11 16:46:26 2015 +0300
    12.2 +++ b/tazbox/tazbox	Fri Apr 17 07:35:02 2015 +0300
    12.3 @@ -3,23 +3,29 @@
    12.4  # SliTaz tiny GUI boxes for the desktop (su, logout, locale, etc)
    12.5  # and as usual, please: KISS
    12.6  #
    12.7 -# Copyright (C) 2011-2014 SliTaz GNU/Linux - GNU GPL v3
    12.8 +# Copyright (C) 2011-2015 SliTaz GNU/Linux - GNU GPL v3
    12.9  #    - Christophe Lincoln <pankso@slitaz.org>
   12.10  #    - Aleksej Bobylev <al.bobylev@gmail.com>
   12.11  #
   12.12 +
   12.13  . /lib/libtaz.sh
   12.14  export TEXTDOMAIN='tazbox' # i18n
   12.15  
   12.16 +
   12.17  # download dir (may be in a config file)
   12.18 +
   12.19  DOWNLOADS=$HOME/Downloads
   12.20  
   12.21 +
   12.22  # some constants to be used inside functions
   12.23 +
   12.24  tmp=/tmp/keymap.list
   12.25  db=/usr/share/i18n/locales
   12.26  zi=/usr/share/zoneinfo/
   12.27  ztab=${zi}zone-mini.tab
   12.28  csv=/tmp/freegeoip.csv
   12.29  
   12.30 +
   12.31  #
   12.32  # Functions
   12.33  #
   12.34 @@ -48,20 +54,26 @@
   12.35  	newline
   12.36  }
   12.37  
   12.38 +
   12.39  # try to find icon in .desktop files
   12.40 +
   12.41  find_icon() {
   12.42 -	local desktop
   12.43 -	desktop=$(find $HOME/.local/share/applications /usr/share/applications \
   12.44 +	local_desktop=$(find $HOME/.local/share/applications
   12.45  		-name ${1##*/}.desktop 2&>/dev/null | head -n1)
   12.46 -	[ x$desktop != x ] && cat $desktop | sed '/\[Desktop\ Entry\]/,/^\[/!d' | \
   12.47 +	system_desktop=$(find /usr/share/applications \
   12.48 +		-name ${1##*/}.desktop 2&>/dev/null | head -n1)
   12.49 +	desktop="${local_desktop:-$system_desktop}"
   12.50 +	[ -n "$desktop" ] && cat $desktop | sed '/\[Desktop\ Entry\]/,/^\[/!d' | \
   12.51  		sed '/^Icon=/!d' | head -n1 | cut -d= -f2
   12.52  }
   12.53  
   12.54 +
   12.55  # su frontend GUIs
   12.56 +
   12.57  su_main() {
   12.58  	CMD1="$1"; shift; CMD2="$(echo $@ | sed 's|&|&amp;|g')"
   12.59  	: ${icon=$(find_icon $CMD1)}
   12.60 -	[ x$icon == x ] && icon=gtk-dialog-authentication
   12.61 +	icon="${icon:-dialog-password}"
   12.62  
   12.63  	yad --title="$(_n 'SliTaz admin password')" --window-icon=$icon \
   12.64  		--width=520 --on-top --center \
   12.65 @@ -73,8 +85,9 @@
   12.66  		--field="$(_n 'Autosave password'):CHK" $CHECKED
   12.67  }
   12.68  
   12.69 +
   12.70  su_error() {
   12.71 -	icon=gtk-dialog-error
   12.72 +	icon='dialog-error'
   12.73  	yad --title="$(_n 'Error')" --window-icon=$icon \
   12.74  		--width=320 --on-top --center \
   12.75  		--image=$icon --image-on-top \
   12.76 @@ -82,7 +95,9 @@
   12.77  		--button="gtk-close:1"
   12.78  }
   12.79  
   12.80 +
   12.81  # user may press cancel on download.
   12.82 +
   12.83  cancel_dl() {
   12.84  	if [ "$?" == 1 ]; then
   12.85  		_ "CANCEL"
   12.86 @@ -90,10 +105,12 @@
   12.87  	fi
   12.88  }
   12.89  
   12.90 +
   12.91  # output a command in a GTK window
   12.92 +
   12.93  output_command() {
   12.94  	: ${title=$(_n 'TazBox Output')}
   12.95 -	: ${icon=gtk-dialog-info}
   12.96 +	: ${icon=dialog-information}
   12.97  
   12.98  	yad --title="$title" --window-icon=$icon \
   12.99  		--geometry="600x220+0-24" --fore="#ffffff" --back="#000000" \
  12.100 @@ -101,20 +118,24 @@
  12.101  		--button="gtk-close:1"
  12.102  }
  12.103  
  12.104 +
  12.105  # logout GUI function
  12.106 +
  12.107  logout_main() {
  12.108 -	icon=/usr/share/pixmaps/slitaz-icon.png
  12.109 +	icon='/usr/share/pixmaps/slitaz-icon.png'
  12.110  	yad --title="$(_n 'SliTaz Logout')" --window-icon=$icon \
  12.111  		--on-top --center --height=130 \
  12.112  		--image=$icon --image-on-top \
  12.113  		--text="<b>$(_n 'SliTaz Logout - Please choose an action:')</b>" \
  12.114  		--always-print-result \
  12.115  		--button "$(_n 'Close X session')!system-log-out:4" \
  12.116 -		--button "$(_n 'Reboot system')!reload:3" \
  12.117 +		--button "$(_n 'Reboot system')!system-reboot:3" \
  12.118  		--button "$(_n 'Shutdown system')!system-shutdown:2"
  12.119  }
  12.120  
  12.121 +
  12.122  # generate keymap list
  12.123 +
  12.124  gen_kmap_list() {
  12.125  	echo > $tmp
  12.126  	cd /usr/share/kbd/keymaps/i386
  12.127 @@ -124,9 +145,11 @@
  12.128  	done
  12.129  }
  12.130  
  12.131 +
  12.132  # Initial Config functions
  12.133 +
  12.134  setup_main() {
  12.135 -	icon=locale
  12.136 +	icon='locale'
  12.137  	gen_kmap_list
  12.138  	locale=$(ls -1 $db | grep ^[a-z][a-z]_[A-Z][A-Z] | tr "\n" "!")
  12.139  	keymap=$(cat $tmp | sort | tr "\n" "!")
  12.140 @@ -141,6 +164,7 @@
  12.141  		--field "$(_n 'Timezone'):CB" $timezone
  12.142  }
  12.143  
  12.144 +
  12.145  setup() {
  12.146  	choices=$(setup_main)
  12.147  	locale=$(echo $choices | cut -d"|" -f1)
  12.148 @@ -157,7 +181,7 @@
  12.149  #
  12.150  
  12.151  locale_main() {
  12.152 -	icon=preferences-desktop-locale
  12.153 +	icon='preferences-desktop-locale'
  12.154  	for locale in $(ls -1 $db | grep '[a-z]_[A-Z]'); do
  12.155  		desc=$(fgrep -m1 title $db/$locale | cut -d'"' -f2)
  12.156  		ll_CC=${locale%%@*}
  12.157 @@ -175,6 +199,7 @@
  12.158  		--button="gtk-cancel:1" --button="gtk-ok:0"
  12.159  }
  12.160  
  12.161 +
  12.162  locale() {
  12.163  	locale=$(locale_main)
  12.164  	# Deal with --button values
  12.165 @@ -191,10 +216,11 @@
  12.166  	fi
  12.167  }
  12.168  
  12.169 +
  12.170  # Keymap functions
  12.171 +
  12.172  keymap_main() {
  12.173 -	#icon=preferences-desktop-keyboard
  12.174 -	icon=input-keyboard
  12.175 +	icon='preferences-desktop-keyboard'
  12.176  	gen_kmap_list
  12.177  	for i in $(sort $tmp); do
  12.178  		echo "$i" | tr '|' '\n'
  12.179 @@ -208,6 +234,7 @@
  12.180  	rm -f $tmp
  12.181  }
  12.182  
  12.183 +
  12.184  keymap() {
  12.185  	keymap=$(keymap_main)
  12.186  	# Deal with --button values
  12.187 @@ -216,18 +243,23 @@
  12.188  	[ "$keymap" ] && tazkeymap $keymap
  12.189  }
  12.190  
  12.191 +
  12.192  # Free GeoIP service
  12.193  # Response: IP,CountryCode,CountryName, ...
  12.194 +
  12.195  geoip() {
  12.196  	[ ! -e $csv ] && wget -q -T3 -O $csv http://freegeoip.net/csv/ 2&>/dev/null
  12.197  	[ -e $csv ] && cut -d, -f2 $csv
  12.198  }
  12.199  
  12.200 +
  12.201  #
  12.202  # TZ functions
  12.203  #
  12.204  
  12.205 +
  12.206  # list of all existing available locations for country
  12.207 +
  12.208  tz_list() {
  12.209  	find $zi | \
  12.210  		grep -E "$(cat $ztab | grep "^$1	" | cut -d'	' -f2 | tr ' ' '|')" | \
  12.211 @@ -235,12 +267,14 @@
  12.212  		sed 's|.*/||g' | sort
  12.213  }
  12.214  
  12.215 +
  12.216  # ask for confirmation only if we have what to choose
  12.217 +
  12.218  tz_suggest() {
  12.219  	CountryCode=$(geoip)
  12.220  	if [ "x$CountryCode" != x ]; then
  12.221  		if [ "x$(tz_list $CountryCode)" != x ]; then
  12.222 -			CountryName=$(cut -d'"' -f6 $csv)
  12.223 +			CountryName=$(cut -d, -f3 $csv)
  12.224  			yad --title="$(_ 'SliTaz TZ')" --window-icon=$icon \
  12.225  			--on-top --center \
  12.226  			--image=$CountryCode --image-on-top \
  12.227 @@ -252,6 +286,7 @@
  12.228  	fi
  12.229  }
  12.230  
  12.231 +
  12.232  tz_select() {
  12.233  	case x$1 in
  12.234  	x)
  12.235 @@ -310,6 +345,7 @@
  12.236  	esac
  12.237  }
  12.238  
  12.239 +
  12.240  tz() {
  12.241  	icon=clock
  12.242  	arg=$(tz_suggest)
  12.243 @@ -332,16 +368,21 @@
  12.244  	rm -f $tmpcc
  12.245  }
  12.246  
  12.247 +
  12.248  #
  12.249  # Manage i18n packages
  12.250  #
  12.251  
  12.252 +
  12.253  # if installed
  12.254 +
  12.255  if_installed() {
  12.256  	[ -d /var/lib/tazpkg/installed/$1 ]
  12.257  }
  12.258  
  12.259 +
  12.260  # get package's description, install flag and sizes
  12.261 +
  12.262  desc_etc()
  12.263  {
  12.264  	INFO="$(grep -m1 -A3 -x -F $1 /var/lib/tazpkg/packages.txt)"
  12.265 @@ -357,12 +398,16 @@
  12.266  	echo -e "$INST\n$1\n$DESC\n${SIZE1//.0}\n${SIZE2//.0}" >> $PKGS_LIST
  12.267  }
  12.268  
  12.269 +
  12.270  # remove temp
  12.271 +
  12.272  rm_temp() {
  12.273  	rm -f $PKGS_LIST $ORIG_LIST $ANSWER $NEW_LIST $LIST1 $LIST2
  12.274  }
  12.275  
  12.276 +
  12.277  # install/remove locale packages
  12.278 +
  12.279  manage_i18n() {
  12.280  	tazbox notify "$(_ 'Please wait')" appointment-soon &
  12.281  
  12.282 @@ -430,7 +475,7 @@
  12.283  		done
  12.284  	fi
  12.285  
  12.286 -	icon=stock_properties
  12.287 +	icon='stock_properties'
  12.288  	cat $PKGS_LIST | \
  12.289  	{
  12.290  		yad --title="$(_n 'Manage locale packages')" --window-icon=$icon \
  12.291 @@ -476,22 +521,24 @@
  12.292  
  12.293  
  12.294  # New file functions
  12.295 +
  12.296  newfile_main() {
  12.297 -	icon=gtk-new
  12.298 +	icon='gtk-new'
  12.299  	yad --title="$(_n 'New file')" --window-icon=$icon \
  12.300  		--width=460 --height=160 --on-top --center \
  12.301  		--image=$icon --image-on-top \
  12.302 +		--icon=$icon \
  12.303  		--text="<b>$(_n 'Create a new file or folder on your desktop')</b>" \
  12.304  		--entry --entry-label="$(_n 'File name')" \
  12.305  		--ricon=editclear \
  12.306  		--always-print-result \
  12.307  		--button="$(_n 'SHell script')!application-x-shellscript:4" \
  12.308 -		--button="$(_n 'Folder')!stock_folder:3" \
  12.309 -		--icon="gtk-new" \
  12.310 -		--button="$(_n 'File')!application-text:2" \
  12.311 +		--button="$(_n 'Folder')!folder:3" \
  12.312 +		--button="$(_n 'File')!empty:2" \
  12.313  		--button="gtk-cancel:1"
  12.314  }
  12.315  
  12.316 +
  12.317  newfile() {
  12.318  	file=$(newfile_main)
  12.319  	ret=$?
  12.320 @@ -510,9 +557,11 @@
  12.321  	esac
  12.322  }
  12.323  
  12.324 +
  12.325  # All applications
  12.326 +
  12.327  all_apps() {
  12.328 -	icon=stock_bookmark
  12.329 +	icon='stock_bookmark'
  12.330  	yad --title="$(_n 'All Applications')" --window-icon=$icon \
  12.331  		--width=400 --height=400 \
  12.332  		--icons --compact \
  12.333 @@ -520,7 +569,9 @@
  12.334  		--button="gtk-close:0"
  12.335  }
  12.336  
  12.337 +
  12.338  # Ask root permissions for system settings
  12.339 +
  12.340  ask_root() {
  12.341  	if [ $(id -u) != 0 ]; then
  12.342  		exec tazbox su $0 $@
  12.343 @@ -528,24 +579,30 @@
  12.344  	fi
  12.345  }
  12.346  
  12.347 +
  12.348  #
  12.349  # Commands
  12.350  #
  12.351 +
  12.352  case "$1" in
  12.353  	su)
  12.354  		# Don't show dialog if we are root
  12.355  		test $(id -u) = 0 && exec ${@:2}
  12.356  		SU_CMD="${@:2}"
  12.357 +
  12.358  		# Check if a password has been saved before launching main dialog
  12.359  		if [ -s $HOME/.config/slitaz/subox.conf ]; then
  12.360  			PASSWD=$(cat $HOME/.config/slitaz/subox.conf)
  12.361  			CHECKED="TRUE"
  12.362  		fi
  12.363 +
  12.364  		# Display the main dialog (ask for password)
  12.365  		main=$(su_main $SU_CMD)
  12.366 +
  12.367  		# Deal with --button values and exit if cancelled to avoid erasing
  12.368  		# saved password.
  12.369  		[ $? == 1 ] && exit 0
  12.370 +
  12.371  		# Save or erase Autosaved password
  12.372  		if [ $(echo $main | cut -f2 -d"|") == "TRUE" ]; then
  12.373  			echo $main | cut -f 1 -d "|" > $HOME/.config/slitaz/subox.conf
  12.374 @@ -553,6 +610,7 @@
  12.375  		else
  12.376  			cat /dev/null > $HOME/.config/slitaz/subox.conf
  12.377  		fi
  12.378 +
  12.379  		# Try to login & execute. If password is wrong execute error dialog
  12.380  		SU_CMD_QUOTED="$(echo "dbus-launch --exit-with-session $SU_CMD" | sed 's|&|\\&|g')"
  12.381  		echo $main | cut -f 1 -d "|" | su -c "$SU_CMD_QUOTED &" || su_error ;;
  12.382 @@ -563,6 +621,7 @@
  12.383  		else
  12.384  			logout_main; answer=$?
  12.385  		fi
  12.386 +
  12.387  		# Deal with --button values
  12.388  		# DE and WM started with a custom -session script should export
  12.389  		# XDG_CURRENT_DESKTOP
  12.390 @@ -590,7 +649,7 @@
  12.391  	out-dl)
  12.392  		# A tiny GTK window for Busybox wget output
  12.393  		url=$2; opts="--tail --button=gtk-cancel:1"
  12.394 -		icon=folder-downloads; title="$(_ 'Downloading...')"
  12.395 +		icon='folder-downloads'; title="$(_ 'Downloading...')"
  12.396  		[ -d $DOWNLOADS ] || mkdir -p $DOWNLOADS
  12.397  		busybox wget -c -P $DOWNLOADS $url 2>&1 | output_command
  12.398  		cancel_dl ;;
  12.399 @@ -638,7 +697,7 @@
  12.400  		# Missing file was created by slitaz_apps_conf function from tazx
  12.401  		. $CONFIG
  12.402  
  12.403 -		icon=preferences-desktop-default-applications
  12.404 +		icon='preferences-desktop-default-applications'
  12.405  		eval $(yad --title="$(_n 'SliTaz default applications')" \
  12.406  			--window-icon=$icon --image=$icon --image-on-top \
  12.407  			--text="<b>$(_n 'SliTaz default applications configuration')</b>" \
    13.1 --- a/tazdrop/tazdrop	Sat Apr 11 16:46:26 2015 +0300
    13.2 +++ b/tazdrop/tazdrop	Fri Apr 17 07:35:02 2015 +0300
    13.3 @@ -4,13 +4,16 @@
    13.4  # or the expanded panel and it will deal with it. Or at least it will
    13.5  # try, since we are in the first stages of the tool.
    13.6  #
    13.7 -# Copyright (C) 2011-2014 SliTaz GNU/linux - BSD License
    13.8 +# Copyright (C) 2011-2015 SliTaz GNU/linux - BSD License
    13.9  #    - Christophe Lincoln <pankso@slitaz.org>
   13.10  #
   13.11 +
   13.12  . /lib/libtaz.sh
   13.13  export TEXTDOMAIN='tazdrop' # i18n
   13.14  
   13.15 +
   13.16  # Follow XDG standards
   13.17 +
   13.18  CONFIG=$HOME/.config/slitaz/tazdrop.conf
   13.19  NOTES=$HOME/.cache/tazdrop.notes
   13.20  
   13.21 @@ -39,7 +42,9 @@
   13.22  	newline
   13.23  }
   13.24  
   13.25 +
   13.26  # Write notes content type to a file
   13.27 +
   13.28  write_drop() {
   13.29  	sed "s/$(echo -en '\r') /\n/g" >> $NOTES << EOT
   13.30  ====[ $(date '+%x %X') ]====
   13.31 @@ -47,7 +52,9 @@
   13.32  EOT
   13.33  }
   13.34  
   13.35 +
   13.36  # Get and install a package from an URL
   13.37 +
   13.38  get_install_pkg() {
   13.39  	tmp=$DOWNLOADS/$$
   13.40  	mkdir -p $tmp
   13.41 @@ -56,7 +63,9 @@
   13.42  	su -c "tazpkg install *.tazpkg && mv *.tazpkg .. && cd .. && rm -rf $tmp"
   13.43  }
   13.44  
   13.45 +
   13.46  # Main GUI function
   13.47 +
   13.48  drop_main() {
   13.49  	yad --geometry="$DROP_SIZE$DROP_GEOM" \
   13.50  		--sticky --on-top --skip-taskbar --undecorated --no-buttons \
   13.51 @@ -66,7 +75,9 @@
   13.52  		--command="$0"
   13.53  }
   13.54  
   13.55 +
   13.56  # Image GUI function
   13.57 +
   13.58  drop_image() {
   13.59  	yad --geometry="$DROP_IMAGE_GEOM" \
   13.60  		--sticky --on-top --skip-taskbar --undecorated --no-buttons \
   13.61 @@ -76,9 +87,11 @@
   13.62  		--command="$0"
   13.63  }
   13.64  
   13.65 +
   13.66  # Notes GUI function
   13.67 +
   13.68  drop_notes() {
   13.69 -	icon=text-editor
   13.70 +	icon='text-editor'
   13.71  	yad --title="$(_ 'Dropped Notes')" --window-icon=$icon \
   13.72  		--width=500 --height=400 --margins=5 \
   13.73  		--image=$icon --image-on-top \
   13.74 @@ -89,9 +102,11 @@
   13.75  		--button="gtk-close:1"
   13.76  }
   13.77  
   13.78 +
   13.79  #
   13.80  # We may have args on cmdline, execute cmd & and exit.
   13.81  #
   13.82 +
   13.83  case "$1" in
   13.84  	--usage|-h|--help)
   13.85  		usage && exit 0 ;;
   13.86 @@ -116,12 +131,14 @@
   13.87  		drop="$1" && continue ;;
   13.88  esac
   13.89  
   13.90 +
   13.91  #
   13.92  # Drag and drop handler, uritype first filetype after.
   13.93  #
   13.94  # Use 'xdg-open' & 'xdg-mime query filetype /path/to/file',
   13.95  # both need xprop (on slitaz we have obxprop from openbox)?
   13.96  #
   13.97 +
   13.98  case "$drop" in
   13.99  	file:///*)
  13.100  		# Handle local files
    14.1 --- a/tinyutils/browser	Sat Apr 11 16:46:26 2015 +0300
    14.2 +++ b/tinyutils/browser	Fri Apr 17 07:35:02 2015 +0300
    14.3 @@ -1,6 +1,7 @@
    14.4  #!/bin/sh
    14.5  # Launch SliTaz default Web browser.
    14.6  #
    14.7 +
    14.8  . /etc/slitaz/applications.conf
    14.9  
   14.10  USER_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/slitaz/applications.conf"
    15.1 --- a/tinyutils/decode	Sat Apr 11 16:46:26 2015 +0300
    15.2 +++ b/tinyutils/decode	Fri Apr 17 07:35:02 2015 +0300
    15.3 @@ -3,13 +3,15 @@
    15.4  # Decode is a cmdline tool to decode all kinds of files such as audio or video.
    15.5  # Lets you decode a single file, many files on cmdline or a full directory.
    15.6  #
    15.7 -# Copyright (C) 2012-2014 SliTaz GNU/Linux - BSD License
    15.8 +# Copyright (C) 2012-2015 SliTaz GNU/Linux - BSD License
    15.9  #
   15.10  # Author: Christophe Lincoln <pankso@slitaz.org>
   15.11  #
   15.12 +
   15.13  . /lib/libtaz.sh
   15.14  export TEXTDOMAIN='slitaz-tools' #i18n
   15.15  
   15.16 +
   15.17  # NOTES:
   15.18  #	Do we need a --out=/output/path option ?
   15.19  #	Use convert for [.png|.jpg] --> .raw ?
   15.20 @@ -21,7 +23,9 @@
   15.21  # Functions
   15.22  #
   15.23  
   15.24 +
   15.25  # Small help and usage.
   15.26 +
   15.27  usage() {
   15.28  	cat << EOT
   15.29  
   15.30 @@ -38,8 +42,10 @@
   15.31  EOT
   15.32  }
   15.33  
   15.34 +
   15.35  # Check if a tool is installed. Don't force users and auto install package
   15.36  # Decode is a cmdline line tool, let's have auto install option in GUI.
   15.37 +
   15.38  check_tool() {
   15.39  	dec=$1
   15.40  	name="$(basename "$file")"
   15.41 @@ -53,7 +59,9 @@
   15.42  	fi
   15.43  }
   15.44  
   15.45 +
   15.46  # Decode a file.
   15.47 +
   15.48  decoder() {
   15.49  	newline; separator; newline
   15.50  	if [ ! -f "$file" ]; then
   15.51 @@ -83,6 +91,7 @@
   15.52  	esac
   15.53  }
   15.54  
   15.55 +
   15.56  #
   15.57  # Commands
   15.58  #
    16.1 --- a/tinyutils/editor	Sat Apr 11 16:46:26 2015 +0300
    16.2 +++ b/tinyutils/editor	Fri Apr 17 07:35:02 2015 +0300
    16.3 @@ -1,6 +1,7 @@
    16.4  #!/bin/sh
    16.5  # Launch SliTaz default Text Editor.
    16.6  #
    16.7 +
    16.8  . /etc/slitaz/applications.conf
    16.9  
   16.10  USER_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/slitaz/applications.conf"
    17.1 --- a/tinyutils/file-manager	Sat Apr 11 16:46:26 2015 +0300
    17.2 +++ b/tinyutils/file-manager	Fri Apr 17 07:35:02 2015 +0300
    17.3 @@ -1,6 +1,7 @@
    17.4  #!/bin/sh
    17.5  # Launch SliTaz default File manager.
    17.6  #
    17.7 +
    17.8  . /etc/slitaz/applications.conf
    17.9  
   17.10  USER_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/slitaz/applications.conf"
    18.1 --- a/tinyutils/frugal	Sat Apr 11 16:46:26 2015 +0300
    18.2 +++ b/tinyutils/frugal	Fri Apr 17 07:35:02 2015 +0300
    18.3 @@ -2,29 +2,36 @@
    18.4  #
    18.5  # Frugal is a tiny tool to handle SliTaz frugal installation.
    18.6  #
    18.7 -# Copyright (C) 2013 SliTaz GNU/Linux - BSD License
    18.8 +# Copyright (C) 2013-2015 SliTaz GNU/Linux - BSD License
    18.9  #
   18.10  # Author: Christophe Lincoln <pankso@slitaz.org>
   18.11  #
   18.12 +
   18.13  . /lib/libtaz.sh
   18.14  
   18.15  [ "$root" ] || root="/boot/frugal"
   18.16  
   18.17 +
   18.18  # NOTES:
   18.19  #	Have a --web option to dl ISO ?
   18.20  #	Auto configure GRUB ?
   18.21  #
   18.22  
   18.23 +
   18.24  # Internationalization
   18.25 +
   18.26  . /usr/bin/gettext.sh
   18.27  TEXTDOMAIN='slitaz-tools'
   18.28  export TEXTDOMAIN
   18.29  
   18.30 +
   18.31  #
   18.32  # Functions
   18.33  #
   18.34  
   18.35 +
   18.36  # Small help and usage.
   18.37 +
   18.38  usage() {
   18.39  	name=$(basename $0)
   18.40  	cat << EOT
   18.41 @@ -49,7 +56,9 @@
   18.42  EOT
   18.43  }
   18.44  
   18.45 +
   18.46  # GRUB config example.
   18.47 +
   18.48  grub_example() {
   18.49  	cat << EOT
   18.50  title SliTaz GNU/Linux (frugal)
   18.51 @@ -59,6 +68,7 @@
   18.52  EOT
   18.53  }
   18.54  
   18.55 +
   18.56  #
   18.57  # Commands
   18.58  #
   18.59 @@ -69,6 +79,7 @@
   18.60  		newline
   18.61  		boldify "Frugal info"
   18.62  		separator 
   18.63 +
   18.64  		# First check if we are running in frugal mode
   18.65  		if fgrep -q 'root=/dev/null' /proc/cmdline; then
   18.66  			gettext "Frugal system running detected"; newline
   18.67 @@ -127,6 +138,7 @@
   18.68  			cp -a ${loop}/boot/rootfs.gz ${root}
   18.69  		fi
   18.70  		status
   18.71 +
   18.72  		# Umount the loop device
   18.73  		gettext "Unmounting ISO image..."
   18.74  		sleep 1
    19.1 --- a/tinyutils/history	Sat Apr 11 16:46:26 2015 +0300
    19.2 +++ b/tinyutils/history	Fri Apr 17 07:35:02 2015 +0300
    19.3 @@ -2,6 +2,7 @@
    19.4  # 
    19.5  # Fake history command for Ash.
    19.6  #
    19.7 +
    19.8  . /lib/libtaz.sh
    19.9  export TEXTDOMAIN='slitaz-tools' #i18n
   19.10  
    20.1 --- a/tinyutils/hwsetup	Sat Apr 11 16:46:26 2015 +0300
    20.2 +++ b/tinyutils/hwsetup	Fri Apr 17 07:35:02 2015 +0300
    20.3 @@ -2,9 +2,10 @@
    20.4  # usage: hwsetup [device]
    20.5  # e.g.,  hwsetup printer
    20.6  # #
    20.7 -# Copyright (C) 2009-2014 SliTaz GNU/Linux - GNU GPL v3
    20.8 +# Copyright (C) 2009-2015 SliTaz GNU/Linux - GNU GPL v3
    20.9  # Authors : Rohit Joshi <jozee@slitaz.org>
   20.10  #
   20.11 +
   20.12  . /lib/libtaz.sh
   20.13  . /etc/slitaz/slitaz.conf
   20.14  export TEXTDOMAIN='slitaz-tools' #i18n
   20.15 @@ -17,6 +18,7 @@
   20.16  DETECTED="no"
   20.17  USB_IDS=/usr/share/misc/usb.ids.gz
   20.18  
   20.19 +
   20.20  usage() {
   20.21  	newline
   20.22  	_ 'SliTaz Setup configuration'
   20.23 @@ -45,6 +47,7 @@
   20.24  	newline
   20.25  }
   20.26  
   20.27 +
   20.28  run_daemon_startup() {
   20.29  	# Add server to rcS.conf and avoid duplication.
   20.30  	. /etc/rcS.conf
   20.31 @@ -53,6 +56,7 @@
   20.32  	fi
   20.33  }
   20.34  
   20.35 +
   20.36  device() {
   20.37  	SUGGESTED=""
   20.38  	case "$DEVICE" in
   20.39 @@ -93,6 +97,7 @@
   20.40  	esac
   20.41  }
   20.42  
   20.43 +
   20.44  untested() {
   20.45  	newline; separator
   20.46  	longline $(_ "Due to a lack of compatible hardware for troubleshooting, \
   20.47 @@ -102,6 +107,7 @@
   20.48  	sleep 1
   20.49  }
   20.50  
   20.51 +
   20.52  failed() {
   20.53  	newline; separator
   20.54  	_ 'Failed to setup $DEVICE'
   20.55 @@ -109,7 +115,9 @@
   20.56  	sleep 1
   20.57  }
   20.58  
   20.59 +
   20.60  # Install DEPENDS and/or SUGGESTED
   20.61 +
   20.62  install() {
   20.63  	for pkg in $1 ; do
   20.64  		# Avoid reinstall
   20.65 @@ -123,7 +131,9 @@
   20.66  	done
   20.67  }
   20.68  
   20.69 +
   20.70  # Install DEPENDS and/or SUGGESTED
   20.71 +
   20.72  confirm_install() {
   20.73  	for pkg in $1 ; do
   20.74  		# Avoid reinstall
   20.75 @@ -139,6 +149,7 @@
   20.76  	done
   20.77  }
   20.78  
   20.79 +
   20.80  add_all_user_to_group() {
   20.81  	USERS=$(grep /home /etc/passwd | cut -d: -f1)
   20.82  	#echo "checking $USERS in $GROUP"
   20.83 @@ -152,6 +163,7 @@
   20.84  	done
   20.85  }
   20.86  
   20.87 +
   20.88  find_usb_device() {
   20.89  	case "$DEVICE" in
   20.90  		printer|scanner|camera) PATTERN="Cls=00" ;;
   20.91 @@ -188,6 +200,7 @@
   20.92  	fi
   20.93  }
   20.94  
   20.95 +
   20.96  confirm_device() {
   20.97  	_ "Which no. is your $DEVICE shown in the above lines (1,2,3,none)? "; read choice
   20.98  	case "$choice" in
   20.99 @@ -206,6 +219,7 @@
  20.100  	esac
  20.101  }
  20.102  
  20.103 +
  20.104  hputil() {
  20.105  	if [ "$HP" == "1" ]; then
  20.106  		install "hplip"
  20.107 @@ -217,7 +231,9 @@
  20.108  	fi
  20.109  }
  20.110  
  20.111 +
  20.112  # udev now should do this correctly
  20.113 +
  20.114  fix_usb_permissions() {
  20.115  	grp=$1
  20.116  	if [ "$DETECTED" == "yes" ]; then
  20.117 @@ -233,18 +249,21 @@
  20.118  	fi
  20.119  }
  20.120  
  20.121 +
  20.122  fix_parallel_permissions() {
  20.123  	if [ -f /usr/lib/cups/backend/parallel ] ; then
  20.124  		chmod 0755 /usr/lib/cups/backend/parallel
  20.125  	fi
  20.126  }
  20.127  
  20.128 +
  20.129  load_modules() {
  20.130  	tazhw detect-pci
  20.131  	tazhw detect-usb
  20.132  	sleep 1
  20.133  }
  20.134  
  20.135 +
  20.136  udev() {
  20.137  	if [ "$UDEV_RULES" == "yes" ]; then
  20.138  		_ 'New udev rules are added by a package'
  20.139 @@ -253,9 +272,11 @@
  20.140  	fi
  20.141  }
  20.142  
  20.143 +
  20.144  xorg() {
  20.145  	[ -x /usr/bin/Xorg ] || install "xorg"
  20.146  	_ 'Auto configuring Xorg...'
  20.147 +
  20.148  	# Xorg auto configuration.
  20.149  	if [ ! -d /etc/X11/xorg.conf.d -a -x /usr/bin/Xorg ]; then
  20.150  		_ 'Configuring Xorg...'
  20.151 @@ -266,6 +287,7 @@
  20.152  	fi
  20.153  }
  20.154  
  20.155 +
  20.156  get_wvdial_vars() {
  20.157  	PHONE=$(   grep ^Phone         $CONF | cut -d= -f2 | tr -d '[" ]')
  20.158  	USERNAME=$(grep ^Username      $CONF | cut -d= -f2 | tr -d '[" ]')
  20.159 @@ -277,6 +299,7 @@
  20.160  	[ "x$PASSWORD" == "x''" ] && PASSWORD=
  20.161  }
  20.162  
  20.163 +
  20.164  set_wvdial_vars() {
  20.165  	# wvdial needs something right the equal sign
  20.166  	[ x$USERNAME == x ] && USERNAME="''"
  20.167 @@ -287,6 +310,7 @@
  20.168  	s|^Modem.*/dev.*|Modem = '$MODEM'|' -i $CONF
  20.169  }
  20.170  
  20.171 +
  20.172  wvdialbox_main() {
  20.173  	icon=network-transmit-receive
  20.174  	yad --title="$(_n 'Wvdial Box')" --window-icon=$icon --center \
  20.175 @@ -306,6 +330,7 @@
  20.176  		# --always-print-result
  20.177  }
  20.178  
  20.179 +
  20.180  wvdialbox() {
  20.181  	# setup your modem
  20.182  	#wvdialconf
  20.183 @@ -366,6 +391,7 @@
  20.184  		printer)
  20.185  			load_modules
  20.186  			udev
  20.187 +
  20.188  			# check parallel or usb printer
  20.189  			if [ -f /proc/sys/dev/parport/parport*/autoprobe* ] ; then
  20.190  				fix_parallel_permissions
  20.191 @@ -374,6 +400,7 @@
  20.192  				find_usb_device
  20.193  				fix_usb_permissions "lp"
  20.194  			fi
  20.195 +
  20.196  			#lpinfo -v
  20.197  			if [ "$DETECTED" == "yes" ]; then
  20.198  				newline
  20.199 @@ -487,6 +514,7 @@
  20.200  				failed
  20.201  			fi
  20.202  			;;
  20.203 +
  20.204  		bluetooth)
  20.205  			load_modules
  20.206  			udev
  20.207 @@ -494,6 +522,7 @@
  20.208  			_n 'Do you want to see if the bluetooth is working'; confirm
  20.209  			if [ $? == 0 ]; then
  20.210  				newline
  20.211 +
  20.212  				# sanity check: btusb is not loaded automagically for unknown reasons
  20.213  				if ! lsmod | grep -q btusb ; then
  20.214  					modprobe btusb
  20.215 @@ -502,6 +531,7 @@
  20.216  				emsg "$(_n '<b>Bluetooth</b> interfaces')"
  20.217  				newline
  20.218  				lsusb | grep Bluetooth
  20.219 +
  20.220  				# udev should run bluetoothd automatically
  20.221  				bluetoothd
  20.222  				sleep 1
  20.223 @@ -729,7 +759,9 @@
  20.224  	esac
  20.225  }
  20.226  
  20.227 +
  20.228  # What to do.
  20.229 +
  20.230  case "$1" in
  20.231  	-h|--help|help|usage)	usage ;;
  20.232  	wvdial)		wvdialbox ;;
    21.1 --- a/tinyutils/setmixer	Sat Apr 11 16:46:26 2015 +0300
    21.2 +++ b/tinyutils/setmixer	Fri Apr 17 07:35:02 2015 +0300
    21.3 @@ -4,11 +4,14 @@
    21.4  # directly.
    21.5  #
    21.6  
    21.7 +
    21.8  # Internationalization
    21.9 +
   21.10  . /usr/bin/gettext.sh
   21.11  TEXTDOMAIN='slitaz-tools'
   21.12  export TEXTDOMAIN
   21.13  
   21.14 +
   21.15  gettext "Setting default mixer volumes... "
   21.16  
   21.17  amixer -s -q <<EOF
   21.18 @@ -24,17 +27,22 @@
   21.19  mixer Synth 0dB
   21.20  mixer CD 90% unmute
   21.21  mixer CD 0dB
   21.22 +
   21.23  # mute mic
   21.24  set Mic 0% mute
   21.25 +
   21.26  # ESS 1969 chipset has 2 PCM channels
   21.27  set PCM,1 90% unmute
   21.28  set PCM,1 0dB
   21.29 +
   21.30  # Trident/YMFPCI/emu10k1
   21.31  set Wave 100% unmute
   21.32  set Music 100% unmute
   21.33  set AC97 100% unmute
   21.34 +
   21.35  # CS4237B chipset:
   21.36  set 'Master Digital' 75% unmute
   21.37 +
   21.38  # Envy24 chips with analog outs
   21.39  set DAC 90% unmute
   21.40  set DAC -12dB
   21.41 @@ -42,14 +50,17 @@
   21.42  set DAC,0 -12dB
   21.43  set DAC,1 90% unmute
   21.44  set DAC,1 -12dB
   21.45 +
   21.46  # some notebooks use headphone instead of master
   21.47  set Headphone 75% unmute
   21.48  set Headphone -12dB
   21.49  set Playback 100% unmute
   21.50 +
   21.51  # turn off digital switches
   21.52  set "SB Live Analog/Digital Output Jack" off
   21.53  set "Audigy Analog/Digital Output Jack" off
   21.54  EOF
   21.55 +
   21.56  gettext "Done"; echo
   21.57  
   21.58  # Store config
    22.1 --- a/tinyutils/slitaz-config	Sat Apr 11 16:46:26 2015 +0300
    22.2 +++ b/tinyutils/slitaz-config	Fri Apr 17 07:35:02 2015 +0300
    22.3 @@ -3,9 +3,10 @@
    22.4  # SliTaz Config - A tool with all SliTaz Ncurses configs in one place for
    22.5  # text mode systems (server, ARM devices)
    22.6  #
    22.7 -# Copyright (C) 2014 SliTaz ARM - BSD License
    22.8 +# Copyright (C) 2014-2015 SliTaz ARM - BSD License
    22.9  # Author: Christophe Lincoln <pankso@slitaz.org>
   22.10  #
   22.11 +
   22.12  . /lib/libtaz.sh
   22.13  export TEXTDOMAIN='slitaz-tools' #i18n
   22.14  
   22.15 @@ -18,7 +19,9 @@
   22.16  height="20"
   22.17  width="72"
   22.18  
   22.19 +
   22.20  # Use a tmp directory
   22.21 +
   22.22  mkdir -p $tmpdir
   22.23  
   22.24  quit() {
   22.25 @@ -30,7 +33,9 @@
   22.26  # GUI Functions
   22.27  #
   22.28  
   22.29 +
   22.30  # Coded for the ARM first boot settings
   22.31 +
   22.32  about_post_install() {
   22.33  	dialog --cr-wrap \
   22.34  		--title "{ $(_ 'Post Installation') }" \
   22.35 @@ -38,7 +43,9 @@
   22.36  		--textbox "$about" $height $width
   22.37  }
   22.38  
   22.39 +
   22.40  # Set root passwd
   22.41 +
   22.42  root_passwd() {
   22.43  	dialog --title "{ $(_ 'Root Password') }" --colors \
   22.44  		--inputbox "\n$(_ 'Enter new password for \Zb\Z1root')" \
   22.45 @@ -48,7 +55,9 @@
   22.46  	echo "root:$passwd" | chpasswd --md5 >/dev/null
   22.47  }
   22.48  
   22.49 +
   22.50  # Add a new user
   22.51 +
   22.52  add_user() {
   22.53  	title2="{ $(_ 'Add User') }"
   22.54  
   22.55 @@ -81,6 +90,7 @@
   22.56  	fi
   22.57  }
   22.58  
   22.59 +
   22.60  set_date() {
   22.61  	clear; newline
   22.62  	echo "Old date: $(date)"
   22.63 @@ -89,9 +99,11 @@
   22.64  	sleep 4
   22.65  }
   22.66  
   22.67 +
   22.68  # Catch ESSIDs and format output for Ncurses Dialog or GTK Yad tree.
   22.69  # We get the list of networks by Cell and without spaces.
   22.70  # Usage: detect_wifi --output=gtk (default output to dialog)
   22.71 +
   22.72  detect_wifi() {
   22.73  	. /etc/network.conf
   22.74  	ifconfig $WIFI_INTERFACE up
   22.75 @@ -141,14 +153,18 @@
   22.76  	fi
   22.77  }
   22.78  
   22.79 +
   22.80  # Show message and percentage on the dialog gauge
   22.81 +
   22.82  msg() {
   22.83  	sleep 1; echo -e "XXX\n$1\n$MSG\nXXX"
   22.84  }
   22.85  
   22.86 +
   22.87  # Wireless config so users don't have to edit any config files on post
   22.88  # install to get connected. If the wired connection is used it will auto
   22.89  # connect with DHCP so no need for a dialog frontend.
   22.90 +
   22.91  wifi_setup() {
   22.92  	. /etc/network.conf
   22.93  	dialog \
   22.94 @@ -226,7 +242,9 @@
   22.95  	} | dialog --title "{ $(_ 'Wi-Fi Config') }" --gauge "" 8 $width 0
   22.96  }
   22.97  
   22.98 +
   22.99  # Main Dialog menu
  22.100 +
  22.101  main_box() {
  22.102  	dialog \
  22.103  		--clear --title "$title" \
  22.104 @@ -259,6 +277,7 @@
  22.105  	esac
  22.106  }
  22.107  
  22.108 +
  22.109  #
  22.110  # Handle commands
  22.111  #
  22.112 @@ -273,6 +292,8 @@
  22.113  		done ;;
  22.114  esac
  22.115  
  22.116 +
  22.117  # Clean exit
  22.118 +
  22.119  #rm -rf ${tmpdir}
  22.120  exit 0
    23.1 --- a/tinyutils/startd	Sat Apr 11 16:46:26 2015 +0300
    23.2 +++ b/tinyutils/startd	Fri Apr 17 07:35:02 2015 +0300
    23.3 @@ -2,6 +2,7 @@
    23.4  #
    23.5  # Startd - Small wrapper to start daemons on SliTaz.
    23.6  #
    23.7 +
    23.8  . /lib/libtaz.sh
    23.9  check_root
   23.10  
    24.1 --- a/tinyutils/stopd	Sat Apr 11 16:46:26 2015 +0300
    24.2 +++ b/tinyutils/stopd	Fri Apr 17 07:35:02 2015 +0300
    24.3 @@ -2,6 +2,7 @@
    24.4  #
    24.5  # Stopd - Small wrapper to stop daemons on SliTaz.
    24.6  #
    24.7 +
    24.8  . /lib/libtaz.sh
    24.9  check_root
   24.10  
    25.1 --- a/tinyutils/subox	Sat Apr 11 16:46:26 2015 +0300
    25.2 +++ b/tinyutils/subox	Fri Apr 17 07:35:02 2015 +0300
    25.3 @@ -1,3 +1,4 @@
    25.4  #!/bin/sh
    25.5  # Small wrapper for the old subox.
    25.6 +
    25.7  exec tazbox su "$@"
    26.1 --- a/tinyutils/tazhw	Sat Apr 11 16:46:26 2015 +0300
    26.2 +++ b/tinyutils/tazhw	Fri Apr 17 07:35:02 2015 +0300
    26.3 @@ -6,11 +6,12 @@
    26.4  # option --get-firmware to force installation. GUI uses Yad and is
    26.5  # called by args such as all box functions.
    26.6  #
    26.7 -# (c) 2009-2014 SliTaz GNU/Linux - GNU GPL v3
    26.8 +# (c) 2009-2015 SliTaz GNU/Linux - GNU GPL v3
    26.9  #
   26.10  # Authors: Christophe Lincoln <pankso@slitaz.org>
   26.11  #          Rohit Joshi <jozee@slitaz.org>
   26.12  #
   26.13 +
   26.14  . /lib/libtaz.sh
   26.15  export TEXTDOMAIN='slitaz-tools' # i18n text mode
   26.16  
   26.17 @@ -35,6 +36,7 @@
   26.18  EOT
   26.19  }
   26.20  
   26.21 +
   26.22  check_firmware() {
   26.23  	if [ -x /usr/bin/get-$mod-firmware ]; then
   26.24  		if [ ! -d /var/lib/tazpkg/installed/$mod-firmware ]; then
   26.25 @@ -57,6 +59,7 @@
   26.26  	fi
   26.27  }
   26.28  
   26.29 +
   26.30  load_module() {
   26.31  	if ! lsmod | grep -q "^$mod"; then
   26.32  		# Check if builtin, loaded or missing
   26.33 @@ -86,8 +89,10 @@
   26.34  	. /etc/rcS.conf
   26.35  }
   26.36  
   26.37 +
   26.38  # Detect PCI devices and load kernel module only at first boot,
   26.39  # in LiveCD mode or with the command 'detect-pci'.
   26.40 +
   26.41  detect_pci_devices() {
   26.42  	if [ ! -s /var/lib/detected-modules ]; then
   26.43  		. /etc/rcS.conf
   26.44 @@ -102,7 +107,9 @@
   26.45  	fi
   26.46  }
   26.47  
   26.48 +
   26.49  # Detect all USB devices.
   26.50 +
   26.51  detect_usb_devices() {
   26.52  	if [ -e /sys/bus/usb/devices/usb/usb1 ]; then
   26.53  		for product in /sys/bus/usb/devices/*/product
   26.54 @@ -119,12 +126,16 @@
   26.55  	fi
   26.56  }
   26.57  
   26.58 +
   26.59  # Get firmware used by check_firmware()
   26.60 +
   26.61  if [ "$2" == "--get-firmware" ]; then
   26.62  	firmware='get'
   26.63  fi
   26.64  
   26.65 +
   26.66  # What to do.
   26.67 +
   26.68  case "$1" in
   26.69  	-i|init)
   26.70  		check_root
    27.1 --- a/tinyutils/tazkeymap	Sat Apr 11 16:46:26 2015 +0300
    27.2 +++ b/tinyutils/tazkeymap	Fri Apr 17 07:35:02 2015 +0300
    27.3 @@ -3,14 +3,17 @@
    27.4  # Tazkeymap - SliTaz GNU/Linux keymap config using loadkeys and dialog boxes.
    27.5  # Configuration file is: /etc/keymap.conf
    27.6  #
    27.7 -# Copyright (C) 2008-2014 SliTaz GNU/Linux - BSD License
    27.8 +# Copyright (C) 2008-2015 SliTaz GNU/Linux - BSD License
    27.9  #
   27.10  # Author: Christophe Lincoln <pankso@slitaz.org>
   27.11  #
   27.12 +
   27.13  . /lib/libtaz.sh
   27.14  export TEXTDOMAIN='slitaz-tools' #i18n
   27.15  
   27.16 +
   27.17  # List all keymaps.
   27.18 +
   27.19  list_keymaps() {
   27.20  	cd /usr/share/kbd/keymaps/i386
   27.21  	# We first need a list to sort and then use \n for Yad list.
   27.22 @@ -21,7 +24,9 @@
   27.23  	done
   27.24  }
   27.25  
   27.26 +
   27.27  # Load the selected kmap file from /usr/share/kbd/keymaps or Busybox kmaps.
   27.28 +
   27.29  load_keymap() {
   27.30  	if [ -x /bin/loadkeys ]; then
   27.31  		loadkeys $kmap
   27.32 @@ -30,12 +35,15 @@
   27.33  	fi
   27.34  }
   27.35  
   27.36 +
   27.37  # Config /etc/keymap.conf and update Xorg keyboard config
   27.38 +
   27.39  system_config() {
   27.40  	echo "$kmap" > /etc/keymap.conf
   27.41  	tazx keyboard
   27.42  }
   27.43  
   27.44 +
   27.45  case "$1" in
   27.46  	info)
   27.47  		_n 'Config file:'; echo " /etc/keymap.conf"
    28.1 --- a/tinyutils/tazlocale	Sat Apr 11 16:46:26 2015 +0300
    28.2 +++ b/tinyutils/tazlocale	Fri Apr 17 07:35:02 2015 +0300
    28.3 @@ -3,13 +3,15 @@
    28.4  # Tazlocale: SliTaz GNU/Linux locale setting using dialog boxes.
    28.5  # Configuration file is: /etc/locale.conf
    28.6  #
    28.7 -# Copyright (C) 2008-2014 SliTaz GNU/Linux - BSD License
    28.8 +# Copyright (C) 2008-2015 SliTaz GNU/Linux - BSD License
    28.9  #
   28.10  # Author: Christophe Lincoln <pankso@slitaz.org>
   28.11  #
   28.12 +
   28.13  . /lib/libtaz.sh
   28.14  export TEXTDOMAIN='slitaz-tools' #i18n
   28.15  
   28.16 +
   28.17  usage() {
   28.18  	newline
   28.19  	_ 'SliTaz GNU/Linux locale setting using dialog boxes.'
   28.20 @@ -28,9 +30,11 @@
   28.21  	newline
   28.22  }
   28.23  
   28.24 +
   28.25  # Make symlink to file, substitute "%%" to "ll_CC", "ll" or "en" according to
   28.26  # current language settings and file existence
   28.27  # (where "ll_CC" - full locale format (lang and country, and maybe, modifier).
   28.28 +
   28.29  make_i18n_link() {
   28.30  	if [ -d $(dirname ${1/.%%/}) ]; then
   28.31  		cd $(dirname ${1/.%%/})
   28.32 @@ -47,33 +51,44 @@
   28.33  	fi
   28.34  }
   28.35  
   28.36 +
   28.37  # Create symlink to translated files provided by SliTaz language pack,
   28.38  # doc and config files.
   28.39 +
   28.40  link_language_files() {
   28.41  	. /etc/locale.conf
   28.42  	LANGUAGE=${LANG%_*}
   28.43  	[ "$LANG" == "POSIX" ] && LANGUAGE="en"
   28.44 +
   28.45  	# Openbox menu
   28.46  	make_i18n_link /etc/xdg/openbox/menu.%%.xml
   28.47 +
   28.48  	# Documentation
   28.49  	make_i18n_link /usr/share/doc/slitaz/index.%%.html
   28.50 +
   28.51  	# SliTaz Software Manuals
   28.52  	for soft in tazpkg tazlito tazusb tazwok tazweb cookutils; do
   28.53  		make_i18n_link /usr/share/doc/$soft/$soft.%%.html
   28.54  	done
   28.55 +
   28.56  	# SliTaz TazWeb "My Web Home"
   28.57  	make_i18n_link /usr/share/tazweb/home.%%.html
   28.58 +
   28.59  	# SliTaz WebHome
   28.60  	make_i18n_link /usr/share/webhome/index.%%.html
   28.61 +
   28.62  	# TazPanel Doc under www
   28.63  	make_i18n_link /var/www/tazpanel/doc/tazpanel.%%.html
   28.64 +
   28.65  	# SliTaz Tools Manuals
   28.66  	for soft in burnbox tazinst; do
   28.67  		make_i18n_link /usr/share/doc/slitaz-tools/$soft.%%.html
   28.68  	done
   28.69  }
   28.70  
   28.71 +
   28.72  # Locale name displayed.
   28.73 +
   28.74  get_locale_name() {
   28.75  	for i in $(ls -1 /usr/share/i18n/locales | grep [a-z]_[A-Z]); do
   28.76  		#desc=$(grep ^title /usr/share/i18n/locales/$i | cut -d '"' -f 2)
   28.77 @@ -81,14 +96,18 @@
   28.78  	done
   28.79  }
   28.80  
   28.81 +
   28.82  # We have no locale files in /usr/lib/locale by default.
   28.83  # Run localedef in background to have a faster boot.
   28.84 +
   28.85  gen_utf8_locale() {
   28.86  	[ -e /usr/lib/locale/$locale ] || \
   28.87  		localedef -i $locale -c -f UTF-8 /usr/lib/locale/$locale &
   28.88  }
   28.89  
   28.90 +
   28.91  # Config /etc/locale.conf
   28.92 +
   28.93  system_config() {
   28.94  	export LC_ALL=$locale
   28.95  	_n "Setting system locale to: $locale"
   28.96 @@ -98,7 +117,9 @@
   28.97  	link_language_files
   28.98  }
   28.99  
  28.100 +
  28.101  # Dialog menu.
  28.102 +
  28.103  dialog_menu() {
  28.104  	exec 3>&1
  28.105  	locale=$($DIALOG  --clear \
    29.1 --- a/tinyutils/tazx	Sat Apr 11 16:46:26 2015 +0300
    29.2 +++ b/tinyutils/tazx	Fri Apr 17 07:35:02 2015 +0300
    29.3 @@ -4,7 +4,7 @@
    29.4  # This tinyutil is part of slitaz-tools. Tazx can configure Xorg with
    29.5  # several Window Managers. The GTK interface to configure X is in tazbox.
    29.6  #
    29.7 -# (c) 2011-2014 SliTaz GNU/Linux - GNU GPL v3.
    29.8 +# (c) 2011-2015 SliTaz GNU/Linux - GNU GPL v3.
    29.9  # Authors: Christophe Lincoln <pankso@slitaz.org>
   29.10  #          Pascal Bellard <pascal.bellard@slitaz.org>
   29.11  #
   29.12 @@ -20,6 +20,7 @@
   29.13  export TEXTDOMAIN='slitaz-tools' #i18n
   29.14  : ${DIALOG=dialog --timeout 60}
   29.15  
   29.16 +
   29.17  # Default user for config files in Live mode, id is 1000 since it is
   29.18  # created by /etc/init.d/bootopts.sh.
   29.19  
   29.20 @@ -492,6 +493,7 @@
   29.21  
   29.22  
   29.23  # Handle live options: screen= video=
   29.24 +
   29.25  proc_cmdline()
   29.26  {
   29.27  	if grep -qs 'screen=' /proc/cmdline ; then
   29.28 @@ -507,6 +509,7 @@
   29.29  	fi
   29.30  }
   29.31  
   29.32 +
   29.33  set_depth()
   29.34  {
   29.35  	case "$1" in
    30.1 --- a/tinyutils/terminal	Sat Apr 11 16:46:26 2015 +0300
    30.2 +++ b/tinyutils/terminal	Fri Apr 17 07:35:02 2015 +0300
    30.3 @@ -1,6 +1,7 @@
    30.4  #!/bin/sh
    30.5  # Launch SliTaz default X Terminal.
    30.6  #
    30.7 +
    30.8  . /etc/slitaz/applications.conf
    30.9  . /lib/libtaz.sh
   30.10  export TEXTDOMAIN='slitaz-tools' #i18n