Advertisement
Guest User

slackware64-setup.sh

a guest
Jun 8th, 2018
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 150.48 KB | None | 0 0
  1. #!/bin/bash
  2. #  > /dev/null 2>&1
  3. # scriptdir=$(cd `dirname $0` && pwd)
  4. # parentdir="$(dirname "$scriptdir")"
  5. # copy whole data to .setup
  6. # run from there
  7. #
  8.  
  9. #
  10. progressbar_char="="
  11. #
  12. #
  13. if [[ $EUID -ne 0 ]]
  14. then
  15.   setterm -bold on
  16.   echo
  17.   echo
  18.   echo "This script must be run as root." 1>&2
  19.   setterm -bold off
  20.   echo
  21.   echo
  22.   exit 1
  23. fi
  24.  
  25. #
  26. #trap ctrl_c INT
  27. #
  28. #function ctrl_c()
  29. #{
  30. # killall $0
  31. #}
  32.  
  33.  
  34.  
  35. function set_color()
  36. {
  37.  echo -e "\e[104m"
  38.  echo -e "\e[97m"
  39. }
  40.  
  41. function bold-on()
  42. {
  43.  setterm -bold on
  44. }
  45.  
  46. function bold-off()
  47. {
  48.  setterm -bold off
  49.  set_color
  50. }
  51.  
  52. function run_as_root()
  53. {
  54.  if [[ $EUID -ne 0 ]]
  55.  then
  56.    bold-on
  57.    echo "This script must be run as root." 1>&2
  58.    bold-off
  59.    exit 1
  60.  fi
  61. }
  62.  
  63. function check_version()
  64. {
  65.  slwv=$(cat /etc/slackware-version)
  66.  if [ "x$slwv" == "xSlackware 14.1" ]
  67.  then
  68.    slwd="slackware64-14.1"
  69.  fi
  70.  if [ "x$slwv" == "xSlackware 14.2" ]
  71.  then
  72.    slwd="slackware64-14.2"
  73.  fi
  74. }
  75.  
  76. function start_screen()
  77. {
  78.  clear
  79.  echo /$slwd-setup
  80.  echo
  81.  echo
  82.  bold-on
  83.  echo "====================="
  84.  echo "= Slackware64-Setup ="
  85.  echo "====================="
  86.  bold-off
  87.  echo
  88.  echo
  89.  echo "This will install a custom Slackware64 Setup."
  90.  echo
  91.  echo
  92.  echo "Detected Slackware version: "
  93.  echo
  94.  echo
  95.  bold-on
  96.  echo -n $slwd
  97.  bold-off
  98.  echo
  99.  echo
  100.  bold-on
  101.  echo [RETURN] to continue...
  102.  bold-off
  103.  read installer
  104. }
  105.  
  106. function input_add_user()
  107. {
  108.  clear
  109.  echo /$slwd-setup/add-new-user
  110.  echo
  111.  echo
  112.  echo
  113.  bold-on
  114.  echo "Add New User"
  115.  echo "============"
  116.  bold-off
  117.  echo
  118.  echo
  119.  echo -n "Username:         "
  120.  read user
  121.  if [ "x$user" == "x" ]
  122.  then
  123.    $user=""
  124.    $password=""
  125.    input_add_user
  126.  fi
  127.  echo -n "Password:         "
  128.  read -s password
  129.  if [ "x$password" == "x" ]
  130.  then
  131.    $user=""
  132.    $password=""
  133.    input_add_user
  134.  fi
  135.  echo
  136.  echo -n "Re-type Password: "
  137.  read -s password2
  138.  echo
  139.  if ! [ "x$password" == "x$password2" ]
  140.  then
  141.    $user=""
  142.    $password=""
  143.    input_add_user
  144.  fi
  145.  if [ "x$password" == "x" ]
  146.  then
  147.    $user=""
  148.    $password=""
  149.    input_add_user
  150.  fi
  151. }
  152.  
  153. function input_setup_kernel()
  154. {
  155.  echo > /dev/null
  156. }
  157.  
  158. function input_setup_nvidia()
  159. {
  160.  clear
  161.  echo /$slwd-setup/nvidia-driver
  162.  echo
  163.  echo
  164.  echo
  165.  bold-on
  166.  echo NVIDIA Graphics Driver Version
  167.  echo ==============================
  168.  bold-off
  169.  echo
  170.  echo
  171.  PS3='?) '
  172.  options=("304.131 for NVIDIA Quadro FX 1800 / GTX 275 / GT 330M / GT 630" "340.96  for NVIDIA Quadro FX 1800 / GTX 275 / GT 330M / GT 630"   "361.28  for NVIDIA GT 630 / 840M / GTX 750TI / GTX 970" "None")
  173.  select opt in "${options[@]}"
  174.  do
  175.    case $opt in
  176.      "304.131 for NVIDIA Quadro FX 1800 / GTX 275 / GT 330M / GT 630")
  177.        install_nvidia="304.131"
  178.        break
  179.        ;;
  180.      "340.96  for NVIDIA Quadro FX 1800 / GTX 275 / GT 330M / GT 630")
  181.        install_nvidia="340.94"
  182.        break
  183.        ;;
  184.      "361.28  for NVIDIA GT 630 / 840M / GTX 750TI / GTX 970")
  185.        install_nvidia="361.28"
  186.        break
  187.        ;;
  188.      "None")
  189.        install_nvidia="none"
  190.        break
  191.        ;;
  192.      *) input_setup_nvidia;;
  193.    esac
  194.  done
  195. }
  196.  
  197. function input_setup_usb_polling()
  198. {
  199.  clear
  200.  echo /$slwd-setup/usb-polling
  201.  echo
  202.  echo
  203.  echo
  204.  bold-on
  205.  echo USB-Polling Rate
  206.  echo ================
  207.  bold-off
  208.  echo
  209.  echo
  210.  PS3='?) '
  211.  options=("125 Hz" "250 Hz" "500 Hz" "1000 Hz" "None")
  212.  select opt in "${options[@]}"
  213.  do
  214.    case $opt in
  215.      "125 Hz")
  216.        usb_polling="8"
  217.        usb_hz="125"
  218.        break
  219.        ;;
  220.      "250 Hz")
  221.        usb_polling="4"
  222.        usb_hz="250"
  223.        break
  224.        ;;
  225.      "500 Hz")
  226.        usb_polling="2"
  227.        usb_hz="500"
  228.        break
  229.        ;;
  230.      "1000 Hz")
  231.        echo "1000 Hz"
  232.        usb_polling="1"
  233.        usb_hz="1000"
  234.        break
  235.        ;;
  236.      "None")
  237.        usb_polling="none"
  238.        usb_hz="-"
  239.        break
  240.        ;;
  241.      *) input_setup_usb_polling;;
  242.    esac
  243.  done
  244. }
  245.  
  246. function input_german-language()
  247. {
  248.  clear
  249.  echo /$slwd-setup/german-language
  250.  echo
  251.  echo
  252.  echo
  253.  bold-on
  254.  echo German Language
  255.  echo ===============
  256.  bold-off
  257.  echo
  258.  echo
  259.  PS3='?) '
  260.  options=("yes" "no")
  261.  select opt in "${options[@]}"
  262.  do
  263.    case $opt in
  264.        "yes")
  265.            german_language="yes"
  266.            break
  267.            ;;
  268.        "no")
  269.            german_language="no"
  270.            break
  271.            ;;
  272.        *) input_german-language;;
  273.    esac
  274.  done
  275.  echo
  276. }
  277.  
  278. function input_install_roccat_tools()
  279. {
  280.  clear
  281.  echo /$slwd-setup/roccat-tools
  282.  echo
  283.  echo
  284.  echo
  285.  bold-on
  286.  echo Install Roccat-Tools
  287.  echo ====================
  288.  bold-off
  289.  echo
  290.  echo
  291.  PS3='?) '
  292.  options=("yes" "no")
  293.  select opt in "${options[@]}"
  294.  do
  295.    case $opt in
  296.        "yes")
  297.            install_roccat="yes"
  298.            break
  299.            ;;
  300.        "no")
  301.            install_roccat="no"
  302.            break
  303.            ;;
  304.        *) input_install_roccat_tools;;
  305.    esac
  306.  done
  307.  echo
  308. }
  309.  
  310. function input_confirm_settings()
  311. {
  312.  clear
  313.  echo /$slwd-setup/confirm-settings
  314.  echo
  315.  echo
  316.  echo
  317.  bold-on
  318.  echo Confirm Settings
  319.  echo ================
  320.  bold-off
  321.  echo
  322.  echo "German Language:         $german_language"
  323.  echo "Username:                $user"
  324.  echo "NVIDIA Driver Version:   $install_nvidia"
  325.  echo "USB-Polling Rate:        $usb_hz Hz"
  326.  echo "Install Roccat-Tools:    $install_roccat"
  327.  echo
  328.  echo
  329.  echo
  330.  bold-on
  331.  echo -n Is this correct?
  332.  bold-off
  333.  echo
  334.  PS3='?) '
  335.  options=("yes" "no")
  336.  select opt in "${options[@]}"
  337.  do
  338.    case $opt in
  339.      "yes")
  340.        input_correct="yes"
  341.        break
  342.        ;;
  343.      "no")
  344.        break
  345.        input_correct="no"
  346.        ;;
  347.      *) input_confirm_settings;;
  348.    esac
  349.  done
  350. }
  351.  
  352. function add_user()
  353. {
  354.  groupadd $user > /dev/null 2>&1
  355.  useradd -d /home/$user -m -s /bin/bash -g $user -G users,audio,cdrom,disk,floppy,plugdev,video,power,netdev,lp,scanner $user > /dev/null 2>&1
  356.  echo "$user:$password" | chpasswd > /dev/null 2>&1
  357.  export user
  358.  cp /root/.xinitrc /home/$user/
  359.  chown -R $user:$user /home/$user > /dev/null 2>&1
  360.  mkdir -p /root/.hackware/
  361.  if ! [ -e "/root/.hackware/user" ]
  362.  then
  363.    bash -c 'echo "$user ALL=(ALL:ALL) ALL" | (EDITOR="tee -a" visudo)' > /dev/null 2>&1
  364.    echo $user > /root/.hackware/user
  365.  fi
  366. }
  367.  
  368. function setup()
  369. {
  370.  length1=${#1}
  371.  z=$(calc 25-$length1)
  372.  for (( c=1; c<=$z; c++ ))
  373.    do
  374.    echo -n " "
  375.  done
  376.  echo -n "$1 $progressbar_char"
  377.  
  378.  if [ "$1" == "misc" ] ||
  379.  [ "$1" == "libraries" ] ||
  380.  [ "$1" == "packages" ] ||
  381.  [ "$1" == "slackware64-14.1-update" ]
  382.  then
  383.    echo -e "\033[2A"
  384.  fi
  385.  
  386.  progress_bar setup_$1
  387.  
  388. }
  389.  
  390. function progress_bar()
  391. {
  392.  while true;
  393.  do          
  394.    sleep 2
  395.    echo -n "$progressbar_char"
  396.  done &
  397.  "$1"
  398.  kill $!; trap 'kill $!' SIGTERM
  399.  echo
  400. }
  401.  
  402. function echox()
  403. {
  404.  echo
  405.  length1=${#1}
  406.  z=$(calc 25-$length1)
  407.  for (( c=1; c<=$z; c++ ))
  408.    do
  409.    echo -n " "
  410.  done
  411.  echo -n "$1 $progressbar_char"
  412. }
  413.  
  414. function calc()
  415. {
  416.  awk "BEGIN{print $*}";
  417. }
  418.  
  419. function setup_kernel()
  420. {
  421.  null
  422. }
  423.  
  424. function setup_lilo()
  425. {
  426.  if ! grep -q '###setup' '/etc/lilo.conf';
  427.  then
  428.    cp ./data/pool/misc/lilo/hackware-boot.bmp /boot/ > /dev/null 2>&1
  429.    if grep -q ' vt.default_utf8=1' '/etc/lilo.conf';
  430.    then
  431.      if ! [ "$install_nvidia" == "none" ]  
  432.      then
  433.        sed -i s:" vt.default_utf8=1":" nosoftlockup mce=ignore_ce idle=poll vt.color=0x70 nomodeset ipv6.disable=1 intel_pstate=disable intel_idle.max_cstate=0 nmi_watchdog=0 selinux=0 vt.default_utf8=1":g /etc/lilo.conf  > /dev/null 2>&1
  434.      else
  435.        sed -i s:" vt.default_utf8=1":" nosoftlockup mce=ignore_ce idle=poll vt.color=0x70 ipv6.disable=1 intel_pstate=disable intel_idle.max_cstate=0 nmi_watchdog=0 selinux=0 vt.default_utf8=1":g /etc/lilo.conf  > /dev/null 2>&1  
  436.      fi
  437.    fi
  438.    if grep -q ' vt.default_utf8=0' '/etc/lilo.conf';
  439.    then
  440.      if ! [ "$install_nvidia" == "none" ]  
  441.      then
  442.        sed -i s:" vt.default_utf8=0":" nosoftlockup mce=ignore_ce idle=poll vt.color=0x70 nomodeset ipv6.disable=1 intel_pstate=disable intel_idle.max_cstate=0 nmi_watchdog=0 selinux=0 vt.default_utf8=1":g /etc/lilo.conf  > /dev/null 2>&1
  443.      else
  444.         sed -i s:" vt.default_utf8=0":" nosoftlockup mce=ignore_ce idle=poll vt.color=0x70 ipv6.disable=1 intel_pstate=disable intel_idle.max_cstate=0 nmi_watchdog=0 selinux=0 vt.default_utf8=1":g /etc/lilo.conf  > /dev/null 2>&1
  445.      fi
  446.    fi
  447.    echo "###setup" >> /etc/lilo.conf
  448.    sed -i s:"#compact":"compact":g /etc/lilo.conf  > /dev/null 2>&1
  449.    sed -i s:"vga = normal":"#vga = normal":g /etc/lilo.conf  > /dev/null 2>&1
  450.    sed -i s:"#vga=771":"vga=771":g /etc/lilo.conf  > /dev/null 2>&1
  451.    sed -i s:"timeout = 1200":"timeout = 120":g /etc/lilo.conf  > /dev/null 2>&1
  452.    sed -i s:"bitmap = /boot/slack.bmp":"bitmap = /boot/hackware-boot.bmp":g /etc/lilo.conf  > /dev/null 2>&1
  453.    sed -i s:"bmp-colors = 255,0,255,0,255,0":"bmp-colors = 254,0,254,0,254,0":g /etc/lilo.conf  > /dev/null 2>&1
  454.    sed -i s:"bmp-timer = 65,27,0,255":"bmp-timer = 65,27,0,254":g /etc/lilo.conf  > /dev/null 2>&1
  455.    #
  456.    sed -i s:"label = Linux":"label = $(uname -r)":g /etc/lilo.conf  > /dev/null 2>&1
  457.    #^ make save detect from boot-dir standard kernel
  458.    # use default= x.x.x-zen for zen kernel at beginning of lilo.conf file
  459.    lilo  > /dev/null 2>&1
  460.  fi
  461. }
  462.  
  463. function setup_fstab()
  464. {
  465.  mount > /tmp/fschk
  466.  line1=$(head -1 /tmp/fschk)
  467.  rm /tmp/fschk
  468.  IFS=$'\n'; array=($(echo $line1 | egrep -o '"[^"]*"|\S+'))
  469.  fstype=${array[4]}
  470.  echo "/dev/sda1       /                $fstype        defaults,noatime                    1   1" > /etc/fstab
  471.  #
  472.  echo "/dev/cdrom      /mnt/cdrom       auto        noatime,nosuid,nodev,noauto,owner,ro,comment=x-gvfs-show 0   0" >> /etc/fstab
  473.  #
  474.  echo "devpts          /dev/pts         devpts      noatime,gid=5,mode=620,nosuid               0   0" >> /etc/fstab
  475.  echo "proc            /proc            proc        defaults,noatime,nodev,nosuid                   0   0" >> /etc/fstab
  476.  echo "tmpfs           /dev/shm         tmpfs       defaults,noatime,nodev,nosuid             0   0" >> /etc/fstab
  477.  echo "tmpfs           /tmp             tmpfs       nosuid,noatime,nodev                      0   0" >> /etc/fstab
  478.  echo "tmpfs           /var/tmp         tmpfs       nosuid,noatime,nodev,noexec                      0   0" >> /etc/fstab
  479.  echo "tmpfs           /run             tmpfs       nosuid,noatime,nodev                      0   0" >> /etc/fstab
  480.  
  481. }
  482.  
  483. function setup_network()
  484. {
  485.  null
  486.  #
  487.  #
  488.  #if ! grep -q "MTU\[0\]" /etc/rc.d/rc.inet1.conf; then echo 'MTU[0]="1428"' >> /etc/rc.d/rc.inet1.conf; fi  
  489.  #echo 'net.core.rmem_max=8388608' > /etc/sysctl.conf
  490.  #echo 'net.core.wmem_max=8388608' >> /etc/sysctl.conf
  491.  #echo 'net.core.rmem_default=65536' >> /etc/sysctl.conf
  492.  #echo 'net.core.wmem_default=65536' >> /etc/sysctl.conf
  493.  #echo 'net.ipv4.tcp_rmem=4096 87380 8388608' >> /etc/sysctl.conf
  494.  #echo 'net.ipv4.tcp_wmem=4096 65536 8388608' >> /etc/sysctl.conf
  495.  #echo 'net.ipv4.tcp_mem=8388608 8388608 8388608' >> /etc/sysctl.conf
  496.  #echo 'net.ipv4.route.flush=1' >> /etc/sysctl.conf
  497.  #sysctl -p  > /dev/null 2>&1
  498.  #echo '#!/bin/bash' > /etc/htb.sh
  499.  #echo '' >> /etc/htb.sh
  500.  #echo '# The Ultimate Setup For Your Internet Connection At Home' >> /etc/htb.sh
  501.  #echo '#' >> /etc/htb.sh
  502.  #echo '#' >> /etc/htb.sh
  503.  #echo '# Set the following values to somewhat less than your actual download' >> /etc/htb.sh
  504.  #echo '# and uplink speed. In kilobits' >> /etc/htb.sh
  505.  #echo 'DOWNLINK=2500' >> /etc/htb.sh
  506.  #echo 'UPLINK=200' >> /etc/htb.sh
  507.  #echo 'DEV=eth0' >> /etc/htb.sh
  508.  #echo '' >> /etc/htb.sh
  509.  #echo '# clean existing down- and uplink qdiscs, hide errors' >> /etc/htb.sh
  510.  #echo 'tc qdisc del dev $DEV root    2> /dev/null > /dev/null' >> /etc/htb.sh
  511.  #echo 'tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null' >> /etc/htb.sh
  512.  #echo '' >> /etc/htb.sh
  513.  #echo '###### uplink' >> /etc/htb.sh
  514.  #echo '' >> /etc/htb.sh
  515.  #echo '# install root HTB, point default traffic to 1:20:' >> /etc/htb.sh
  516.  #echo '' >> /etc/htb.sh
  517.  #echo 'tc qdisc add dev $DEV root handle 1: htb default 20' >> /etc/htb.sh
  518.  #echo '' >> /etc/htb.sh
  519.  #echo '# shape everything at $UPLINK speed - this prevents huge queues in your' >> /etc/htb.sh
  520.  #echo '# DSL modem which destroy latency:' >> /etc/htb.sh
  521.  #echo '' >> /etc/htb.sh
  522.  #echo 'tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k' >> /etc/htb.sh
  523.  #echo '' >> /etc/htb.sh
  524.  #echo '# high prio class 1:10:' >> /etc/htb.sh
  525.  #echo '' >> /etc/htb.sh
  526.  #echo 'tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \' >> /etc/htb.sh
  527.  #echo '   burst 6k prio 1' >> /etc/htb.sh
  528.  #echo '' >> /etc/htb.sh
  529.  #echo '# bulk & default class 1:20 - gets slightly less traffic, ' >> /etc/htb.sh
  530.  #echo '# and a lower priority:' >> /etc/htb.sh
  531.  #echo '' >> /etc/htb.sh
  532.  #echo 'tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[9*$UPLINK/10]kbit \' >> /etc/htb.sh
  533.  #echo '   burst 6k prio 2' >> /etc/htb.sh
  534.  #echo '' >> /etc/htb.sh
  535.  #echo '# both get Stochastic Fairness:' >> /etc/htb.sh
  536.  #echo 'tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10' >> /etc/htb.sh
  537.  #echo 'tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10' >> /etc/htb.sh
  538.  #echo '' >> /etc/htb.sh
  539.  #echo '# TOS Minimum Delay (ssh, NOT scp) in 1:10:' >> /etc/htb.sh
  540.  #echo 'tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \' >> /etc/htb.sh
  541.  #echo '      match ip tos 0x10 0xff  flowid 1:10' >> /etc/htb.sh
  542.  #echo '' >> /etc/htb.sh
  543.  #echo '# ICMP (ip protocol 1) in the interactive class 1:10 so we' >> /etc/htb.sh
  544.  #echo '# can do measurements & impress our friends:' >> /etc/htb.sh
  545.  #echo 'tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \' >> /etc/htb.sh
  546.  #echo '    match ip protocol 1 0xff flowid 1:10' >> /etc/htb.sh
  547.  #echo '' >> /etc/htb.sh
  548.  #echo '# To speed up downloads while an upload is going on, put ACK packets in' >> /etc/htb.sh
  549.  #echo '# the interactive class:' >> /etc/htb.sh
  550.  #echo '' >> /etc/htb.sh
  551.  #echo 'tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \' >> /etc/htb.sh
  552.  #echo '   match ip protocol 6 0xff \' >> /etc/htb.sh
  553.  #echo '   match u8 0x05 0x0f at 0 \' >> /etc/htb.sh
  554.  #echo '   match u16 0x0000 0xffc0 at 2 \' >> /etc/htb.sh
  555.  #echo '   match u8 0x10 0xff at 33 \' >> /etc/htb.sh
  556.  #echo '   flowid 1:10' >> /etc/htb.sh
  557.  #echo '' >> /etc/htb.sh
  558.  #echo '# rest is 'non-interactive' ie 'bulk' and ends up in 1:20' >> /etc/htb.sh
  559.  #echo '' >> /etc/htb.sh
  560.  #echo '' >> /etc/htb.sh
  561.  #echo '########## downlink #############' >> /etc/htb.sh
  562.  #echo '# slow downloads down to somewhat less than the real speed  to prevent ' >> /etc/htb.sh
  563.  #echo '# queuing at our ISP. Tune to see how high you can set it.' >> /etc/htb.sh
  564.  #echo '# ISPs tend to have *huge* queues to make sure big downloads are fast' >> /etc/htb.sh
  565.  #echo '#' >> /etc/htb.sh
  566.  #echo '# attach ingress policer:' >> /etc/htb.sh
  567.  #echo '' >> /etc/htb.sh
  568.  #echo 'tc qdisc add dev $DEV handle ffff: ingress' >> /etc/htb.sh
  569.  #echo '' >> /etc/htb.sh
  570.  #echo '# filter *everything* to it (0.0.0.0/0), drop everything thats' >> /etc/htb.sh
  571.  #echo '# coming in too fast:' >> /etc/htb.sh
  572.  #echo '' >> /etc/htb.sh
  573.  #echo 'tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \' >> /etc/htb.sh
  574.  #echo '   0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1' >> /etc/htb.sh
  575.  #chmod +x /etc/htb.sh
  576. }
  577.  
  578. function setup_rc.local()
  579. {
  580.  echo "#!/bin/sh" > /etc/rc.d/rc.local
  581.  echo "#" >> /etc/rc.d/rc.local
  582.  echo "# /etc/rc.d/rc.local:  Local system initialization script." >> /etc/rc.d/rc.local
  583.  echo "#" >> /etc/rc.d/rc.local
  584.  echo "# Put any local startup commands in here.  Also, if you have" >> /etc/rc.d/rc.local
  585.  echo "# anything that needs to be run at shutdown time you can" >> /etc/rc.d/rc.local
  586.  echo "# make an /etc/rc.d/rc.local_shutdown script and put those" >> /etc/rc.d/rc.local
  587.  echo "# commands in there." >> /etc/rc.d/rc.local
  588.  echo "#" >> /etc/rc.d/rc.local
  589.  echo "if [ -d "/sys/kernel/mm/transparent_hugepage" ]" >> /etc/rc.d/rc.local
  590.  echo "then" >> /etc/rc.d/rc.local
  591.  echo "  echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.d/rc.local
  592.  echo "fi" >> /etc/rc.d/rc.local
  593.  echo "#" >> /etc/rc.d/rc.local
  594.  echo "if [ -d "/sys/kernel/mm/transparent_hugepage" ]" >> /etc/rc.d/rc.local
  595.  echo "then" >> /etc/rc.d/rc.local
  596.  echo "  echo never > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.d/rc.local
  597.  echo "fi" >> /etc/rc.d/rc.local
  598.  echo "#" >> /etc/rc.d/rc.local
  599.  echo "if [ -f "/proc/sys/kernel/sched_latency_ns" ]" >> /etc/rc.d/rc.local
  600.  echo "then" >> /etc/rc.d/rc.local
  601.  echo "  echo 8000000 > /proc/sys/kernel/sched_latency_ns" >> /etc/rc.d/rc.local
  602.  echo "fi" >> /etc/rc.d/rc.local
  603.  echo "#" >> /etc/rc.d/rc.local
  604.  echo "# -f ?" >> /etc/rc.d/rc.local
  605.  echo "#if [ -d "/proc/sys/kernel/rr_interval" ]" >> /etc/rc.d/rc.local
  606.  echo "#then" >> /etc/rc.d/rc.local
  607.  echo "#  echo 6 > /proc/sys/kernel/rr_interval" >> /etc/rc.d/rc.local
  608.  echo "#fi" >> /etc/rc.d/rc.local
  609.  echo "#" >> /etc/rc.d/rc.local
  610.  echo "if [ -d "/sys/module/snd_hda_intel/parameters" ]" >> /etc/rc.d/rc.local
  611.  echo "then" >> /etc/rc.d/rc.local
  612.  echo "  echo 0 > /sys/module/snd_hda_intel/parameters/power_save" >> /etc/rc.d/rc.local
  613.  echo "fi" >> /etc/rc.d/rc.local
  614.  echo "#" >> /etc/rc.d/rc.local
  615.  echo "if [ -d "/sys/module/snd_hda_intel/parameters" ]" >> /etc/rc.d/rc.local
  616.  echo "then" >> /etc/rc.d/rc.local
  617.  echo "  echo N > /sys/module/snd_hda_intel/parameters/power_save_controller" >> /etc/rc.d/rc.local
  618.  echo "fi" >> /etc/rc.d/rc.local
  619.  echo "#" >> /etc/rc.d/rc.local
  620.  echo "if [ -d "/sys/module/drm_kms_helper/parameters/" ]" >> /etc/rc.d/rc.local
  621.  echo "then" >> /etc/rc.d/rc.local
  622.  echo "  echo N > /sys/module/drm_kms_helper/parameters/poll" >> /etc/rc.d/rc.local
  623.  echo "fi" >> /etc/rc.d/rc.local
  624.  echo "#" >> /etc/rc.d/rc.local
  625.  #
  626.  ##original
  627.  ##echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
  628.  ##echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes
  629.  #
  630.  echo "#" >> /etc/rc.d/rc.local
  631.  echo "echo $((8*1024*1024)) > /proc/sys/vm/dirty_background_bytes" >> /etc/rc.d/rc.local
  632.  echo "echo $((32*1024*1024)) > /proc/sys/vm/dirty_bytes" >> /etc/rc.d/rc.local
  633.  echo "#" >> /etc/rc.d/rc.local
  634.  echo "/usr/local/sbin/irqbalance > /dev/null 2>&1" >> /etc/rc.d/rc.local
  635.  echo "#" >> /etc/rc.d/rc.local
  636.  echo "#locate -u > /dev/null 2>&1" >> /etc/rc.d/rc.local
  637.  #echo "newuser=$(</root/.hackware/user) > /dev/null 2>&1" >> /etc/rc.d/rc.local
  638.  echo "#" >> /etc/rc.d/rc.local
  639.  echo "rm -rf /root/.thumbnails/* > /dev/null 2>&1" >> /etc/rc.d/rc.local
  640.  echo "rm -rf /home/$user/.thumbnails/* > /dev/null 2>&1" >> /etc/rc.d/rc.local
  641.  echo "#" >> /etc/rc.d/rc.local
  642.  echo "setterm -background white -foreground black -bold off -store" >> /etc/rc.d/rc.local
  643.  echo "#" >> /etc/rc.d/rc.local
  644.  echo "modprobe drm_kms_helper" >> /etc/rc.d/rc.local
  645.  echo "echo N > /sys/module/drm_kms_helper/parameters/poll" >> /etc/rc.d/rc.local
  646.  echo "#" >> /etc/rc.d/rc.local
  647.  echo "clear" >> /etc/rc.d/rc.local
  648.  chmod +x /etc/rc.d/rc.local
  649. }
  650.  
  651. function setup_modules()
  652. {
  653.  #chmod -x /etc/rc.d/rc.loop > /dev/null 2>&1
  654.  #modprobe -r loop >> /dev/null 2>&1
  655.  sed -i s:"/sbin/modprobe -q parport_pc 2> /dev/null":"#/sbin/modprobe -q parport_pc 2> /dev/null":g /etc/rc.d/rc.modules
  656.  sed -i s:"/sbin/modprobe -q lp 2> /dev/null":"#/sbin/modprobe -q lp 2> /dev/null":g /etc/rc.d/rc.modules
  657.  sed -i s:"/sbin/modprobe agpgart 2> /dev/null":"#/sbin/modprobe agpgart 2> /dev/null":g /etc/rc.d/rc.modules
  658.  echo "blacklist agpgart" > /etc/modprobe.d/blacklist.conf
  659.  if ! [ "$install_nvidia" == "none" ]
  660.  then
  661.    echo "blacklist nouveau" > /etc/modprobe.d/blacklist.conf
  662.  fi
  663.  echo "blacklist acpi_cpufreq" >> /etc/modprobe.d/blacklist.conf
  664.  echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf
  665.  echo "blacklist cfg80211" >> /etc/modprobe.d/blacklist.conf
  666.  echo "blacklist rfkill" >> /etc/modprobe.d/blacklist.conf
  667.  echo "blacklist joydev" >> /etc/modprobe.d/blacklist.conf
  668.  echo "blacklist i2c_dev" >> /etc/modprobe.d/blacklist.conf
  669.  echo "blacklist coretemp" >> /etc/modprobe.d/blacklist.conf
  670.  echo "blacklist kvm_intel" >> /etc/modprobe.d/blacklist.conf
  671.  echo "blacklist kvm" >> /etc/modprobe.d/blacklist.conf
  672.  echo "blacklist crc32c_intel" >> /etc/modprobe.d/blacklist.conf
  673.  echo "blacklist psmouse" >> /etc/modprobe.d/blacklist.conf
  674.  echo "blacklist serio_raw" >> /etc/modprobe.d/blacklist.conf
  675.  echo "blacklist ptp" >> /etc/modprobe.d/blacklist.conf
  676.  echo "blacklist i2c_i801" >> /etc/modprobe.d/blacklist.conf
  677.  echo "blacklist lpc_ich" >> /etc/modprobe.d/blacklist.conf
  678.  echo "blacklist 8250_fintek" >> /etc/modprobe.d/blacklist.conf
  679.  echo "blacklist tpm_tis" >> /etc/modprobe.d/blacklist.conf
  680.  echo "blacklist tpm" >> /etc/modprobe.d/blacklist.conf
  681.  echo "blacklist wmi" >> /etc/modprobe.d/blacklist.conf
  682.  echo "blacklist button" >> /etc/modprobe.d/blacklist.conf
  683.  echo "blacklist shpchp" >> /etc/modprobe.d/blacklist.conf
  684.  echo "blacklist pci_stub" >> /etc/modprobe.d/blacklist.conf
  685.  echo "blacklist parport_pc" >> /etc/modprobe.d/blacklist.conf
  686.  echo "blacklist parport" >> /etc/modprobe.d/blacklist.conf
  687.  echo "blacklist lp" >> /etc/modprobe.d/blacklist.conf
  688.  echo "blacklist ppdev" >> /etc/modprobe.d/blacklist.conf
  689.  echo "blacklist mbcache" >> /etc/modprobe.d/blacklist.conf
  690.  echo "blacklist fuse" >> /etc/modprobe.d/blacklist.conf
  691.  echo "blacklist fjes" >> /etc/modprobe.d/blacklist.conf
  692. }
  693.  
  694. function setup_services()
  695. {
  696.  chmod -x /etc/rc.d/rc.acpid > /dev/null 2>&1
  697.  chmod -x /etc/rc.d/rc.alsa > /dev/null 2>&1
  698.  chmod -x /etc/rc.d/rc.alsa-oss > /dev/null 2>&1
  699.  chmod -x /etc/rc.d/rc.atalk > /dev/null 2>&1
  700.  chmod -x /etc/rc.d/rc.autofs > /dev/null 2>&1
  701.  chmod -x /etc/rc.d/rc.bind > /dev/null 2>&1
  702.  chmod -x /etc/rc.d/rc.bluetooth > /dev/null 2>&1
  703.  chmod -x /etc/rc.d/rc.cgconfig > /dev/null 2>&1
  704.  chmod -x /etc/rc.d/rc.cgred > /dev/null 2>&1
  705.  chmod -x /etc/rc.d/rc.consolekit > /dev/null 2>&1
  706.  chmod -x /etc/rc.d/rc.cups > /dev/null 2>&1
  707.  chmod -x /etc/rc.d/rc.cups-browsed > /dev/null 2>&1
  708.  chmod -x /etc/rc.d/rc.cups-browsed.new > /dev/null 2>&1
  709.  chmod -x /etc/rc.d/rc.dnsmasq > /dev/null 2>&1
  710.  chmod -x /etc/rc.d/rc.font > /dev/null 2>&1
  711.  chmod -x /etc/rc.d/rc.fuse > /dev/null 2>&1
  712.  chmod -x /etc/rc.d/rc.gpm-sample > /dev/null 2>&1
  713.  chmod -x /etc/rc.d/rc.httpd > /dev/null 2>&1
  714.  chmod -x /etc/rc.d/rc.inetd > /dev/null 2>&1
  715.  chmod -x /etc/rc.d/rc.ip-forward > /dev/null 2>&1
  716.  chmod -x /etc/rc.d/rc.lxc > /dev/null 2>&1
  717.  chmod -x /etc/rc.d/rc.mcelog > /dev/null 2>&1
  718.  chmod -x /etc/rc.d/rc.mysqld > /dev/null 2>&1
  719.  chmod -x /etc/rc.d/rc.networkmanager > /dev/null 2>&1
  720.  chmod -x /etc/rc.d/rc.nfsd > /dev/null 2>&1
  721.  chmod -x /etc/rc.d/rc.ntpd > /dev/null 2>&1
  722.  chmod -x /etc/rc.d/rc.pcmcia > /dev/null 2>&1
  723.  chmod -x /etc/rc.d/rc.php-fpm > /dev/null 2>&1
  724.  chmod -x /etc/rc.d/rc.pulseaudio > /dev/null 2>&1
  725.  chmod -x /etc/rc.d/rc.rpc > /dev/null 2>&1
  726.  chmod -x /etc/rc.d/rc.samba > /dev/null 2>&1
  727.  chmod -x /etc/rc.d/rc.saslauthd > /dev/null 2>&1
  728.  chmod -x /etc/rc.d/rc.sendmail > /dev/null 2>&1
  729.  chmod -x /etc/rc.d/rc.serial > /dev/null 2>&1
  730.  chmod -x /etc/rc.d/rc.snmpd > /dev/null 2>&1
  731.  chmod -x /etc/rc.d/rc.sshd > /dev/null 2>&1
  732.  chmod -x /etc/rc.d/rc.sysstat > /dev/null 2>&1
  733.  chmod -x /etc/rc.d/rc.wireless > /dev/null 2>&1
  734.  chmod -x /etc/rc.d/rc.yp > /dev/null 2>&1
  735.  #
  736.  chmod -x /usr/sbin/crond > /dev/null 2>&1
  737.  chmod -x /usr/sbin/atd > /dev/null 2>&1
  738.  chmod -x /usr/bin/ssh-agent > /dev/null 2>&1
  739.  chmod -x /usr/bin/gpg-agent > /dev/null 2>&1
  740.  chmod -x /usr/libexec/upowerd > /dev/null 2>&1
  741.  chmod -x /usr/lib64/tumbler-1/tumblerd > /dev/null 2>&1
  742.  #
  743.  chmod -x /usr/bin/xfce4-power-manager > /dev/null 2>&1
  744.  #chmod -x /usr/bin/system-config-printer-applet > /dev/null 2>&1
  745.  #chmod -x /usr/bin/xscreensaver > /dev/null 2>&1
  746.  #chmod -x /usr/bin/blueman-applet > /dev/null 2>&1
  747.  #chmod -x /usr/bin/hp-systray > /dev/null 2>&1
  748.  #chmod -x /usr/bin/nm-applet > /dev/null 2>&1
  749. }
  750.  
  751. function setup_usb-polling()
  752. {
  753.  if ! [ "$usb_polling" == "none" ]
  754.  then
  755.    if ! [ "$usb_polling" == "" ]
  756.    then
  757.      echo "options usbhid mousepoll=$usb_polling" > /etc/modprobe.d/usbhid.conf
  758.    fi
  759.  fi
  760. }
  761.  
  762. function setup_german-language()
  763. {
  764.  
  765.  #en_US.UTF-8
  766.  sed -i s:"export LANG=en_US":"export LANG=de_DE.UTF8":g /etc/profile.d/lang.sh  > /dev/null 2>&1
  767.  
  768.  
  769.  sed -i s:"en_US":"de_DE.UTF8":g /etc/profile.d/lang.csh  > /dev/null 2>&1
  770.  cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d/ > /dev/null 2>&1
  771.  sed -i s:'Option "XkbLayout" "us"':'Option "XkbLayout" "de"':g /etc/X11/xorg.conf.d/90-keyboard-layout.conf > /dev/null 2>&1
  772.  sed -i s:'#Option "XkbVariant" ""':'Option "XkbVariant" "nodeadkeys"':g /etc/X11/xorg.conf.d/90-keyboard-layout.conf > /dev/null 2>&1
  773. }
  774.  
  775. function setup_slackware64-14.1-update()
  776. {
  777.  cd data/pool/slackware64-14.1/updates
  778.  echox apr
  779.  upgradepkg apr-1.4.6-x86_64-1.txz%apr-1.5.0-x86_64-1_slack14.1.txz > /dev/null 2>&1
  780.  echox apr-util
  781.  upgradepkg apr-util-1.5.1-x86_64-1.txz%apr-util-1.5.3-x86_64-1_slack14.1.txz > /dev/null 2>&1
  782.  echox bash
  783.  upgradepkg bash-4.2.045-x86_64-1.txz%bash-4.2.053-x86_64-1_slack14.1.txz > /dev/null 2>&1
  784.  echox bind
  785.  upgradepkg bind-9.9.3_P2-x86_64-1.txz%bind-9.9.8_P2-x86_64-1_slack14.1.txz > /dev/null 2>&1
  786.  echox blueman
  787.  upgradepkg blueman-r708-x86_64-3.txz%blueman-r708-x86_64-4_slack14.1.txz > /dev/null 2>&1
  788.  echox btrfs-progs
  789.  upgradepkg btrfs-progs-20130418-x86_64-1.txz%btrfs-progs-20150213-x86_64-1.txz > /dev/null 2>&1
  790.  echox ca-certificates
  791.  upgradepkg ca-certificates-20130906-noarch-1.txz%ca-certificates-20150426-noarch-2_slack14.1.txz > /dev/null 2>&1
  792.  echox cairo
  793.  upgradepkg cairo-1.12.14-x86_64-1.txz%cairo-1.12.16-x86_64-1_slack14.1.txz > /dev/null 2>&1
  794.  echox cups
  795.  upgradepkg cups-1.5.4-x86_64-3.txz%cups-1.5.4-x86_64-4_slack14.1.txz > /dev/null 2>&1
  796.  echox curl
  797.  upgradepkg curl-7.31.0-x86_64-1.txz%curl-7.47.1-x86_64-1_slack14.1.txz > /dev/null 2>&1
  798.  echox dhcp
  799.  upgradepkg dhcp-4.2.5_P1-x86_64-1.txz%dhcp-4.3.3_P1-x86_64-1_slack14.1.txz > /dev/null 2>&1
  800.  echox dhcpcd
  801.  upgradepkg dhcpcd-6.0.5-x86_64-2.txz%dhcpcd-6.0.5-x86_64-3_slack14.1.txz > /dev/null 2>&1
  802.  echox flac
  803.  upgradepkg flac-1.2.1-x86_64-3.txz%flac-1.3.1-x86_64-1_slack14.1.txz > /dev/null 2>&1
  804.  echox freetype
  805.  upgradepkg freetype-2.5.0.1-x86_64-1.txz%freetype-2.5.5-x86_64-1_slack14.1.txz > /dev/null 2>&1
  806.  echox gdk-pixbuf2
  807.  upgradepkg gdk-pixbuf2-2.28.2-x86_64-1.txz%gdk-pixbuf2-2.28.2-x86_64-2_slack14.1.txz > /dev/null 2>&1
  808.  echox glibc-2.17
  809.  upgradepkg glibc-2.17-x86_64-7.txz%glibc-2.17-x86_64-11_slack14.1.txz > /dev/null 2>&1
  810.  echo -e "\033[2A"
  811.  echo -n "              "
  812.  echo "gdk-pixbuf2 $progressbar_char"
  813.  echox glibc-i18n
  814.  upgradepkg glibc-i18n-2.17-x86_64-7.txz%glibc-i18n-2.17-x86_64-11_slack14.1.txz > /dev/null 2>&1
  815.  echox glibc-profile
  816.  upgradepkg glibc-profile-2.17-x86_64-7.txz%glibc-profile-2.17-x86_64-11_slack14.1.txz > /dev/null 2>&1
  817.  echox glibc-solibs
  818.  upgradepkg glibc-solibs-2.17-x86_64-7.txz%glibc-solibs-2.17-x86_64-11_slack14.1.txz > /dev/null 2>&1
  819.  echo -e "\033[2A"
  820.  echo -n "            "
  821.  echo "glibc-profile $progressbar_char"
  822.  echox glibc-zoneinfo
  823.  upgradepkg glibc-zoneinfo-2013d-noarch-7.txz%glibc-zoneinfo-2016a-noarch-1_slack14.1.txz > /dev/null 2>&1
  824.  echox gnupg
  825.  upgradepkg gnupg-1.4.15-x86_64-1.txz%gnupg-1.4.19-x86_64-2_slack14.1.txz > /dev/null 2>&1
  826.  echox gnupg2
  827.  upgradepkg gnupg2-2.0.22-x86_64-1.txz%gnupg2-2.0.24-x86_64-1_slack14.1.txz > /dev/null 2>&1
  828.  echox gnutls
  829.  upgradepkg gnutls-3.1.16-x86_64-1.txz%gnutls-3.3.17.1-x86_64-1_slack14.1.txz > /dev/null 2>&1
  830.  echox grub
  831.  upgradepkg grub-2.00-x86_64-2.txz%grub-2.00-x86_64-3_slack14.1.txz > /dev/null 2>&1
  832.  echox httpd
  833.  upgradepkg httpd-2.4.6-x86_64-1.txz%httpd-2.4.16-x86_64-1_slack14.1.txz > /dev/null 2>&1
  834.  echox jasper
  835.  upgradepkg jasper-1.900.1-x86_64-3.txz%jasper-1.900.1-x86_64-4_slack14.1.txz > /dev/null 2>&1
  836.  echox libXfont
  837.  upgradepkg libXfont-1.4.6-x86_64-1.txz%libXfont-1.4.7-x86_64-1_slack14.1.txz > /dev/null 2>&1
  838.  echox libgcrypt
  839.  upgradepkg libgcrypt-1.5.3-x86_64-1.txz%libgcrypt-1.5.5-x86_64-1_slack14.1.txz > /dev/null 2>&1
  840.  echox libiodbc
  841.  upgradepkg libiodbc-3.52.7-x86_64-2.txz%libiodbc-3.52.8-x86_64-1_slack14.1.txz > /dev/null 2>&1
  842.  echox libjpeg
  843.  upgradepkg libjpeg-v8a-x86_64-1.txz%libjpeg-v8a-x86_64-2_slack14.1.txz > /dev/null 2>&1
  844.  echox libpng
  845.  upgradepkg libpng-1.4.12-x86_64-1.txz%libpng-1.4.19-x86_64-1_slack14.1.txz > /dev/null 2>&1
  846.  echox libsndfile
  847.  upgradepkg libsndfile-1.0.25-x86_64-1.txz%libsndfile-1.0.26-x86_64-1_slack14.1.txz > /dev/null 2>&1
  848.  echox libssh
  849.  upgradepkg libssh-0.5.4-x86_64-1.txz%libssh-0.7.3-x86_64-1_slack14.1.txz > /dev/null 2>&1
  850.  echox libtasn1
  851.  upgradepkg libtasn1-3.3-x86_64-1.txz%libtasn1-3.6-x86_64-1_slack14.1.txz > /dev/null 2>&1
  852.  echox libyaml
  853.  upgradepkg libyaml-0.1.4-x86_64-1.txz%libyaml-0.1.6-x86_64-1_slack14.1.txz > /dev/null 2>&1
  854.  echox llvm
  855.  upgradepkg llvm-3.3-x86_64-2.txz%llvm-3.3-x86_64-3_slack14.1.txz > /dev/null 2>&1
  856.  echox mailx
  857.  upgradepkg mailx-12.5-x86_64-1.txz%mailx-12.5-x86_64-2.txz  > /dev/null 2>&1
  858.  echox mariadb
  859.  upgradepkg mariadb-5.5.32-x86_64-1.txz%mariadb-5.5.43-x86_64-1_slack14.1.txz > /dev/null 2>&1
  860.  echox mozilla-firefox
  861.  upgradepkg mozilla-firefox-24.1.0esr-x86_64-1.txz%mozilla-firefox-38.6.1esr-x86_64-1_slack14.1.txz > /dev/null 2>&1
  862.  echox mozilla-nss
  863.  upgradepkg mozilla-nss-3.15.2-x86_64-2.txz%mozilla-nss-3.20.1-x86_64-1_slack14.1.txz > /dev/null 2>&1
  864.  echox mozilla-thunderbird
  865.  upgradepkg mozilla-thunderbird-24.1.0-x86_64-1.txz%mozilla-thunderbird-38.6.0-x86_64-1_slack14.1.txz > /dev/null 2>&1
  866.  echox mutt
  867.  upgradepkg mutt-1.5.22-x86_64-1.txz%mutt-1.5.23-x86_64-2_slack14.1.txz > /dev/null 2>&1
  868.  echox ntp
  869.  upgradepkg ntp-4.2.6p5-x86_64-4.txz%ntp-4.2.8p6-x86_64-1_slack14.1.txz > /dev/null 2>&1
  870.  echox openssh
  871.  upgradepkg openssh-6.3p1-x86_64-1.txz%openssh-7.1p2-x86_64-1_slack14.1.txz > /dev/null 2>&1
  872.  echox openssl
  873.  upgradepkg openssl-1.0.1e-x86_64-1.txz%openssl-1.0.1s-x86_64-1_slack14.1.txz > /dev/null 2>&1
  874.  echox openssl-solibs
  875.  upgradepkg openssl-solibs-1.0.1e-x86_64-1.txz%openssl-solibs-1.0.1s-x86_64-1_slack14.1.txz > /dev/null 2>&1
  876.  echox openvpn
  877.  upgradepkg openvpn-2.3.2-x86_64-1.txz%openvpn-2.3.6-x86_64-1_slack14.1.txz > /dev/null 2>&1
  878.  echox patch
  879.  upgradepkg patch-2.7-x86_64-2.txz%patch-2.7.4-x86_64-1_slack14.1.txz > /dev/null 2>&1
  880.  echox pcre
  881.  upgradepkg pcre-8.33-x86_64-1.txz%pcre-8.38-x86_64-1_slack14.1.txz > /dev/null 2>&1
  882.  echox php
  883.  upgradepkg php-5.4.20-x86_64-1.txz%php-5.6.18-x86_64-1_slack14.1.txz > /dev/null 2>&1
  884.  echox pidgin
  885.  upgradepkg pidgin-2.10.7-x86_64-5.txz%pidgin-2.10.11-x86_64-1_slack14.1.txz > /dev/null 2>&1
  886.  echox ppp
  887.  upgradepkg ppp-2.4.5-x86_64-2.txz%ppp-2.4.5-x86_64-3_slack14.1.txz > /dev/null 2>&1
  888.  echox proftpd
  889.  upgradepkg proftpd-1.3.4c-x86_64-1.txz%proftpd-1.3.4e-x86_64-1_slack14.1.txz > /dev/null 2>&1
  890.  echox qt
  891.  upgradepkg qt-4.8.5-x86_64-2.txz%qt-4.8.7-x86_64-1_slack14.1.txz > /dev/null 2>&1
  892.  echox ruby
  893.  upgradepkg ruby-1.9.3_p448-x86_64-1.txz%ruby-1.9.3_p484-x86_64-1_slack14.1.txz > /dev/null 2>&1
  894.  echox samba
  895.  upgradepkg samba-4.1.0-x86_64-2.txz%samba-4.1.17-x86_64-1_slack14.1.txz > /dev/null 2>&1
  896.  echox seamonkey
  897.  upgradepkg seamonkey-2.21-x86_64-1.txz%seamonkey-2.39-x86_64-1_slack14.1.txz > /dev/null 2>&1
  898.  echox seamonkey-solibs
  899.  upgradepkg seamonkey-solibs-2.21-x86_64-1.txz%seamonkey-solibs-2.39-x86_64-1_slack14.1.txz > /dev/null 2>&1
  900.  echox sendmail
  901.  upgradepkg sendmail-8.14.7-x86_64-1.txz%sendmail-8.14.9-x86_64-1_slack14.1.txz > /dev/null 2>&1
  902.  echox sendmail-cf
  903.  upgradepkg sendmail-cf-8.14.7-noarch-1.txz%sendmail-cf-8.14.9-noarch-1_slack14.1.txz > /dev/null 2>&1
  904.  echox shadow
  905.  upgradepkg shadow-4.1.5.1-x86_64-2.txz%shadow-4.1.5.1-x86_64-3_slack14.1.txz > /dev/null 2>&1
  906.  echox subversion
  907.  upgradepkg subversion-1.7.13-x86_64-1.txz%subversion-1.7.16-x86_64-1_slack14.1.txz > /dev/null 2>&1
  908.  echox sudo
  909.  upgradepkg sudo-1.8.6p8-x86_64-1.txz%sudo-1.8.12-x86_64-1_slack14.1.txz > /dev/null 2>&1
  910.  echox udisks
  911.  upgradepkg udisks-1.0.4-x86_64-2.txz%udisks-1.0.5-x86_64-1_slack14.1.txz > /dev/null 2>&1
  912.  echox udisks2
  913.  upgradepkg udisks2-2.1.0-x86_64-1.txz%udisks2-2.1.3-x86_64-1_slack14.1.txz > /dev/null 2>&1
  914.  echox wget
  915.  upgradepkg wget-1.14-x86_64-2.txz%wget-1.14-x86_64-3_slack14.1.txz > /dev/null 2>&1
  916.  echox wpa_supplicant
  917.  upgradepkg wpa_supplicant-2.0-x86_64-1.txz%wpa_supplicant-2.4-x86_64-1_slack14.1.txz > /dev/null 2>&1
  918.  echox xfce4-weather-plugin
  919.  upgradepkg xfce4-weather-plugin-0.8.3-x86_64-2.txz%xfce4-weather-plugin-0.8.4-x86_64-1_slack14.1.txz > /dev/null 2>&1
  920.  echox xorg-server
  921.  upgradepkg xorg-server-1.14.3-x86_64-2.txz%xorg-server-1.14.3-x86_64-3_slack14.1.txz > /dev/null 2>&1
  922.  echox xorg-server-xephyr
  923.  upgradepkg xorg-server-xephyr-1.14.3-x86_64-2.txz%xorg-server-xephyr-1.14.3-x86_64-3_slack14.1.txz > /dev/null 2>&1
  924.  echox xorg-server-xnest
  925.  upgradepkg xorg-server-xnest-1.14.3-x86_64-2.txz%xorg-server-xnest-1.14.3-x86_64-3_slack14.1.txz > /dev/null 2>&1
  926.  echox xorg-server-xvfb
  927.  upgradepkg xorg-server-xvfb-1.14.3-x86_64-2.txz%xorg-server-xvfb-1.14.3-x86_64-3_slack14.1.txz > /dev/null 2>&1
  928.  echox xscreensaver
  929.  upgradepkg xscreensaver-5.22-x86_64-2.txz%xscreensaver-5.34-x86_64-1_slack14.1.txz > /dev/null 2>&1
  930.  echox yptools
  931.  upgradepkg yptools-2.14-x86_64-2.txz%yptools-2.14-x86_64-3_slack14.1.txz > /dev/null 2>&1
  932.  cd ../../../..
  933. }
  934.  
  935. function setup_libraries()
  936. {
  937.  cd data/pool/$slwd/compiled/libraries
  938.  echox id3lib
  939.  installpkg id3lib*.tgz  > /dev/null 2>&1
  940.  echox SDL_sound
  941.  installpkg SDL_sound*.tgz  > /dev/null 2>&1
  942.  echox SDL_gfx
  943.  installpkg SDL_gfx*.tgz > /dev/null 2>&1
  944.  echox ORBit2
  945.  installpkg ORBit2*.tgz > /dev/null 2>&1
  946.  echox libbonobo
  947.  installpkg libbonobo*.tgz > /dev/null 2>&1
  948.  echox gnome-mime-data
  949.  installpkg gnome-mime-data*.tgz > /dev/null 2>&1
  950.  echox gnome-vfs
  951.  installpkg gnome-vfs*.tgz > /dev/null 2>&1
  952.  echox libgnome
  953.  installpkg libgnome*.tgz > /dev/null 2>&1
  954.  echox libgnomecanvas
  955.  installpkg libgnomecanvas*.tgz > /dev/null 2>&1
  956.  echox libbonoboui
  957.  installpkg libbonoboui*.tgz > /dev/null 2>&1
  958.  echox libgnomeui
  959.  installpkg libgnomeui*.tgz > /dev/null 2>&1
  960.  echox gtksourceview
  961.  installpkg gtksourceview*.tgz > /dev/null 2>&1
  962.  echox pygtksourceview
  963.  installpkg pygtksourceview*.tgz > /dev/null 2>&1
  964.  echox libgtop
  965.  installpkg libgtop*.tgz > /dev/null 2>&1
  966.  echox libgksu
  967.  installpkg libgksu*.tgz > /dev/null 2>&1
  968.  echox rarian
  969.  installpkg rarian*.tgz > /dev/null 2>&1
  970.  echox libunique
  971.  installpkg libunique*.tgz > /dev/null 2>&1
  972.  echox mm-common
  973.  installpkg mm-common*.tgz > /dev/null 2>&1
  974.  echox libsigc++
  975.  installpkg libsigc++*.tgz > /dev/null 2>&1
  976.  echox glibmm
  977.  installpkg glibmm*.tgz > /dev/null 2>&1
  978.  echox cairomm
  979.  installpkg cairomm*.tgz > /dev/null 2>&1
  980.  echox pangomm
  981.  installpkg pangomm*.tgz > /dev/null 2>&1
  982.  echox atkmm
  983.  installpkg atkmm*.tgz > /dev/null 2>&1
  984.  echox gtkmm
  985.  installpkg gtkmm*.tgz > /dev/null 2>&1
  986.  echox libburn
  987.  installpkg libburn*.tgz > /dev/null 2>&1
  988.  echox libisofs
  989.  installpkg libisofs*.tgz > /dev/null 2>&1
  990.  echox pygobject3
  991.  installpkg pygobject3*.tgz > /dev/null 2>&1
  992.  echox pyxdg
  993.  installpkg pyxdg*.tgz > /dev/null 2>&1
  994.  echox pysetuptools
  995.  installpkg pysetuptools*.tgz > /dev/null 2>&1
  996.  echox python-distutils-extra
  997.  installpkg python-distutils-extra*.tgz > /dev/null 2>&1
  998.  echox glade
  999.  installpkg glade*.tgz > /dev/null 2>&1
  1000.  echox gtksourceview3
  1001.  installpkg gtksourceview3*.tgz > /dev/null 2>&1
  1002.  echox SDL2
  1003.  installpkg SDL2*.tgz > /dev/null 2>&1
  1004.  echox SDL2_gfx
  1005.  installpkg SDL2_gfx*.tgz > /dev/null 2>&1
  1006.  echox SDL2_image
  1007.  installpkg SDL2_image*.tgz > /dev/null 2>&1
  1008.  echox SDL2_mixer
  1009.  installpkg SDL2_mixer*.tgz > /dev/null 2>&1
  1010.  echox SDL2_net
  1011.  installpkg SDL2_net*.tgz > /dev/null 2>&1
  1012.  echox SDL2_ttf
  1013.  installpkg SDL2_ttf*.tgz > /dev/null 2>&1
  1014.  echox wxPython
  1015.  installpkg wxPython*.tgz > /dev/null 2>&1
  1016.  echox numactl
  1017.  installpkg numactl*.tgz > /dev/null 2>&1
  1018.  echox makeself
  1019.  installpkg makeself*.tgz > /dev/null 2>&1
  1020.  echox fox-toolkit
  1021.  installpkg fox-toolkit*.tgz > /dev/null 2>&1
  1022.  if [ "x$slwv" == "xSlackware 14.1" ]
  1023.  then
  1024.    echox libvdpau
  1025.    installpkg libvdpau*.tgz > /dev/null 2>&1
  1026.    echox orc
  1027.    installpkg orc*.tgz > /dev/null 2>&1
  1028.    echox gstreamer1
  1029.    installpkg gstreamer1*.tgz > /dev/null 2>&1
  1030.  fi
  1031.  echox goffice
  1032.  installpkg goffice*.tgz > /dev/null 2>&1
  1033.  if [ "x$slwv" == "xSlackware 14.2" ]
  1034.  then
  1035.    echox libfilezilla
  1036.    installpkg libfilezilla*.tgz > /dev/null 2>&1
  1037.  fi
  1038.  echox wxGTK3
  1039.  installpkg wxGTK3*.tgz > /dev/null 2>&1
  1040.  cd ../../../../..
  1041. }
  1042.  
  1043. function setup_terminals()
  1044. {
  1045.  
  1046. #install
  1047.  
  1048. installpkg ./data/pool/slackware64-14.2/compiled/lxterminal-20151110_967256e-x86_64-1_SBo.tgz > /dev/null 2>&1
  1049.  
  1050. #settings
  1051.  
  1052. mkdir -p /root/.config/lxterminal > /dev/null 2>&1
  1053. cp ./data/pool/misc/config/lxterminal/lxterminal.conf /root/.config/lxterminal/ > /dev/null 2>&1
  1054. #
  1055. mkdir -p /home/$user/.config/lxterminal > /dev/null 2>&1
  1056. cp ./data/pool/misc/config/lxterminal/lxterminal.conf /home/$user/.config/lxterminal/ > /dev/null 2>&1
  1057. #
  1058. mkdir -p /root/.config/xfce4 > /dev/null 2>&1
  1059. echo "TerminalEmulator=custom-TerminalEmulator" > /root/.config/xfce4/helpers.rc
  1060. #
  1061. mkdir -p /root/.local/share/xfce4/helpers > /dev/null 2>&1
  1062. echo "[Desktop Entry]" > /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1063. echo "NoDisplay=true" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1064. echo "Version=1.0" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1065. echo "Encoding=UTF-8" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1066. echo "Type=X-XFCE-Helper" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1067. echo "X-XFCE-Category=TerminalEmulator" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1068. echo 'X-XFCE-CommandsWithParameter=/usr/bin/lxterminal "%s"' >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1069. echo "Icon=lxterminal" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1070. echo "Name=lxterminal" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1071. echo "X-XFCE-Commands=/usr/bin/lxterminal" >> /root/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1072. #
  1073. mkdir -p /home/$user/.config/xfce4 > /dev/null 2>&1
  1074. echo "TerminalEmulator=custom-TerminalEmulator" > /home/$user/.config/xfce4/helpers.rc
  1075. #
  1076. mkdir -p /home/$user/.local/share/xfce4/helpers > /dev/null 2>&1
  1077. echo "[Desktop Entry]" > /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1078. echo "NoDisplay=true" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1079. echo "Version=1.0" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1080. echo "Encoding=UTF-8" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1081. echo "Type=X-XFCE-Helper" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1082. echo "X-XFCE-Category=TerminalEmulator" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1083. echo 'X-XFCE-CommandsWithParameter=/usr/bin/lxterminal "%s"' >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1084. echo "Icon=lxterminal" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1085. echo "Name=lxterminal" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1086. echo "X-XFCE-Commands=/usr/bin/lxterminal" >> /home/$user/.local/share/xfce4/helpers/custom-TerminalEmulator.desktop
  1087. #
  1088. if ! grep -q 'setfont -v ter-116n' '/etc/rc.d/rc.font';
  1089. then
  1090. sed -i s:"setfont -v":"setfont -v ter-116n":g /etc/rc.d/rc.font > /dev/null 2>&1
  1091. fi
  1092. chmod +x /etc/rc.d/rc.font > /dev/null 2>&1
  1093. #
  1094. sed -i s:"/sbin/agetty --noclear 38400 tty1 linux":"/sbin/agetty --noclear 115200 tty1 linux":g /etc/inittab > /dev/null 2>&1
  1095. sed -i s:"/sbin/agetty 38400":"/sbin/agetty 115200":g /etc/inittab > /dev/null 2>&1
  1096. #
  1097.  
  1098. echo " " > /etc/issue
  1099. echo " 8 8888       88           .8.           ,o888888o.    8 8888     ,88'" >> /etc/issue
  1100. echo " 8 8888       88          .888.         8888     \`88.  8 8888    ,88'" >> /etc/issue  
  1101. echo " 8 8888       88         :88888.     ,8 8888       \`8. 8 8888   ,88'" >> /etc/issue      
  1102. echo " 8 8888       88        . \`88888.    88 8888           8 8888  ,88'" >> /etc/issue          
  1103. echo " 8 8888888888888       .8. \`88888.   88 8888           8 8888 ,88'    888" >> /etc/issue  
  1104. echo " 8 8888       88      .8\`8. \`88888.  88 8888           8 8888 88'" >> /etc/issue              
  1105. echo " 8 8888       88     .8' \`8. \`88888. 88 8888           8 888888<" >> /etc/issue              
  1106. echo " 8 8888       88    .8'   \`8. \`88888.\`8 8888       .8' 8 8888 \`Y8." >> /etc/issue              
  1107. echo " 8 8888       88   .888888888. \`88888.  8888     ,88'  8 8888   \`Y8." >> /etc/issue        
  1108. echo " 8 8888       88  .8'       \`8. \`88888.  \`8888888P'    8 8888     \`Y8." >> /etc/issue  
  1109. echo "  " >> /etc/issue
  1110. echo " \`8.\`888b                 ,8' .8.          8 888888888o.   8 8888888888" >> /etc/issue  
  1111. echo "  \`8.\`888b               ,8' .888.         8 8888    \`88.  8 8888" >> /etc/issue
  1112. echo "   \`8.\`888b             ,8' :88888.        8 8888     \`88  8 8888" >> /etc/issue
  1113. echo "    \`8.\`888b     .b    ,8' . \`88888.       8 8888     ,88  8 8888" >> /etc/issue
  1114. echo "     \`8.\`888b    88b  ,8' .8. \`88888.      8 8888.   ,88'  8 888888888888" >> /etc/issue
  1115. echo "      \`8.\`888b .\`888b,8' .8\`8. \`88888.     8 888888888P'   8 8888" >> /etc/issue
  1116. echo "       \`8.\`888b8.\`8888' .8' \`8. \`88888.    8 8888\`8b       8 8888" >> /etc/issue
  1117. echo "        \`8.\`888\`8.\`88' .8'   \`8. \`88888.   8 8888 \`8b.     8 8888" >> /etc/issue    
  1118. echo "         \`8.\`8' \`8,\`' .888888888. \`88888.  8 8888   \`8b.   8 8888" >> /etc/issue  
  1119. echo "          \`8.\`   \`8' .8'       \`8. \`88888. 8 8888     \`88. 8 888888888888" >> /etc/issue
  1120. echo " " >> /etc/issue
  1121. echo "                                                 01 00 00 00  0.1beta 416" >> /etc/issue
  1122. echo " " >> /etc/issue
  1123. #
  1124. sed -i s:"MAIL_CHECK_ENAB       yes":"MAIL_CHECK_ENAB       no":g /etc/login.defs > /dev/null 2>&1
  1125. #
  1126. sed -i s:"#ISSUE_FILE   /etc/issue":"ISSUE_FILE /etc/issue":g /etc/login.defs > /dev/null 2>&1
  1127. #
  1128. rm /etc/motd > /dev/null 2>&1
  1129. #
  1130.  
  1131.  
  1132. }
  1133.  
  1134. function setup_xserver()
  1135. {
  1136. #
  1137. echo '#!/bin/bash' > /etc/X11/xinit/xserverrc
  1138. echo "exec /usr/bin/X -nolisten tcp" >> /etc/X11/xinit/xserverrc
  1139. chmod +x /etc/X11/xinit/xserverrc > /dev/null 2>&1
  1140. #
  1141. sed -i s:'enable_xauth=1':'enable_xauth=0':g /usr/X11R6/bin/startx > /dev/null 2>&1
  1142. #
  1143. sed -i s:'defaultserverargs=""':'defaultserverargs="-nolisten tcp"':g /usr/X11R6/bin/startx > /dev/null 2>&1
  1144. #
  1145. echo "#" > /etc/X11/xdm/Xservers
  1146. echo "# Xservers file, workstation prototype" >> /etc/X11/xdm/Xservers
  1147. echo "#" >> /etc/X11/xdm/Xservers
  1148. echo "# This file should contain an entry to start the server on the" >> /etc/X11/xdm/Xservers
  1149. echo "# local display; if you have more than one display (not screen)," >> /etc/X11/xdm/Xservers
  1150. echo "# you can add entries to the list (one per line).  If you also" >> /etc/X11/xdm/Xservers
  1151. echo "# have some X terminals connected which do not support XDMCP," >> /etc/X11/xdm/Xservers
  1152. echo "# you can add them here as well.  Each X terminal line should" >> /etc/X11/xdm/Xservers
  1153. echo "# look like:" >> /etc/X11/xdm/Xservers
  1154. echo "# XTerminalName:0 foreign" >> /etc/X11/xdm/Xservers
  1155. echo "#" >> /etc/X11/xdm/Xservers
  1156. echo ":0 local /usr/X11R6/bin/X -nolisten tcp" >> /etc/X11/xdm/Xservers
  1157. #
  1158. if ! grep -q 'no-listen = tcp' '/etc/X11/fs/config';
  1159. then
  1160.   echo "no-listen = tcp" >> /etc/X11/fs/config
  1161. fi
  1162. #
  1163. if ! grep -q 'xdm -nodaemon -udpPort 0' '/etc/rc.d/rc.4';
  1164. then
  1165. sed -i s:'xdm -nodaemon':'xdm -nodaemon -udpPort 0':g /etc/rc.d/rc.4 > /dev/null 2>&1
  1166. fi
  1167. #
  1168.  echo 'Section "InputClass"' > /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1169.  echo ' Identifier "My Mouse"' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1170.  echo ' MatchIsPointer "yes"' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1171.  echo ' Option "AccelerationProfile" "-1"' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1172.  echo ' Option "AccelerationScheme" "none"' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1173.  echo ' Option "AccelSpeed" "-1"' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1174.  echo 'EndSection' >> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
  1175. #
  1176. #echo 'Section "Monitor"' > /etc/X11/xorg.conf.d/10-monitor.conf
  1177. #echo '    Identifier "Monitor0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1178. #echo '    Option "DPMS" "false"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1179. #echo 'EndSection' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1180. #echo 'Section "ServerLayout"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1181. #echo '    Identifier "ServerLayout0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1182. #echo '    Option "BlankTime"  "0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1183. #echo '    Option "StandbyTime" "0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1184. #echo '    Option "SuspendTime" "0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1185. #echo '    Option "OffTime" "0"' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1186. #echo 'EndSection' >> /etc/X11/xorg.conf.d/10-monitor.conf
  1187.  
  1188. }
  1189.  
  1190. function setup_packages()
  1191. {
  1192.  cd data/pool/$slwd/compiled
  1193.  shopt -s nullglob
  1194.  for f in *.tgz
  1195.  do
  1196.    pkgname=${f%-*}
  1197.    pkgname=${pkgname%-*}
  1198.    pkgname=${pkgname%-*}
  1199.    echox $pkgname
  1200.    installpkg $f  > /dev/null 2>&1
  1201.  done
  1202.  cd ../../../..
  1203.  shopt -u nullglob
  1204. }
  1205.  
  1206. function setup_misc()
  1207. {
  1208.  #
  1209.  #gnome-icon-theme / xfce4-mixer
  1210.  #if [ "x$slwv" == "xSlackware 14.2" ]
  1211.  #then
  1212.  #  echox gnome-icon-theme
  1213.  #  installpkg data/pool/slackware64-14.2/packages/gnome-icon-theme/gnome-icon-theme-3.8.3-x86_64-1.txz > /dev/null 2>&1
  1214.  #  echox xfce4-mixer
  1215.  #  installpkg data/pool/slackware64-14.2/packages/xfce4-mixer/xfce4-mixer-4.10.0-x86_64-1.txz > /dev/null 2>&1
  1216.  #fi
  1217.  cd data/pool/$slwd/packages
  1218.  #
  1219.  #openjre
  1220.  echox openjre
  1221.  cd openjre
  1222.  installpkg openjre-8u91_b14-x86_64-1alien.txz  > /dev/null 2>&1
  1223.  cd ..
  1224.  #
  1225.  #wicd-14.2
  1226.  echox wicd
  1227.  cd wicd-14.2
  1228.  installpkg wicd-1.7.4-x86_64-2.txz > /dev/null 2>&1
  1229.  cd ..
  1230.  #
  1231.  #libreoffice
  1232.  echox libreoffice
  1233.  cd libreoffice > /dev/null 2>&1
  1234.  if [ "x$slwv" == "xSlackware 14.1" ]
  1235.  then
  1236.  installpkg libreoffice-5.0.4-x86_64-1alien.txz  > /dev/null 2>&1
  1237.  installpkg libreoffice-l10n-de-5.0.4-x86_64-1alien.txz  > /dev/null 2>&1
  1238.  fi
  1239.  if [ "x$slwv" == "xSlackware 14.2" ]
  1240.  then
  1241.  installpkg libreoffice-5.2.1-x86_64-1alien.txz  > /dev/null 2>&1
  1242.  installpkg libreoffice-l10n-de-5.2.1-x86_64-1alien.txz  > /dev/null 2>&1
  1243.  installpkg libreoffice-sdkdoc-5.2.1-noarch-1alien.txz  > /dev/null 2>&1
  1244.  fi
  1245.  cd .. > /dev/null 2>&1
  1246.  sed -i s:'Categories=Office;Spreadsheet;Education;Science;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other;':'Categories=Office;Spreadsheet;Science;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other;':g /usr/share/applications/libreoffice-math.desktop > /dev/null 2>&1
  1247.  rm /usr/share/applications/libreoffice-extension-manager.desktop > /dev/null 2>&1
  1248.  #
  1249.  #chromium
  1250.  echox chromium
  1251.  cd chromium
  1252.  installpkg chromium-53.0.2785.92-x86_64-1alien.txz > /dev/null 2>&1
  1253.  installpkg chromium-pepperflash-plugin-23.0.0.162-x86_64-1alien.txz > /dev/null 2>&1
  1254.  cd ..
  1255.  #
  1256.  #vlc
  1257.  echox vlc
  1258.  cd vlc
  1259.  if [ "x$slwv" == "xSlackware 14.2" ]
  1260.  then
  1261.    installpkg vlc-2.2.4-x86_64-1alien.txz  > /dev/null 2>&1
  1262.    installpkg npapi-vlc-20160706-x86_64-1alien.txz  > /dev/null 2>&1
  1263.  fi
  1264.  if [ "x$slwv" == "xSlackware 14.1" ]
  1265.  then
  1266.    installpkg vlc-2.2.2-x86_64-1alien.txz  > /dev/null 2>&1
  1267.    installpkg npapi-vlc-20160209-x86_64-1alien.txz  > /dev/null 2>&1
  1268.  fi
  1269.  cd ../../..
  1270.  #
  1271.  #flashplayer
  1272.  echox flashplayer
  1273.  cd misc/flashplayer  
  1274.  cp libflashplayer.so /usr/lib64/mozilla/plugins/  > /dev/null 2>&1
  1275.  # check opera dir
  1276.  cp libflashplayer.so /usr/lib/opera/plugins/  > /dev/null 2>&1
  1277.  cp -raf usr/* /usr > /dev/null 2>&1
  1278.  #
  1279.  mkdir -p /usr/lib/mozilla/plugins/  > /dev/null 2>&1
  1280.  cp -raf libflashplayer.so /usr/lib/mozilla/plugins/ > /dev/null 2>&1
  1281.  cd ..
  1282.  #
  1283.  #firefox-de
  1284.  echox firefox
  1285.  cd firefox-de
  1286.  tar -xjf firefox-49.0.2.tar.bz2 -C /opt/ > /dev/null 2>&1
  1287.  ln -sf /opt/firefox/firefox /usr/bin/firefox > /dev/null 2>&1
  1288.  #
  1289.  #fix profile
  1290.  cd ..
  1291.  #
  1292.  #thunderbird-de
  1293.  echox thunderbird
  1294.  cd thunderbird-de
  1295.  tar -xjf thunderbird-45.4.0.tar.bz2 -C /opt/ > /dev/null 2>&1
  1296.  ln -sf /opt/thunderbird/thunderbird /usr/bin/thunderbird > /dev/null 2>&1
  1297.  cd ..
  1298.  #
  1299.  #fonts
  1300.  cd fonts
  1301.  echox freefont
  1302.  cd freefont
  1303.  mkdir -p /tmp/freefont > /dev/null 2>&1
  1304.  cp -raf * /tmp/freefont > /dev/null 2>&1
  1305.  cd /tmp/freefont
  1306.  chmod +x freefont.SlackBuild
  1307.  ./freefont.SlackBuild  > /dev/null 2>&1
  1308.  installpkg /tmp/freefont*.tgz  > /dev/null 2>&1
  1309.  rm /etc/fonts/conf.d/35-freefont.conf  > /dev/null 2>&1
  1310.  cd - > /dev/null 2>&1
  1311.  rm -rf /tmp/freefont > /dev/null 2>&1
  1312.  cd ..
  1313.  echox ttf-mscorefonts
  1314.  cd ttf-mscorefonts
  1315.  installpkg ttf-mscorefonts-0.1-x86_64-1_slack.txz  > /dev/null 2>&1
  1316.  cd ..
  1317.  echox webcore-fonts
  1318.  cd webcore-fonts
  1319.  rm /etc/fonts/conf.d/60-liberation.conf  > /dev/null 2>&1
  1320.  installpkg webcore-fonts-3.0-noarch-3_slack.txz  > /dev/null 2>&1
  1321.  cd ../..
  1322.  cd sources
  1323.  #
  1324.  #alarm-clock-applet
  1325.  echox alarm-clock-applet
  1326.  tar -xzf alarm-clock-applet-0.3.4.tar.gz -C /tmp/ > /dev/null 2>&1
  1327.  cd /tmp/alarm-clock-applet-0.3.4
  1328.  ./configure > /dev/null 2>&1
  1329.  find /tmp/alarm-clock-applet-0.3.4 -type f -exec touch {} +
  1330.  make > /dev/null 2>&1
  1331.  make install > /dev/null 2>&1  
  1332.  cd - > /dev/null 2>&1
  1333.  rm -rf /tmp/alarm-clock-applet-0.3.4
  1334.  #
  1335.  #gtkperf
  1336.  echox gtkperf
  1337.  tar -xzf gtkperf_0.40.tar.gz -C /tmp/ > /dev/null 2>&1
  1338.  cd /tmp/gtkperf
  1339.  ./configure > /dev/null 2>&1
  1340.  find /tmp/gtkperf -type f -exec touch {} +
  1341.  make > /dev/null 2>&1
  1342.  make install > /dev/null 2>&1
  1343.  cp -a gtkperf.desktop /usr/share/applications/  > /dev/null 2>&1
  1344.  cd - > /dev/null 2>&1
  1345.  rm -rf /tmp/gtkperf > /dev/null 2>&1
  1346.  #
  1347.  #i7z
  1348.  echox i7z
  1349.  unzip -o i7z-master.zip -d /tmp/ > /dev/null 2>&1
  1350.  cd /tmp/i7z-master > /dev/null 2>&1
  1351.  find /tmp/i7z-master -type f -exec touch {} +
  1352.  make  > /dev/null 2>&1
  1353.  make install  > /dev/null 2>&1
  1354.  cd - > /dev/null 2>&1
  1355.  rm -rf /tmp/i7z-master > /dev/null 2>&1
  1356.  #
  1357.  #irqbalance
  1358.  echox irqbalance
  1359.  unzip -o irqbalance-master.zip -d /tmp/ > /dev/null 2>&1
  1360.  cd /tmp/irqbalance-master > /dev/null 2>&1
  1361.  ./autogen.sh  > /dev/null 2>&1
  1362.  ./configure  > /dev/null 2>&1
  1363.  find /tmp/irqbalance-master -type f -exec touch {} +
  1364.  make  > /dev/null 2>&1
  1365.  make install  > /dev/null 2>&1
  1366.  cd - > /dev/null 2>&1
  1367.  rm -rf /tmp/irqbalance-master > /dev/null 2>&1
  1368.  #
  1369.  #rt-tests
  1370.  #other kernel?
  1371.  echox rt-tests
  1372.  tar -xzf rt-tests.tar.gz -C /tmp/ > /dev/null 2>&1
  1373.  cd /tmp/rt-tests
  1374.  find /tmp/rt-tests -type f -exec touch {} +
  1375.  make all  > /dev/null 2>&1
  1376.  cp ./cyclictest /usr/bin/  > /dev/null 2>&1
  1377.  cd - > /dev/null 2>&1
  1378.  rm -rf /tmp/rt-tests > /dev/null 2>&1
  1379.  #
  1380.  #schedtool
  1381.  echox schedtool
  1382.  tar -xjf schedtool-1.3.0.tar.bz2 -C /tmp/ > /dev/null 2>&1
  1383.  cd /tmp/schedtool-1.3.0
  1384.  find /tmp/schedtool-1.3.0 -type f -exec touch {} +
  1385.  make  > /dev/null 2>&1
  1386.  make install  > /dev/null 2>&1
  1387.  cd - > /dev/null 2>&1
  1388.  rm -rf /tmp/schedtool-1.3.0 > /dev/null 2>&1
  1389.  #
  1390.  #parallel
  1391.  echox parallel
  1392.  tar -xjf parallel-20160122.tar.bz2 -C /tmp/ > /dev/null 2>&1
  1393.  cd /tmp/parallel-20160122
  1394.  ./configure > /dev/null 2>&1
  1395.  find /tmp/parallel-20160122 -type f -exec touch {} +
  1396.  make  > /dev/null 2>&1
  1397.  make install  > /dev/null 2>&1
  1398.  cd - > /dev/null 2>&1
  1399.  rm -rf /tmp/parallel-20160122 > /dev/null 2>&1
  1400.  cd ..
  1401.   #
  1402.  #agner-asmlib
  1403.  echox asmlib
  1404.  cd agner-asmlib
  1405.  cp -raf libaelf64o.a /lib64/ > /dev/null 2>&1
  1406.  cd ..
  1407.  #virtualbox
  1408.  echox virtualbox
  1409.  cd virtualbox
  1410.  chmod +x VirtualBox-5.1.8-111374-Linux_amd64.run
  1411.  ./VirtualBox-5.1.8-111374-Linux_amd64.run  > /dev/null 2>&1
  1412.  VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack  > /dev/null 2>&1
  1413.  mkdir -p /root/.hackware/virtualbox  > /dev/null 2>&1
  1414.  cp VirtualBox-5.1.8-111374-Linux_amd64.run /root/.hackware/virtualbox/  > /dev/null 2>&1
  1415.  cp Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack /root/.hackware/virtualbox/  > /dev/null 2>&1
  1416.  echo "#!/bin/bash" > /root/.hackware/virtualbox/install-virtualbox.sh
  1417.  echo "chmod +x /root/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run" >> /root/.hackware/virtualbox/install-virtualbox.sh
  1418.  echo "/root/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run" >> /root/.hackware/virtualbox/install-virtualbox.sh
  1419.  echo "#VBoxManage extpack install --replace /root/.hackware/virtualbox/Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack" >>/root/.hackware/virtualbox/install-virtualbox.sh
  1420.  chmod +x /root/.hackware/virtualbox/install-virtualbox.sh
  1421.  echo "#!/bin/bash" > /root/.hackware/virtualbox/remove-virtualbox.sh
  1422.  echo "/root/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run uninstall" >> /root/.hackware/virtualbox/remove-virtualbox.sh
  1423.  echo "#VBoxManage extpack uninstall /root/.hackware/virtualbox/Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack" >> /root/.hackware/virtualbox/remove-virtualbox.sh
  1424.  chmod +x /root/.hackware/virtualbox/remove-virtualbox.sh
  1425.  mkdir -p /home/$user/.hackware/virtualbox  > /dev/null 2>&1
  1426.  cp VirtualBox-5.1.8-111374-Linux_amd64.run /home/$user/.hackware/virtualbox/  > /dev/null 2>&1
  1427.  cp Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack /home/$user/.hackware/virtualbox/  > /dev/null 2>&1
  1428.  echo "#!/bin/bash" > /home/$user/.hackware/virtualbox/install-virtualbox.sh
  1429.  echo "chmod +x /home/$user/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run" >> /home/$user/.hackware/virtualbox/install-virtualbox.sh
  1430.  echo "/home/$user/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run" >> /home/$user/.hackware/virtualbox/install-virtualbox.sh
  1431.  echo "#VBoxManage extpack install --replace /home/$user/.hackware/virtualbox/Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack" >> /home/$user/.hackware/virtualbox/install-virtualbox.sh
  1432.  chmod  +x /home/$user/.hackware/virtualbox/install-virtualbox.sh
  1433.  echo "#!/bin/bash" > /home/$user/.hackware/virtualbox/remove-virtualbox.sh
  1434.  echo "/home/$user/.hackware/virtualbox/VirtualBox-5.1.8-111374-Linux_amd64.run uninstall" >> /home/$user/.hackware/virtualbox/remove-virtualbox.sh
  1435.  echo "#VBoxManage extpack uninstall /home/$user/.hackware/virtualbox/Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack" >> /home/$user/.hackware/virtualbox/remove-virtualbox.sh
  1436.  chmod +x /home/$user/.hackware/virtualbox/remove-virtualbox.sh
  1437.  echo "[Desktop Entry]" > /usr/share/applications/vbox-install.desktop
  1438.  echo "Encoding=UTF-8" >> /usr/share/applications/vbox-install.desktop
  1439.  echo "Version=1.0" >> /usr/share/applications/vbox-install.desktop
  1440.  if [ "$german_language" == "yes" ]
  1441.  then
  1442.     echo "Name=Oracle VM VirtualBox installieren" >> /usr/share/applications/vbox-install.desktop
  1443.  fi
  1444.  if [ "$german_language" == "no" ]
  1445.  then
  1446.     echo "Name=Oracle VM VirtualBox install" >> /usr/share/applications/vbox-install.desktop
  1447.  fi
  1448.  echo "Type=Application" >> /usr/share/applications/vbox-install.desktop
  1449.  echo Exec=gksudo \"sh -c '$HOME/.hackware/virtualbox/install-virtualbox.sh'\" >> /usr/share/applications/vbox-install.desktop
  1450.  echo "Terminal=false"  >> /usr/share/applications/vbox-install.desktop
  1451.  echo "Icon=virtualbox" >> /usr/share/applications/vbox-install.desktop
  1452.  echo "Categories=Emulator;System;" >> /usr/share/applications/vbox-install.desktop
  1453.  chmod +x /usr/share/applications/vbox-install.desktop
  1454.  echo "[Desktop Entry]" > /usr/share/applications/vbox-remove.desktop
  1455.  echo "Encoding=UTF-8" >> /usr/share/applications/vbox-remove.desktop
  1456.  echo "Version=1.0" >> /usr/share/applications/vbox-remove.desktop
  1457.  if [ "$german_language" == "yes" ]
  1458.  then
  1459.     echo "Name=Oracle VM VirtualBox deinstallieren" >> /usr/share/applications/vbox-remove.desktop
  1460.  fi
  1461.  if [ "$german_language" == "no" ]
  1462.  then
  1463.     echo "Name=Oracle VM VirtualBox remove" >> /usr/share/applications/vbox-remove.desktop
  1464.  fi
  1465.  echo "Type=Application" >> /usr/share/applications/vbox-remove.desktop
  1466.  echo Exec=gksudo \"sh -c '$HOME/.hackware/virtualbox/remove-virtualbox.sh'\" >> /usr/share/applications/vbox-remove.desktop
  1467.  echo "Terminal=false"  >> /usr/share/applications/vbox-remove.desktop
  1468.  echo "Icon=virtualbox" >> /usr/share/applications/vbox-remove.desktop
  1469.  echo "Categories=Emulator;System;" >> /usr/share/applications/vbox-remove.desktop
  1470.  chmod +x /usr/share/applications/vbox-install.desktop
  1471.  sleep 11
  1472.  ./VirtualBox-5.1.8-111374-Linux_amd64.run uninstall > /dev/null 2>&1
  1473.  cd ../../../..
  1474.  #
  1475. #
  1476.  mkdir -p /root/.mozilla > /dev/null 2>&1
  1477.  mkdir -p /home/$user/.mozilla > /dev/null 2>&1
  1478.  #
  1479.  cp -rfa ./data/pool/misc/config/firefox/root/.mozilla /root/ > /dev/null 2>&1
  1480.  cp -rfa ./data/pool/misc/config/firefox/new-user/.mozilla /home/$user/ > /dev/null 2>&1
  1481.  #
  1482.  mkdir -p /home/$user/.config > /dev/null 2>&1
  1483.  mkdir -p /root/.config > /dev/null 2>&1
  1484.  sync
  1485.  cp -rfa data/pool/misc/config/libreoffice /root/.config/ > /dev/null 2>&1
  1486.  cp -rfa data/pool/misc/config/libreoffice /home/$user/.config/ > /dev/null 2>&1
  1487.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-startcenter.desktop;
  1488.  then
  1489.    sed -i s,"Exec=libreoffice %U","Exec=libreoffice %U --nologo",g /usr/share/applications/libreoffice-startcenter.desktop
  1490.  fi
  1491.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-base.desktop;
  1492.  then
  1493.    sed -i s,"Exec=libreoffice --base %U","Exec=libreoffice --base %U --nologo",g /usr/share/applications/libreoffice-base.desktop
  1494.  fi
  1495.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-calc.desktop;
  1496.  then
  1497.    sed -i s,"Exec=libreoffice --calc %U","Exec=libreoffice --calc %U --nologo",g /usr/share/applications/libreoffice-calc.desktop
  1498.  fi
  1499.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-draw.desktop;
  1500.  then
  1501.    sed -i s,"Exec=libreoffice --draw %U","Exec=libreoffice --draw %U --nologo",g /usr/share/applications/libreoffice-draw.desktop
  1502.  fi
  1503.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-impress.desktop;
  1504.  then
  1505.    sed -i s,"Exec=libreoffice --impress %U","Exec=libreoffice --impress %U --nologo",g /usr/share/applications/libreoffice-impress.desktop
  1506.  fi
  1507.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-math.desktop;
  1508.  then
  1509.    sed -i s,"Exec=libreoffice --math %U","Exec=libreoffice --math %U --nologo",g /usr/share/applications/libreoffice-math.desktop
  1510.  fi
  1511.  if ! grep -q "\--nologo" /usr/share/applications/libreoffice-writer.desktop;
  1512.  then
  1513.    sed -i s,"Exec=libreoffice --writer %U","Exec=libreoffice --writer %U --nologo",g /usr/share/applications/libreoffice-writer.desktop
  1514.  fi
  1515.  #
  1516.  mkdir -p /root/.config/vlc/ > /dev/null 2>&1
  1517.  cp -f data/pool/misc/config/vlc/vlcrc /root/.config/vlc/ > /dev/null 2>&1
  1518.  cp -f data/pool/misc/config/vlc/vlc-qt-interface.conf /root/.config/vlc/ > /dev/null 2>&1
  1519.  mkdir -p /home/$user/.config/vlc/ > /dev/null 2>&1
  1520.  cp -f data/pool/misc/config/vlc/vlcrc /home/$user/.config/vlc/ > /dev/null 2>&1
  1521.  cp -f data/pool/misc/config/vlc/vlc-qt-interface.conf /home/$user/.config/vlc/ > /dev/null 2>&1
  1522.  #
  1523.  mkdir -p /root/.config/gconf/apps/ > /dev/null 2>&1
  1524.  cp -rfa data/pool/misc/config/gedit-2 /root/.config/gconf/apps/ > /dev/null 2>&1
  1525.  mkdir -p /home/$user/.config/gconf/apps/ > /dev/null 2>&1
  1526.  cp -rfa data/pool/misc/config/gedit-2 /home/$user/.config/gconf/apps/ > /dev/null 2>&1
  1527.  #
  1528.  mkdir -p /root/.opera/ > /dev/null 2>&1
  1529.  mkdir -p /home/$user/.opera/ > /dev/null 2>&1
  1530.  cp -f data/pool/misc/config/opera/operaprefs.ini /root/.opera/ > /dev/null 2>&1
  1531.  cp -f data/pool/misc/config/opera/operaprefs.ini /home/$user/.opera/ > /dev/null 2>&1
  1532.  #
  1533.  mkdir -p /root/.config/audacious/ > /dev/null 2>&1
  1534.  cp -af data/pool/misc/config/audacious/config /root/.config/audacious/ > /dev/null 2>&1
  1535.  mkdir -p /home/$user/.config/audacious/ > /dev/null 2>&1
  1536.  cp -af data/pool/misc/config/audacious/plugin-registry /home/$user/.config/audacious/ > /dev/null 2>&1
  1537.  #
  1538.  mkdir -p /root/.searchmonkey/ > /dev/null 2>&1
  1539.  cp -f data/pool/misc/config/searchmonkey/config.ini /root/.searchmonkey/ > /dev/null 2>&1
  1540.  mkdir -p /home/$user/.searchmonkey/ > /dev/null 2>&1
  1541.  cp -f data/pool/misc/config/searchmonkey/config.ini /home/$user/.searchmonkey/ > /dev/null 2>&1
  1542.  #
  1543.  # xfce-autostart
  1544.  mkdir -p /root/.config/autostart > /dev/null 2>&1
  1545.  echo "[Desktop Entry]" > /root/.config/autostart/nm-applet.desktop
  1546.  echo "Hidden=true" >> /root/.config/autostart/nm-applet.desktop
  1547.  #
  1548.  echo "[Desktop Entry]" > /root/.config/autostart/polkit-gnome-authentication-agent-1.desktop
  1549.  echo "Hidden=true" >> /root/.config/autostart/polkit-gnome-authentication-agent-1.desktop
  1550.  #
  1551.  echo "[Desktop Entry]" > /root/.config/autostart/print-applet.desktop
  1552.  echo "Hidden=true" >> /root/.config/autostart/print-applet.desktop
  1553.  #
  1554.  echo "[Desktop Entry]" > /root/.config/autostart/xfce4-power-manager.desktop
  1555.  echo "Hidden=true" >> /root/.config/autostart/xfce4-power-manager.desktop
  1556.  #
  1557.  echo "[Desktop Entry]" > /root/.config/autostart/hplip-systray.desktop
  1558.  echo "Hidden=true" >> /root/.config/autostart/hplip-systray.desktop
  1559.  #
  1560.  mkdir -p /home/$user/.config/autostart > /dev/null 2>&1
  1561.  echo "[Desktop Entry]" > /home/$user/.config/autostart/nm-applet.desktop
  1562.  echo "Hidden=true" >> /home/$user/.config/autostart/nm-applet.desktop
  1563.  #
  1564.  echo "[Desktop Entry]" > /home/$user/.config/autostart/polkit-gnome-authentication-agent-1.desktop
  1565.  echo "Hidden=true" >> /home/$user/.config/autostart/polkit-gnome-authentication-agent-1.desktop
  1566.  #
  1567.  echo "[Desktop Entry]" > /home/$user/.config/autostart/print-applet.desktop
  1568.  echo "Hidden=true" >> /home/$user/.config/autostart/print-applet.desktop
  1569.  #
  1570.  echo "[Desktop Entry]" > /home/$user/.config/autostart/xfce4-power-manager.desktop
  1571.  echo "Hidden=true" >> /home/$user/.config/autostart/xfce4-power-manager.desktop
  1572.  #
  1573.  echo "[Desktop Entry]" > /home/$user/.config/autostart/hplip-systray.desktop
  1574.  echo "Hidden=true" >> /home/$user/.config/autostart/hplip-systray.desktop
  1575.  #
  1576.  sed -i s:"Icon=distccmon-gnome-icon.png":"Icon=":g /usr/share/applications/distccmon-gnome.desktop > /dev/null 2>&1
  1577.  rm /usr/share/applications/jconsole-1.7.0.desktop > /dev/null 2>&1
  1578.  rm /usr/share/applications/policytool-1.7.0.desktop > /dev/null 2>&1
  1579.  sed -i s:"Icon=java-1.7.0":"Icon=":g /usr/share/applications/jconsole.desktop > /dev/null 2>&1
  1580.  sed -i s:"Icon=java-1.7.0":"Icon=":g /usr/share/applications/policytool.desktop > /dev/null 2>&1
  1581.  sed -i s:"Icon=xsane":"Icon=simple-scan":g /usr/share/applications/xsane.desktop > /dev/null 2>&1
  1582.  sed -i s:"Icon=media-cdrom":"Icon=media-optical":g /usr/share/applications/xfburn.desktop > /dev/null 2>&1
  1583.  rm /usr/share/applications/hplip.desktop  > /dev/null 2>&1
  1584.  #
  1585.  #mkdir -p /root/.hackware/httrack  > /dev/null 2>&1
  1586.  #echo "#!/bin/bash" > /root/.hackware/httrack/kill-httrack.sh
  1587.  #echo "killall webhttrack" >> /root/.hackware/httrack/kill-httrack.sh
  1588.  #echo "killall webhttrack" >> /root/.hackware/httrack/kill-httrack.sh
  1589.  #chmod +x /root/.hackware/httrack/kill-httrack.sh
  1590.  #mkdir -p /home/$user/.hackware/httrack  > /dev/null 2>&1
  1591.  #echo "#!/bin/bash" > /home/$user/.hackware/httrack/kill-httrack.sh
  1592.  #echo "killall webhttrack" >> /home/$user/.hackware/httrack/kill-httrack.sh
  1593.  #echo "killall webhttrack" >> /home/$user/.hackware/httrack/kill-httrack.sh
  1594.  #chmod +x /home/$user/.hackware/httrack/kill-httrack.sh
  1595.  #
  1596.  # $HOME/.local/share/applications
  1597.  #
  1598.  #echo "[Desktop Entry]" > /usr/share/applications/kill-httrack.desktop
  1599.  #echo "Version=1.0" >> /usr/share/applications/kill-httrack.desktop
  1600.  #echo "Type=Application" >> /usr/share/applications/kill-httrack.desktop
  1601.  #echo "Categories=Network;" >> /usr/share/applications/kill-httrack.desktop
  1602.  #echo "Terminal=false" >> /usr/share/applications/kill-httrack.desktop
  1603.  #echo "Name=WebHTTrack Website Copier Termination" >> /usr/share/applications/kill-httrack.desktop
  1604.  #echo "Comment=WebHTTrack Website Copier Termination" >> /usr/share/applications/kill-httrack.desktop
  1605.  #echo "Exec=sh -c '\$HOME/.hackware/httrack/kill-httrack.sh'" >> /usr/share/applications/kill-httrack.desktop
  1606.  #echo "Icon=httrack" >> /usr/share/applications/kill-httrack.desktop
  1607.  #chmod +x /usr/share/applications/kill-httrack.desktop
  1608.  #
  1609.  echo "[Desktop Entry]" > /usr/share/applications/Searchmonkey.desktop
  1610.  echo "Version=1.0" >> /usr/share/applications/Searchmonkey.desktop
  1611.  echo "Type=Application" >> /usr/share/applications/Searchmonkey.desktop
  1612.  echo "Name=Searchmonkey" >> /usr/share/applications/Searchmonkey.desktop
  1613.  echo "Comment=" >> /usr/share/applications/Searchmonkey.desktop
  1614.  echo "Exec=/usr/bin/searchmonkey" >> /usr/share/applications/Searchmonkey.desktop
  1615.  echo "Icon=gtk-find" >> /usr/share/applications/Searchmonkey.desktop
  1616.  echo "Path=" >> /usr/share/applications/Searchmonkey.desktop
  1617.  echo "Terminal=false" >> /usr/share/applications/Searchmonkey.desktop
  1618.  echo "StartupNotify=false" >> /usr/share/applications/Searchmonkey.desktop
  1619.  echo "Categories=Utility;X-XFCE;" >> /usr/share/applications/Searchmonkey.desktop
  1620.  chmod +x /usr/share/applications/Searchmonkey.desktop
  1621.  #
  1622.  echo "[Desktop Entry]" > /usr/share/applications/thunar-root.desktop
  1623.  if [ "x$slwv" == "xSlackware 14.2" ]
  1624.  then
  1625.    echo "Name=Thunar-Dateiverwaltung (root)" >> /usr/share/applications/thunar-root.desktop
  1626.  fi
  1627.  if [ "x$slwv" == "xSlackware 14.1" ]
  1628.  then
  1629.    echo "Name=Dateimanager Thunar (root)" >> /usr/share/applications/thunar-root.desktop
  1630.  fi
  1631.  echo "Exec=gksudo thunar %F" >> /usr/share/applications/thunar-root.desktop
  1632.  echo "Icon=Thunar" >> /usr/share/applications/thunar-root.desktop
  1633.  echo "Terminal=false" >> /usr/share/applications/thunar-root.desktop
  1634.  echo "StartupNotify=true" >> /usr/share/applications/thunar-root.desktop
  1635.  echo "Type=Application" >> /usr/share/applications/thunar-root.desktop
  1636.  echo "Categories=System;Utility;Core;GTK;FileTools;FileManager;" >> /usr/share/applications/thunar-root.desktop
  1637.  chmod +x /usr/share/applications/thunar-root.desktop
  1638.  #
  1639.  echo "# UDISKS_FILESYSTEM_SHARED" > /etc/udev/rules.d/99-udisks2.rules
  1640.  echo "# ==1: mount filesystem to a shared directory (/media/VolumeName)" >> /etc/udev/rules.d/99-udisks2.rules
  1641.  echo "# ==0: mount filesystem to a private directory (/run/media/$USER/VolumeName)" >> /etc/udev/rules.d/99-udisks2.rules
  1642.  echo "# See udisks(8)" >> /etc/udev/rules.d/99-udisks2.rules
  1643.  echo 'ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"' >> /etc/udev/rules.d/99-udisks2.rules
  1644.  #
  1645.  sed -i s:"Categories=TextEditor;":"Categories=Utility;X-XFCE;":g /usr/share/applications/gvim.desktop  > /dev/null 2>&1
  1646.  #
  1647.  if [ "x$slwv" == "xSlackware 14.2" ]
  1648.  then
  1649.    #
  1650.    #
  1651.  
  1652.    removepkg blueman-2.0.4-x86_64-1 > /dev/null 2>&1
  1653.    removepkg bluez-5.40-x86_64-1 > /dev/null 2>&1
  1654.    removepkg bluez-firmware-1.2-x86_64-1 > /dev/null 2>&1
  1655.    #removepkg bluez-hcidump-2.5-x86_64-1 > /dev/null 2>&1
  1656.    removepkg xaos-3.6-x86_64-1 > /dev/null 2>&1
  1657.    removepkg xgames-0.3-x86_64-4 > /dev/null 2>&1
  1658.    #removepkg bsd-games-2.13-x86_64-12 > /dev/null 2>&1
  1659.    removepkg gnuchess-6.2.2-x86_64-1 > /dev/null 2>&1
  1660.    removepkg hplip-3.16.5-x86_64-3 > /dev/null 2>&1
  1661.    removepkg ModemManager-1.4.14-x86_64-1 > /dev/null 2>&1
  1662.    removepkg tumbler-0.1.31-x86_64-8 > /dev/null 2>&1
  1663.    removepkg akonadi-1.13.0-x86_64-2 > /dev/null 2>&1
  1664.    removepkg strigi-0.7.8-x86_64-2 > /dev/null 2>&1
  1665.    removepkg libbluedevil-2.1-x86_64-1 > /dev/null 2>&1
  1666.    removepkg xscreensaver-5.35-x86_64-2 > /dev/null 2>&1
  1667.    removepkg gnome-keyring-3.16.0-x86_64-2 > /dev/null 2>&1
  1668.    #
  1669.    rm /usr/share/applications/eboard.desktop > /dev/null 2>&1
  1670.    rm /usr/share/applications/xboard.desktop > /dev/null 2>&1
  1671.    rm /usr/share/applications/xboard-config.desktop > /dev/null 2>&1
  1672.    rm /usr/share/applications/xboard-fen-viewer.desktop > /dev/null 2>&1
  1673.    rm /usr/share/applications/xboard-pgn-viewer.desktop > /dev/null 2>&1
  1674.    rm /usr/share/applications/xboard-tourney.desktop > /dev/null 2>&1
  1675.    rm /usr/share/applications/xaos.desktop > /dev/null 2>&1
  1676.  fi
  1677.  #
  1678.  if [ "x$slwv" == "xSlackware 14.1" ]
  1679.  then
  1680.    removepkg blueman-r708-x86_64-3 > /dev/null 2>&1
  1681.    removepkg blueman-r708-x86_64-4_slack14.1 > /dev/null 2>&1
  1682.    removepkg gnuchess-6.0.3-x86_64-2 > /dev/null 2>&1
  1683.    removepkg xaos-3.5-x86_64-1 > /dev/null 2>&1
  1684.    removepkg xgames-0.3-x86_64-4 > /dev/null 2>&1
  1685.    removepkg bsd-games-2.13-x86_64-12 > /dev/null 2>&1
  1686.    removepkg hplip-3.13.10-x86_64-1 > /dev/null 2>&1
  1687.    removepkg ModemManager-1.0.0-x86_64-2 > /dev/null 2>&1
  1688.    removepkg tumbler-0.1.25-x86_64-4 > /dev/null 2>&1
  1689.    removepkg akonadi-1.9.2-x86_64-1 > /dev/null 2>&1
  1690.    removepkg bluez-4.99-x86_64-3 > /dev/null 2>&1
  1691.    removepkg bluez-firmware-1.2-x86_64-1 > /dev/null 2>&1
  1692.    removepkg bluez-hcidump-2.4-x86_64-1 > /dev/null 2>&1
  1693.    removepkg libbluedevil-1.9.3-x86_64-1 > /dev/null 2>&1
  1694.    removepkg strigi-0.7.7-x86_64-2 > /dev/null 2>&1
  1695.    removepkg xscreensaver-5.22-x86_64-2 > /dev/null 2>&1
  1696.    removepkg xscreensaver-5.34-x86_64-1 > /dev/null 2>&1
  1697.    removepkg gnome-keyring-3.8.2-x86_64-1 > /dev/null 2>&1
  1698.    #
  1699.    rm /usr/share/applications/eboard.desktop > /dev/null 2>&1
  1700.    rm /usr/share/applications/xboard.desktop > /dev/null 2>&1
  1701.    rm /usr/share/applications/xboard-config.desktop > /dev/null 2>&1
  1702.    rm /usr/share/applications/xboard-fen-viewer.desktop > /dev/null 2>&1
  1703.    rm /usr/share/applications/xboard-pgn-viewer.desktop > /dev/null 2>&1
  1704.    rm /usr/share/applications/xboard-tourney.desktop > /dev/null 2>&1
  1705.    rm /usr/share/applications/xaos.desktop > /dev/null 2>&1
  1706.  fi
  1707.  #
  1708.  rm /tmp/*.tgz  > /dev/null 2>&1  
  1709.  rm /tmp/*.txz  > /dev/null 2>&1
  1710.  rm /tmp/*.log  > /dev/null 2>&1
  1711.  rm -rf /tmp/build  > /dev/null 2>&1
  1712.  rm -rf /tmp/SBo  > /dev/null 2>&1
  1713.  #
  1714.  rm -rf /home/ftp > /dev/null 2>&1
  1715.  rm -rf /root/.hplip > /dev/null 2>&1
  1716.  #
  1717.  
  1718.  
  1719. }
  1720.  
  1721. function setup_pulseaudio()
  1722. {
  1723.  rm /etc/asound.conf  > /dev/null 2>&1
  1724.  chmod -x /usr/bin/pulseaudio > /dev/null 2>&1
  1725.  chmod -x /etc/rc.d/rc.pulseaudio > /dev/null 2>&1
  1726.  chmod +x /etc/rc.d/rc.alsa > /dev/null 2>&1
  1727.  killall pulseaudio > /dev/null 2>&1
  1728.  removepkg xfce4-pulseaudio-plugin-0.2.4-x86_64-3.txz > /dev/null 2>&1
  1729.  removepkg pulseaudio-9.0-x86_64-1.txz > /dev/null 2>&1
  1730.  removepkg pavucontrol-3.0-x86_64-1.txz > /dev/null 2>&1
  1731.  removepkg pamixer-1.3.1-x86_64-1.txz > /dev/null 2>&1
  1732.  userdel pulse > /dev/null 2>&1
  1733.  userdel -r pulse > /dev/null 2>&1
  1734. }
  1735.  
  1736.  
  1737.  
  1738. function setup_xfce()
  1739. {
  1740.  #
  1741.  #
  1742.  #murrine
  1743.  slwv=$(cat /etc/slackware-version)
  1744.  if [ "x$slwv" == "xSlackware 14.1" ]
  1745.  then
  1746.    installpkg ./data/pool/slackware64-14.1/compiled/murrine-0.98.2-x86_64-1_SBo.tgz > /dev/null 2>&1
  1747.  fi
  1748.  if [ "x$slwv" == "xSlackware 14.2" ]
  1749.  then
  1750.    installpkg ./data/pool/slackware64-14.2/compiled/murrine-0.98.2-x86_64-1_SBo.tgz > /dev/null 2>&1
  1751.    installpkg ./data/pool/slackware64-14.2/packages/xfce4-mixer/xfce4-mixer-4.11.0-x86_64-1.txz > /dev/null 2>&1
  1752.    installpkg ./data/pool/slackware64-14.2/compiled/xfce4-volumed-0.1.13-x86_64-3.txz > /dev/null 2>&1
  1753.  fi
  1754.  #
  1755.  
  1756.  #Open Sans font
  1757.  cp -raf ./data/pool/misc/fonts/OpenSans-Regular.ttf /usr/share/fonts/TTF  > /dev/null 2>&1
  1758.  #
  1759.  mkfontdir /usr/share/fonts/TTF > /dev/null 2>&1
  1760.  mkfontscale /usr/share/fonts/TTF > /dev/null 2>&1
  1761.  fc-cache -f -v /usr/share/fonts/TTF > /dev/null 2>&1
  1762.  #
  1763.  #
  1764.  sync
  1765.  
  1766.  
  1767.  if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1768.  then
  1769.    if [ "$(pidof nm-applet)" ]
  1770.    then
  1771.      killall nm-applet > /dev/null 2>&1
  1772.    fi
  1773.    if [ "$(pidof xscreensaver)" ]
  1774.    then
  1775.      killall xscreensaver > /dev/null 2>&1
  1776.    fi
  1777.  else
  1778.    eval `dbus-launch --sh-syntax` > /dev/null 2>&1
  1779.  fi
  1780.  #
  1781.  # > /dev/null 2>&1
  1782.  #
  1783.  
  1784.  find /usr/share/icons/ -mindepth 1 -delete > /dev/null 2>&1
  1785.  find /usr/share/themes/ -mindepth 1 -delete > /dev/null 2>&1
  1786.  sync > /dev/null 2>&1
  1787.  cp -raf ./data/pool/misc/themes/* /usr/share/themes/ > /dev/null 2>&1
  1788.  sync > /dev/null 2>&1
  1789.  tar xmJf ./data/pool/misc/icons.tar.xz -C /usr/share/ > /dev/null 2>&1
  1790.  sync > /dev/null 2>&1
  1791.  
  1792.  #
  1793.  
  1794.  
  1795.  if [ "x$slwv" == "xSlackware 14.1" ]
  1796.  then
  1797.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/Adwaita > /dev/null 2>&1
  1798.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/hackware > /dev/null 2>&1
  1799.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/gnome > /dev/null 2>&1
  1800.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/hicolor > /dev/null 2>&1
  1801.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/oxygen > /dev/null 2>&1
  1802.    gtk-update-icon-cache -f -t --include-image-data /usr/share/icons/mate > /dev/null 2>&1
  1803.  fi
  1804.  if [ "x$slwv" == "xSlackware 14.2" ]
  1805.  then
  1806.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/Adwaita > /dev/null 2>&1
  1807.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/hackware > /dev/null 2>&1
  1808.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/gnome > /dev/null 2>&1
  1809.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/hicolor > /dev/null 2>&1
  1810.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/oxygen > /dev/null 2>&1
  1811.    gtk-update-icon-cache -f --include-image-data /usr/share/icons/mate > /dev/null 2>&1
  1812. fi
  1813.  
  1814.  sync
  1815.  # background
  1816.  cp -af ./data/pool/misc/background/hackware.jpg /usr/share/backgrounds/xfce/ > /dev/null 2>&1
  1817.  cp -af ./data/pool/misc/background/hackware.jpg /usr/share/backgrounds/ > /dev/null 2>&1
  1818.  sync > /dev/null 2>&1
  1819.  #if [ "x$slwv" == "xSlackware 14.1" ]
  1820.  #then
  1821.  #  rm /usr/share/backgrounds/xfce/xfce-blue.jpg > /dev/null 2>&1
  1822.  #  mv /usr/share/backgrounds/xfce/xfce-avalon.jpg /usr/share/backgrounds/xfce/xfce-blue.jpg > /dev/null 2>&1
  1823.  #fi
  1824.  if [ "x$slwv" == "xSlackware 14.2" ]
  1825.  then
  1826.    if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1827.    then
  1828.      while [ "$(pidof xfconfd)" ]
  1829.      do
  1830.        sleep 1  
  1831.        killall xfconfd > /dev/null 2>&1
  1832.      done
  1833.      while [ "$(pidof xfdesktop)" ]
  1834.      do
  1835.        sleep 1  
  1836.        killall xfdesktop > /dev/null 2>&1
  1837.      done
  1838.    fi
  1839.    chmod -R g+w /root > /dev/null 2>&1
  1840.    sync > /dev/null 2>&1
  1841.    sed -i s:'xfce-teal.jpg':'hackware.jpg':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1842.    sed -i s:'value="0"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1843.    sed -i s:'value="1"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1844.    sed -i s:'value="2"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1845.    sed -i s:'value="3"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1846.    sed -i s:'value="4"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1847.    sed -i s:'value="5"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1848.  
  1849.    sync
  1850.    if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1851.    then  
  1852.      if ! [ "$(pidof xfdesktop)" ]
  1853.        then
  1854.        xfdesktop --reload > /dev/null 2>&1
  1855.      fi
  1856.    fi
  1857.  
  1858.    sed -i s:'xfce-teal.jpg':'hackware.jpg':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1859.    sed -i s:'value="0"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1860.    sed -i s:'value="1"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1861.    sed -i s:'value="2"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1862.    sed -i s:'value="3"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1863.    sed -i s:'value="4"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1864.    sed -i s:'value="5"/>':'value="3"/>':g /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml > /dev/null 2>&1
  1865.  
  1866.  
  1867.    #rm /usr/share/backgrounds/xfce/xfce-teal.jpg > /dev/null 2>&1
  1868.    #mv /usr/share/backgrounds/xfce/xfce-avalon.jpg /usr/share/backgrounds/xfce/xfce-teal.jpg > /dev/null 2>&1
  1869.  fi
  1870.  #
  1871.  
  1872.  
  1873. sync > /dev/null 2>&1
  1874. #
  1875.  
  1876. xfconf-query -c keyboards -p /Default/Numlock -n -t bool -s true > /dev/null 2>&1
  1877. xfconf-query -c xfwm4 -p /general/sync_to_vblank -n -t bool -s false > /dev/null 2>&1
  1878. xfconf-query -c xfwm4 -p /general/use_compositing -n -t bool -s false > /dev/null 2>&1
  1879. xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "Open Sans Bold 9" > /dev/null 2>&1
  1880. xfconf-query -c xfwm4 -p /general/workspace_count -n -t int -s 1 > /dev/null 2>&1
  1881. xfconf-query -c xfwm4 -p /general/theme -n -t string -s "Vertex-Light" > /dev/null 2>&1
  1882. xfconf-query -c xfwm4 -p /general/inactive_opacity -n -t int -s 69 > /dev/null 2>&1
  1883. xfconf-query -c xfwm4 -p /general/move_opacity -n -t int -s 69 > /dev/null 2>&1
  1884. xfconf-query -c xfwm4 -p /general/resize_opacity -n -t int -s 69 > /dev/null 2>&1
  1885. xfconf-query -c xfwm4 -p /general/scroll_workspaces -n -t bool -s false > /dev/null 2>&1
  1886. #xfconf-query -c xfce4-notifyd -p /initial-opacity -n -t float -s "0.900000"
  1887. xfconf-query -c xfce4-notifyd -p /notify-location -n -t int -s "2" > /dev/null 2>&1
  1888. xfconf-query -c xfce4-notifyd -p /theme -n -t string -s "Arc" > /dev/null 2>&1
  1889. xfconf-query -c xfce4-session -p /shutdown/ShowHibernate -n -t bool -s false > /dev/null 2>&1
  1890. xfconf-query -c xfce4-session -p /shutdown/ShowSuspend -n -t bool -s false > /dev/null 2>&1
  1891. xfconf-query -c xfce4-session -p /shutdown/SaveOnExit -n -t bool -s false > /dev/null 2>&1
  1892. xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "Arc" > /dev/null 2>&1
  1893. xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s "hackware" > /dev/null 2>&1
  1894. xfconf-query -c xsettings -p /Gtk/FontName -n -t string -s "Open Sans 10" > /dev/null 2>&1
  1895. #xfconf-query -c xsettings -p /Gtk/CursorThemeName -n -t string -s "hackware-cursor" > /dev/null 2>&1
  1896. xfconf-query -c xsettings -p /Xft/Antialias -n -t int -s 1 > /dev/null 2>&1
  1897. xfconf-query -c xsettings -p /Xft/DPI -n -t int -s 96 > /dev/null 2>&1
  1898. xfconf-query -c xsettings -p /Xft/Hinting -n -t int -s "-1" > /dev/null 2>&1
  1899. xfconf-query -c xsettings -p /Xft/HintStyle -n -t string -s hintnone > /dev/null 2>&1
  1900. xfconf-query -c xsettings -p /Xft/RGBA -n -t string -s none > /dev/null 2>&1
  1901. #xfconf-query -c xsettings -p /Gtk/CursorThemeName -n -t string -s "hackware-cursor" > /dev/null 2>&1
  1902. #
  1903. #panel
  1904. sync > /dev/null 2>&1
  1905. if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1906. then
  1907.   xfce4-panel --quit > /dev/null 2>&1
  1908.   killall xfconfd > /dev/null 2>&1  
  1909. fi
  1910. rm /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml > /dev/null 2>&1
  1911. mkdir -p /home/$user/.config/xfce4/xfconf/xfce-perchannel-xml > /dev/null 2>&1
  1912.  
  1913. if [ "x$slwv" == "xSlackware 14.1" ]
  1914.  then
  1915.    cp -af ./data/pool/misc/xfce/xfce4-panel/14.1/xfce4-panel.xml /root/.config/xfce4/xfconf/xfce-perchannel-xml/ > /dev/null 2>&1
  1916.    cp -af ./data/pool/misc/xfce/xfce4-panel/14.1/xfce4-panel.xml /home/$user/.config/xfce4/xfconf/xfce-perchannel-xml/ > /dev/null 2>&1
  1917.  fi
  1918.  if [ "x$slwv" == "xSlackware 14.2" ]
  1919.  then
  1920.     cp -af ./data/pool/misc/xfce/xfce4-panel/14.2/xfce4-panel.xml /root/.config/xfce4/xfconf/xfce-perchannel-xml/ > /dev/null 2>&1
  1921.     cp -af ./data/pool/misc/xfce/xfce4-panel/14.2/xfce4-panel.xml /home/$user/.config/xfce4/xfconf/xfce-perchannel-xml/ > /dev/null 2>&1
  1922.  fi
  1923. sync > /dev/null 2>&1
  1924. if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1925. then
  1926.   sleep 1 > /dev/null 2>&1
  1927.   xfce4-panel & > /dev/null 2>&1
  1928. fi
  1929.  
  1930.  
  1931.  
  1932. sync > /dev/null 2>&1
  1933.  
  1934. #thunar settings
  1935. xfconf-query -c thunar -p /last-details-view-column-order -n -t string -s THUNAR_COLUMN_NAME,THUNAR_COLUMN_SIZE,THUNAR_COLUMN_TYPE,THUNAR_COLUMN_DATE_MODIFIED,THUNAR_COLUMN_OWNER,THUNAR_COLUMN_PERMISSIONS,THUNAR_COLUMN_MIME_TYPE,THUNAR_COLUMN_DATE_ACCESSED,THUNAR_COLUMN_GROUP > /dev/null 2>&1
  1936. xfconf-query -c thunar -p /last-details-view-column-widths -n -t string -s 50,172,50,232,660,156,96,98,234 > /dev/null 2>&1
  1937. xfconf-query -c thunar -p /last-details-view-fixed-columns -n -t bool -s true > /dev/null 2>&1
  1938. xfconf-query -c thunar -p /last-details-view-visible-columns -n -t string -s > /dev/null 2>&1 THUNAR_COLUMN_DATE_MODIFIED,THUNAR_COLUMN_MIME_TYPE,THUNAR_COLUMN_NAME,THUNAR_COLUMN_OWNER,THUNAR_COLUMN_PERMISSIONS,THUNAR_COLUMN_SIZE,THUNAR_COLUMN_TYPE > /dev/null 2>&1
  1939. xfconf-query -c thunar -p /last-details-view-zoom-level -n -t string -s THUNAR_ZOOM_LEVEL_SMALLER > /dev/null 2>&1
  1940. xfconf-query -c thunar -p /last-icon-view-zoom-level -n -t string -s THUNAR_ZOOM_LEVEL_NORMAL > /dev/null 2>&1
  1941. xfconf-query -c thunar -p /last-separator-position -n -t int -s 247 > /dev/null 2>&1
  1942. xfconf-query -c thunar -p /last-side-pane -n -t string -s ThunarShortcutsPane > /dev/null 2>&1
  1943. xfconf-query -c thunar -p /last-show-hidden -n -t bool -s true > /dev/null 2>&1
  1944. xfconf-query -c thunar -p /last-sort-column -n -t string -s THUNAR_COLUMN_NAME > /dev/null 2>&1
  1945. xfconf-query -c thunar -p /last-sort-order -n -t string -s GTK_SORT_ASCENDING > /dev/null 2>&1
  1946. xfconf-query -c thunar -p /last-view -n -t string -s ThunarIconView > /dev/null 2>&1
  1947. xfconf-query -c thunar -p /last-window-maximized -n -t bool -s true > /dev/null 2>&1
  1948. xfconf-query -c thunar -p /misc-date-style -n -t string -s THUNAR_DATE_STYLE_ISO > /dev/null 2>&1
  1949. xfconf-query -c thunar -p /misc-single-click -n -t bool -s false > /dev/null 2>&1
  1950. xfconf-query -c thunar -p /nisc-text-beside-icons -n -t bool -s false > /dev/null 2>&1
  1951. xfconf-query -c thunar -p /misc-thumbnail-mode -n -t string -s THUNAR_THUMBNAIL_MODE_NEVER > /dev/null 2>&1
  1952. #xfconf-query -c thunar -p /misc-full-path-in-title -n -t bool -s true > /dev/null 2>&1
  1953. xfconf-query -c thunar -p /shortcuts-icon-emblems -n -t bool -s true > /dev/null 2>&1
  1954. #
  1955.  
  1956. sync > /dev/null 2>&1
  1957.  
  1958. if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  1959. then
  1960.   #
  1961.   killall xfsettingsd > /dev/null 2>&1
  1962.   sleep 1 > /dev/null 2>&1
  1963.   xfsettingsd & > /dev/null 2>&1
  1964.   #
  1965.   if [ "$(pidof xfconfd)" ]
  1966.   then
  1967.     killall xfconfd > /dev/null 2>&1
  1968.   fi
  1969.   sleep 1 > /dev/null 2>&1
  1970.   #
  1971.   if ! [ "$(pidof xfconfd)" ]
  1972.   then
  1973.     /usr/lib64/xfce4/xfconf/xfconfd & > /dev/null 2>&1
  1974.   fi
  1975.   #
  1976. else
  1977.   kill -HUP $DBUS_SESSION_BUS_PID > /dev/null 2>&1
  1978.   killall dbus-daemon > /dev/null 2>&1
  1979.   if [ "$(pidof xfconfd)" ]
  1980.   then
  1981.     killall xfconfd > /dev/null 2>&1
  1982.   fi
  1983. fi
  1984.  
  1985. ##
  1986. #
  1987. sync
  1988. if [ "$(pidof xfdesktop)" ]
  1989. then
  1990.   killall xfdesktop > /dev/null 2>&1
  1991. fi
  1992.  
  1993.  
  1994.  #xfce4 terminal
  1995.  
  1996.  mkdir -p /root/.config/xfce4/terminal > /dev/null 2>&1
  1997.  mkdir -p /home/$user/.config/xfce4/terminal > /dev/null 2>&1
  1998.  cp -af ./data/pool/misc/xfce/terminal/terminalrc /root/.config/xfce4/terminal/ > /dev/null 2>&1
  1999.  cp -af ./data/pool/misc/xfce/terminal/terminalrc /home/$user/.config/xfce4/terminal/ > /dev/null 2>&1
  2000.  
  2001.  
  2002.  #disable nm-applet autostart
  2003.  mkdir -p /root/.config/autostart > /dev/null 2>&1
  2004.  echo "[Desktop Entry]" > /root/.config/autostart/nm-applet.desktop
  2005.  echo "Hidden=true" >> /root/.config/autostart/nm-applet.desktop
  2006.  mkdir -p /home/$user/.config/autostart > /dev/null 2>&1
  2007.  echo "[Desktop Entry]" > /home/$user/.config/autostart/nm-applet.desktop
  2008.  echo "Hidden=true" >> /home/$user/.config/autostart/nm-applet.desktop
  2009.  #
  2010.  #disable xscreensaver autostart
  2011.  mkdir -p /root/.config/autostart > /dev/null 2>&1
  2012.  echo "[Desktop Entry]" > /root/.config/autostart/xscreensaver.desktop
  2013.  echo "Hidden=true" >> /root/.config/autostart/xscreensaver.desktop
  2014.  mkdir -p /home/$user/.config/autostart > /dev/null 2>&1
  2015.  echo "[Desktop Entry]" > /home/$user/.config/autostart/xscreensaver.desktop
  2016.  echo "Hidden=true" >> /home/$user/.config/autostart/xscreensaver.desktop
  2017.  
  2018.  #
  2019.  if [ "x$slwv" == "xSlackware 14.1" ]
  2020.  then
  2021.    sed -i s:'gtk-update-icon-cache -t -f':'gtk-update-icon-cache -f -t --include-image-data':g /etc/rc.d/rc.M  > /dev/null 2>&1
  2022.  fi
  2023.  if [ "x$slwv" == "xSlackware 14.2" ]
  2024.  then
  2025.    sed -i s:'gtk-update-icon-cache -t -f':'gtk-update-icon-cache -f --include-image-data':g /etc/rc.d/rc.M > /dev/null 2>&1
  2026.  fi
  2027.  #
  2028.  mkdir -p /root/.hackware/xfce > /dev/null 2>&1
  2029.  mkdir -p /home/$user/.hackware/xfce > /dev/null 2>&1
  2030.  #
  2031.  mkdir -p /media/iso > /dev/null 2>&1
  2032.  #
  2033.  sync > /dev/null 2>&1
  2034.  echo "#!/bin/bash" > /root/.hackware/xfce/mount-iso.sh
  2035.  echo "umount /media/iso" >> /root/.hackware/xfce/mount-iso.sh
  2036.  echo "mount -o loop \$1 /media/iso" >> /root/.hackware/xfce/mount-iso.sh
  2037.  chmod +x /root/.hackware/xfce/mount-iso.sh > /dev/null 2>&1
  2038.  
  2039.  echo "#!/bin/bash" > /home/$user/.hackware/xfce/mount-iso.sh
  2040.  echo "umount /media/iso" >> /home/$user/.hackware/xfce/mount-iso.sh
  2041.  echo "mount -o loop \$1 /media/iso" >> /home/$user/.hackware/xfce/mount-iso.sh
  2042.  chmod +x /home/$user/.hackware/xfce/mount-iso.sh > /dev/null 2>&1
  2043.  
  2044. echo '#!/bin/bash' > /root/.hackware/xfce/searchmonkey.sh
  2045. echo 'smconfigfile="/root/.searchmonkey/config.ini"' >> /root/.hackware/xfce/searchmonkey.sh
  2046. echo 'mkdir -p /root/.searchmonkey' >> /root/.hackware/xfce/searchmonkey.sh
  2047. echo 'sync' >> /root/.hackware/xfce/searchmonkey.sh
  2048. echo " " >> /root/.hackware/xfce/searchmonkey.sh
  2049. echo 'echo "# searchmonkey settings auto-generated - Do not edit!" > $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2050. echo 'echo " " >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2051. echo 'echo "[version-info]" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2052. echo 'echo ""version=0.8.1"" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2053. echo 'echo " " >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2054. echo 'echo "[application]" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2055. echo 'echo "window1=640\;460\;" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2056. echo 'echo " " >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2057. echo 'echo "[menuOptions]" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2058. echo 'echo "toolbar2=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2059. echo 'echo "status_bar1=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2060. echo 'echo "horizontal_results1=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2061. echo 'echo "vertical_results1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2062. echo 'echo "file_name1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2063. echo 'echo "location1=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2064. echo 'echo "size1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2065. echo 'echo "type1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2066. echo 'echo "modified1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2067. echo 'echo "matches1=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2068. echo 'echo "word_wrap1=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2069. echo 'echo "autosize_columns=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2070. echo 'echo "font=Terminus Bold 13" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2071. echo 'echo "highlight=#0000FF" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2072. echo 'echo " " >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2073. echo 'echo "[history]" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2074. echo 'echo "searchNotebook=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2075. echo 'echo "fileName2regex-active=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2076. echo 'echo "fileName2noregex-active=-1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2077. echo 'echo "containingText2-active=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2078. echo 'echo "containingTextCheck2=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2079. echo 'echo "lookIn2-active=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2080. echo 'echo "lookIn2=$1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2081. echo 'echo "searchSubfoldersCheck2=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2082. echo 'echo "ignoreHiddenFiles=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2083. echo 'echo "fileNameregex-active=-1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2084. echo 'echo "fileNamenoregex-active=-1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2085. echo 'echo "expertUserCheck=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2086. echo 'echo "containingText-active=-1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2087. echo 'echo "containingTextCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2088. echo 'echo "lookIn-active=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2089. echo 'echo "lookIn=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2090. echo 'echo "searchSubfoldersCheck=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2091. echo 'echo "moreThanCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2092. echo 'echo "moreThanEntry=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2093. echo 'echo "lessThanCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2094. echo 'echo "lessThanEntry=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2095. echo 'echo "afterCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2096. echo 'echo "afterEntry=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2097. echo 'echo "beforeCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2098. echo 'echo "beforeEntry=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2099. echo 'echo "folderDepthCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2100. echo 'echo "folderDepthSpin=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2101. echo 'echo "notExpressionCheckFile=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2102. echo 'echo "matchCaseCheckFile=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2103. echo 'echo "dosExpressionRadioFile=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2104. echo 'echo "regularExpressionRadioFile=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2105. echo 'echo "singlePhaseCheckContents=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2106. echo 'echo "matchCaseCheckContents=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2107. echo 'echo "wildcardCheckContents=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2108. echo 'echo "regularExpressionRadioContents=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2109. echo 'echo "limitResultsCheckResults=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2110. echo 'echo "maxHitsSpinResults=25" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2111. echo 'echo "showLinesCheckResults=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2112. echo 'echo "showLinesSpinResults=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2113. echo 'echo "followSymLinksCheck=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2114. echo 'echo "limitContentsCheckResults=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2115. echo 'echo "maxContentHitsSpinResults=1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2116. echo 'echo "treeviewSortcol=1" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2117. echo 'echo "treeviewSortcolOrder=0" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2118. echo 'echo "treeviewName=395" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2119. echo 'echo "treeviewLocation=350" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2120. echo 'echo "treeviewSize=96" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2121. echo 'echo "treeviewType=77" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2122. echo 'echo "treeviewModified=224" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2123. echo 'echo "treeviewMatches=79" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2124. echo 'echo "fileName2regex=;" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2125. echo 'echo "containingText2=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2126. echo 'echo "fileNameregex=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2127. echo 'echo "containingText=" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2128. echo 'echo " " >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2129. echo 'echo "[configuration]" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2130. echo 'echo "configForceSingle=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2131. echo 'echo "configExtendedRegex=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2132. echo 'echo "configPromptSave=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2133. echo 'echo "configPromptDelete=true" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2134. echo 'echo "configMatchBinary=false" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2135. echo 'echo "configResultEOL=\\n" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2136. echo 'echo "configResultEOF=," >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2137. #
  2138. echo 'echo "configResultDelimiter=\\\"" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2139. #
  2140. echo 'echo "configTextEditor=gedit" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2141. echo 'echo "configTextEditorAttributes=%f" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2142. echo 'echo "configFileExplorer=thunar" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2143. echo 'echo "configFileExplorerAttributes=%d" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2144. echo 'echo "configWebBrowser=firefox" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2145. echo 'echo "configWebBrowserAttributes=-new-tab %f" >> $smconfigfile' >> /root/.hackware/xfce/searchmonkey.sh
  2146. echo " " >> /root/.hackware/xfce/searchmonkey.sh
  2147. echo 'sync' >> /root/.hackware/xfce/searchmonkey.sh
  2148. echo 'searchmonkey' >> /root/.hackware/xfce/searchmonkey.sh
  2149. chmod +x /root/.hackware/xfce/searchmonkey.sh > /dev/null 2>&1
  2150. #
  2151. echo '#!/bin/bash' > /home/$user/.hackware/xfce/searchmonkey.sh
  2152. echo "smconfigfile=/home/$user/.searchmonkey/config.ini" >> /home/$user/.hackware/xfce/searchmonkey.sh
  2153. echo "mkdir -p /home/$user/.searchmonkey" >> /home/$user/.hackware/xfce/searchmonkey.sh
  2154. echo 'sync' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2155. echo " " >> /home/$user/.hackware/xfce/searchmonkey.sh
  2156. echo 'echo "# searchmonkey settings auto-generated - Do not edit!" > $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2157. echo 'echo " " >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2158. echo 'echo "[version-info]" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2159. echo 'echo ""version=0.8.1"" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2160. echo 'echo " " >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2161. echo 'echo "[application]" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2162. echo 'echo "window1=640\;460\;" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2163. echo 'echo " " >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2164. echo 'echo "[menuOptions]" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2165. echo 'echo "toolbar2=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2166. echo 'echo "status_bar1=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2167. echo 'echo "horizontal_results1=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2168. echo 'echo "vertical_results1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2169. echo 'echo "file_name1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2170. echo 'echo "location1=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2171. echo 'echo "size1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2172. echo 'echo "type1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2173. echo 'echo "modified1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2174. echo 'echo "matches1=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2175. echo 'echo "word_wrap1=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2176. echo 'echo "autosize_columns=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2177. echo 'echo "font=Terminus Bold 13" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2178. echo 'echo "highlight=#0000FF" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2179. echo 'echo " " >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2180. echo 'echo "[history]" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2181. echo 'echo "searchNotebook=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2182. echo 'echo "fileName2regex-active=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2183. echo 'echo "fileName2noregex-active=-1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2184. echo 'echo "containingText2-active=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2185. echo 'echo "containingTextCheck2=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2186. echo 'echo "lookIn2-active=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2187. echo 'echo "lookIn2=$1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2188. echo 'echo "searchSubfoldersCheck2=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2189. echo 'echo "ignoreHiddenFiles=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2190. echo 'echo "fileNameregex-active=-1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2191. echo 'echo "fileNamenoregex-active=-1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2192. echo 'echo "expertUserCheck=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2193. echo 'echo "containingText-active=-1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2194. echo 'echo "containingTextCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2195. echo 'echo "lookIn-active=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2196. echo 'echo "lookIn=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2197. echo 'echo "searchSubfoldersCheck=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2198. echo 'echo "moreThanCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2199. echo 'echo "moreThanEntry=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2200. echo 'echo "lessThanCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2201. echo 'echo "lessThanEntry=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2202. echo 'echo "afterCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2203. echo 'echo "afterEntry=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2204. echo 'echo "beforeCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2205. echo 'echo "beforeEntry=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2206. echo 'echo "folderDepthCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2207. echo 'echo "folderDepthSpin=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2208. echo 'echo "notExpressionCheckFile=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2209. echo 'echo "matchCaseCheckFile=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2210. echo 'echo "dosExpressionRadioFile=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2211. echo 'echo "regularExpressionRadioFile=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2212. echo 'echo "singlePhaseCheckContents=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2213. echo 'echo "matchCaseCheckContents=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2214. echo 'echo "wildcardCheckContents=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2215. echo 'echo "regularExpressionRadioContents=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2216. echo 'echo "limitResultsCheckResults=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2217. echo 'echo "maxHitsSpinResults=25" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2218. echo 'echo "showLinesCheckResults=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2219. echo 'echo "showLinesSpinResults=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2220. echo 'echo "followSymLinksCheck=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2221. echo 'echo "limitContentsCheckResults=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2222. echo 'echo "maxContentHitsSpinResults=1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2223. echo 'echo "treeviewSortcol=1" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2224. echo 'echo "treeviewSortcolOrder=0" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2225. echo 'echo "treeviewName=395" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2226. echo 'echo "treeviewLocation=350" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2227. echo 'echo "treeviewSize=96" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2228. echo 'echo "treeviewType=77" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2229. echo 'echo "treeviewModified=224" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2230. echo 'echo "treeviewMatches=79" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2231. echo 'echo "fileName2regex=;" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2232. echo 'echo "containingText2=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2233. echo 'echo "fileNameregex=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2234. echo 'echo "containingText=" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2235. echo 'echo " " >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2236. echo 'echo "[configuration]" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2237. echo 'echo "configForceSingle=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2238. echo 'echo "configExtendedRegex=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2239. echo 'echo "configPromptSave=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2240. echo 'echo "configPromptDelete=true" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2241. echo 'echo "configMatchBinary=false" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2242. echo 'echo "configResultEOL=\\n" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2243. echo 'echo "configResultEOF=," >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2244. #
  2245. echo 'echo "configResultDelimiter=\\\"" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2246. #
  2247. echo 'echo "configTextEditor=gedit" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2248. echo 'echo "configTextEditorAttributes=%f" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2249. echo 'echo "configFileExplorer=thunar" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2250. echo 'echo "configFileExplorerAttributes=%d" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2251. echo 'echo "configWebBrowser=firefox" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2252. echo 'echo "configWebBrowserAttributes=-new-tab %f" >> $smconfigfile' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2253. echo " " >> /home/$user/.hackware/xfce/searchmonkey.sh
  2254. echo 'sync' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2255. echo 'searchmonkey' >> /home/$user/.hackware/xfce/searchmonkey.sh
  2256. chmod +x /home/$user/.hackware/xfce/searchmonkey.sh > /dev/null 2>&1
  2257.  
  2258. #
  2259.  mkdir -p /root/.config/Thunar > /dev/null 2>&1
  2260.  if [ "$german_language" == "yes" ]
  2261.  then
  2262.    echo '<?xml encoding="UTF-8" version="1.0"?>' > /root/.config/Thunar/uca.xml
  2263.    echo "<actions>" >> /root/.config/Thunar/uca.xml
  2264.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2265.    echo "   <icon>utilities-terminal</icon>" >> /root/.config/Thunar/uca.xml
  2266.    echo "   <name>Terminal hier öffnen</name>" >> /root/.config/Thunar/uca.xml
  2267.    echo "   <unique-id>1454696335442808-1</unique-id>" >> /root/.config/Thunar/uca.xml
  2268.    echo "   <command>exo-open --working-directory %f --launch TerminalEmulator</command>" >> /root/.config/Thunar/uca.xml
  2269.    echo "   <description>Öffnet das Terminal im aktuellen Verzeichnis</description>" >> /root/.config/Thunar/uca.xml
  2270.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2271.    echo "   <startup-notify/>" >> /root/.config/Thunar/uca.xml
  2272.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2273.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2274.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2275.    echo "   <icon>brasero</icon>" >> /root/.config/Thunar/uca.xml
  2276.    echo "   <name>.iso Datei mounten</name>" >> /root/.config/Thunar/uca.xml
  2277.    echo "   <unique-id>1454901441765736-5</unique-id>" >> /root/.config/Thunar/uca.xml
  2278.    echo "   <command>/root/.hackware/xfce/mount-iso.sh %f</command>" >> /root/.config/Thunar/uca.xml
  2279.    echo "   <description>.iso Datei mounten</description>" >> /root/.config/Thunar/uca.xml
  2280.    echo "   <patterns>*.iso</patterns>" >> /root/.config/Thunar/uca.xml
  2281.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2282.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2283.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2284.    echo "   <icon>file-roller</icon>" >> /root/.config/Thunar/uca.xml
  2285.    echo "   <name>Ordner tar.xz komprimieren</name>" >> /root/.config/Thunar/uca.xml
  2286.    echo "   <unique-id>1456502230601632-3</unique-id>" >> /root/.config/Thunar/uca.xml
  2287.    echo "   <command>tar -cJf %n.tar.xz %n/*</command>" >> /root/.config/Thunar/uca.xml
  2288.    echo "   <description>Aktuelles Verzeichnis tar.xz komprimieren</description>" >> /root/.config/Thunar/uca.xml
  2289.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2290.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2291.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2292.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2293.    echo "   <icon>drive-removable-media-usb-symbolic-1</icon>" >> /root/.config/Thunar/uca.xml
  2294.    echo "   <name>Dateisystem synchronisieren</name>" >> /root/.config/Thunar/uca.xml
  2295.    echo "   <unique-id>1457388060570753-4</unique-id>" >> /root/.config/Thunar/uca.xml
  2296.    echo "   <command>sync</command>" >> /root/.config/Thunar/uca.xml
  2297.    echo "   <description>Dateisystemcache auf Laufwerk(e) schreiben</description>" >> /root/.config/Thunar/uca.xml
  2298.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2299.    echo "   <startup-notify/>" >> /root/.config/Thunar/uca.xml
  2300.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2301.    echo "   <audio-files/>" >> /root/.config/Thunar/uca.xml
  2302.    echo "   <image-files/>" >> /root/.config/Thunar/uca.xml
  2303.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2304.    echo "   <text-files/>" >> /root/.config/Thunar/uca.xml
  2305.    echo "   <video-files/>" >> /root/.config/Thunar/uca.xml
  2306.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2307.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2308.    echo "   <icon>edit-find</icon>" >> /root/.config/Thunar/uca.xml
  2309.    echo "   <name>Searchmonkey</name>" >> /root/.config/Thunar/uca.xml
  2310.    echo "   <unique-id>1457393005240280-6</unique-id>" >> /root/.config/Thunar/uca.xml
  2311.    echo "   <command>/root/.hackware/xfce/searchmonkey.sh %F</command>" >> /root/.config/Thunar/uca.xml
  2312.    echo "   <description>Searchmonkey im ausgewählten Verzeichnis starten</description>" >> /root/.config/Thunar/uca.xml
  2313.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2314.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2315.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2316.    echo "</actions>" >> /root/.config/Thunar/uca.xml
  2317.    #
  2318.    mkdir -p /home/$user/.config/Thunar > /dev/null 2>&1
  2319.    echo '<?xml encoding="UTF-8" version="1.0"?>' > /home/$user/.config/Thunar/uca.xml
  2320.    echo "<actions>" >> /home/$user/.config/Thunar/uca.xml
  2321.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2322.    echo "   <icon>utilities-terminal</icon>" >> /home/$user/.config/Thunar/uca.xml
  2323.    echo "   <name>Terminal hier öffnen</name>" >> /home/$user/.config/Thunar/uca.xml
  2324.    echo "   <unique-id>1454696335442808-1</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2325.    echo "   <command>exo-open --working-directory %f --launch TerminalEmulator</command>" >> /home/$user/.config/Thunar/uca.xml
  2326.    echo "   <description>Öffnet das Terminal im aktuellen Verzeichnis</description>" >> /home/$user/.config/Thunar/uca.xml
  2327.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2328.    echo "   <startup-notify/>" >> /home/$user/.config/Thunar/uca.xml
  2329.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2330.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2331.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2332.    echo "   <icon>brasero</icon>" >> /home/$user/.config/Thunar/uca.xml
  2333.    echo "   <name>.iso Datei mounten</name>" >> /home/$user/.config/Thunar/uca.xml
  2334.    echo "   <unique-id>1454901441765736-5</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2335.    echo "   <command>gksudo /home/$user/.hackware/xfce/mount-iso.sh %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2336.    echo "   <description>.iso Datei mounten</description>" >> /home/$user/.config/Thunar/uca.xml
  2337.    echo "   <patterns>*.iso</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2338.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2339.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2340.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2341.    echo "   <icon>Thunar</icon>" >> /home/$user/.config/Thunar/uca.xml
  2342.    echo "   <name>Ordner mit Thunar öffnen(root)</name>" >> /home/$user/.config/Thunar/uca.xml
  2343.    echo "   <unique-id>1454901493360117-7</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2344.    echo "   <command>gksudo Thunar %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2345.    echo "   <description>Aktuelles Verzeichnis mit Thunar öffnen (root)</description>" >> /home/$user/.config/Thunar/uca.xml
  2346.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2347.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2348.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2349.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2350.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2351.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2352.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2353.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2354.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2355.    echo "   <icon>kedit</icon>" >> /home/$user/.config/Thunar/uca.xml
  2356.    echo "   <name>Datei mit gedit öffnen (root)</name>" >> /home/$user/.config/Thunar/uca.xml
  2357.    echo "   <unique-id>1454901414838728-4</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2358.    echo "   <command>gksudo gedit %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2359.    echo "   <description>Datei mit gedit öffnen (root)</description>" >> /home/$user/.config/Thunar/uca.xml
  2360.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2361.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2362.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2363.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2364.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2365.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2366.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2367.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2368.    echo "   <icon>file-roller</icon>" >> /home/$user/.config/Thunar/uca.xml
  2369.    echo "   <name>Ordner tar.xz komprimieren</name>" >> /home/$user/.config/Thunar/uca.xml
  2370.    echo "   <unique-id>1456502230601632-3</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2371.    echo "   <command>tar -cJf %n.tar.xz %n/*</command>" >> /home/$user/.config/Thunar/uca.xml
  2372.    echo "   <description>Aktuelles Verzeichnis tar.xz komprimieren</description>" >> /home/$user/.config/Thunar/uca.xml
  2373.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2374.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2375.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2376.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2377.    echo "   <icon>drive-removable-media-usb-symbolic-1</icon>" >> /home/$user/.config/Thunar/uca.xml
  2378.    echo "   <name>Dateisystem synchronisieren</name>" >> /home/$user/.config/Thunar/uca.xml
  2379.    echo "   <unique-id>1457388060570753-4</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2380.    echo "   <command>sync</command>" >> /home/$user/.config/Thunar/uca.xml
  2381.    echo "   <description>Dateisystemcache auf Laufwerk(e) schreiben</description>" >> /home/$user/.config/Thunar/uca.xml
  2382.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2383.    echo "   <startup-notify/>" >> /home/$user/.config/Thunar/uca.xml
  2384.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2385.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2386.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2387.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2388.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2389.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2390.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2391.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2392.    echo "   <icon>edit-find</icon>" >> /home/$user/.config/Thunar/uca.xml
  2393.    echo "   <name>Searchmonkey</name>" >> /home/$user/.config/Thunar/uca.xml
  2394.    echo "   <unique-id>1457393005240280-6</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2395.    echo "   <command>/home/$user/.hackware/xfce/searchmonkey.sh %F</command>" >> /home/$user/.config/Thunar/uca.xml
  2396.    echo "   <description>Searchmonkey im ausgewählten Verzeichnis starten</description>" >> /home/$user/.config/Thunar/uca.xml
  2397.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2398.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2399.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2400.    echo "</actions>" >> /home/$user/.config/Thunar/uca.xml
  2401.  fi
  2402.  if [ "$german_language" == "no" ]
  2403.  then
  2404.    echo '<?xml encoding="UTF-8" version="1.0"?>' > /root/.config/Thunar/uca.xml
  2405.    echo "<actions>" >> /root/.config/Thunar/uca.xml
  2406.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2407.    echo "   <icon>utilities-terminal</icon>" >> /root/.config/Thunar/uca.xml
  2408.    echo "   <name>Open terminal here</name>" >> /root/.config/Thunar/uca.xml
  2409.    echo "   <unique-id>1454696335442808-1</unique-id>" >> /root/.config/Thunar/uca.xml
  2410.    echo "   <command>exo-open --working-directory %f --launch TerminalEmulator</command>" >> /root/.config/Thunar/uca.xml
  2411.    echo "   <description>Opens Terminal in current directory</description>" >> /root/.config/Thunar/uca.xml
  2412.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2413.    echo "   <startup-notify/>" >> /root/.config/Thunar/uca.xml
  2414.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2415.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2416.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2417.    echo "   <icon>brasero</icon>" >> /root/.config/Thunar/uca.xml
  2418.    echo "   <name>Mount .iso file</name>" >> /root/.config/Thunar/uca.xml
  2419.    echo "   <unique-id>1454901441765736-5</unique-id>" >> /root/.config/Thunar/uca.xml
  2420.    echo "   <command>/root/.hackware/xfce/mount-iso.sh %f</command>" >> /root/.config/Thunar/uca.xml
  2421.    echo "   <description>Mount .iso file</description>" >> /root/.config/Thunar/uca.xml
  2422.    echo "   <patterns>*.iso</patterns>" >> /root/.config/Thunar/uca.xml
  2423.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2424.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2425.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2426.    echo "   <icon>Thunar</icon>" >> /root/.config/Thunar/uca.xml
  2427.    echo "   <name>Open directory with Thunar(root)</name>" >> /root/.config/Thunar/uca.xml
  2428.    echo "   <unique-id>1454901493360117-7</unique-id>" >> /root/.config/Thunar/uca.xml
  2429.    echo "   <command>gksudo Thunar %f</command>" >> /root/.config/Thunar/uca.xml
  2430.    echo "   <description>Opens current directory with Thunar (root)</description>" >> /root/.config/Thunar/uca.xml
  2431.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2432.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2433.    echo "   <audio-files/>" >> /root/.config/Thunar/uca.xml
  2434.    echo "   <image-files/>" >> /root/.config/Thunar/uca.xml
  2435.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2436.    echo "   <text-files/>" >> /root/.config/Thunar/uca.xml
  2437.    echo "   <video-files/>" >> /root/.config/Thunar/uca.xml
  2438.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2439.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2440.    echo "   <icon>kedit</icon>" >> /root/.config/Thunar/uca.xml
  2441.    echo "   <name>Open file with gedit (root)</name>" >> /root/.config/Thunar/uca.xml
  2442.    echo "   <unique-id>1454901414838728-4</unique-id>" >> /root/.config/Thunar/uca.xml
  2443.    echo "   <command>gksudo gedit %f</command>" >> /root/.config/Thunar/uca.xml
  2444.    echo "   <description>Opens file with gedit (root)</description>" >> /root/.config/Thunar/uca.xml
  2445.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2446.    echo "   <audio-files/>" >> /root/.config/Thunar/uca.xml
  2447.    echo "   <image-files/>" >> /root/.config/Thunar/uca.xml
  2448.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2449.    echo "   <text-files/>" >> /root/.config/Thunar/uca.xml
  2450.    echo "   <video-files/>" >> /root/.config/Thunar/uca.xml
  2451.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2452.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2453.    echo "   <icon>file-roller</icon>" >> /root/.config/Thunar/uca.xml
  2454.    echo "   <name>tar.xz compress directory</name>" >> /root/.config/Thunar/uca.xml
  2455.    echo "   <unique-id>1456502230601632-3</unique-id>" >> /root/.config/Thunar/uca.xml
  2456.    echo "   <command>tar -cJf %n.tar.xz %n/*</command>" >> /root/.config/Thunar/uca.xml
  2457.    echo "   <description>tar.xz compresses current directory</description>" >> /root/.config/Thunar/uca.xml
  2458.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2459.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2460.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2461.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2462.    echo "   <icon>drive-removable-media-usb-symbolic-1</icon>" >> /root/.config/Thunar/uca.xml
  2463.    echo "   <name>Synchronize filesystem</name>" >> /root/.config/Thunar/uca.xml
  2464.    echo "   <unique-id>1457388060570753-4</unique-id>" >> /root/.config/Thunar/uca.xml
  2465.    echo "   <command>sync</command>" >> /root/.config/Thunar/uca.xml
  2466.    echo "   <description>Write filesystem cache to disk(s)</description>" >> /root/.config/Thunar/uca.xml
  2467.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2468.    echo "   <startup-notify/>" >> /root/.config/Thunar/uca.xml
  2469.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2470.    echo "   <audio-files/>" >> /root/.config/Thunar/uca.xml
  2471.    echo "   <image-files/>" >> /root/.config/Thunar/uca.xml
  2472.    echo "   <other-files/>" >> /root/.config/Thunar/uca.xml
  2473.    echo "   <text-files/>" >> /root/.config/Thunar/uca.xml
  2474.    echo "   <video-files/>" >> /root/.config/Thunar/uca.xml
  2475.    echo "</action>" >> /root/.config/Thunar/uca.xml  
  2476.    echo "<action>" >> /root/.config/Thunar/uca.xml
  2477.    echo "   <icon>edit-find</icon>" >> /root/.config/Thunar/uca.xml
  2478.    echo "   <name>Searchmonkey</name>" >> /root/.config/Thunar/uca.xml
  2479.    echo "   <unique-id>1457393005240280-6</unique-id>" >> /root/.config/Thunar/uca.xml
  2480.    echo "   <command>/root/.hackware/xfce/searchmonkey.sh %F</command>" >> /root/.config/Thunar/uca.xml
  2481.    echo "   <description>Open Searchmonkey in current directory</description>" >> /root/.config/Thunar/uca.xml
  2482.    echo "   <patterns>*</patterns>" >> /root/.config/Thunar/uca.xml
  2483.    echo "   <directories/>" >> /root/.config/Thunar/uca.xml
  2484.    echo "</action>" >> /root/.config/Thunar/uca.xml
  2485.    echo "</actions>" >> /root/.config/Thunar/uca.xml
  2486.    #
  2487.    mkdir -p /home/$user/.config/Thunar > /dev/null 2>&1
  2488.    echo '<?xml encoding="UTF-8" version="1.0"?>' > /home/$user/.config/Thunar/uca.xml
  2489.    echo "<actions>" >> /home/$user/.config/Thunar/uca.xml
  2490.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2491.    echo "   <icon>utilities-terminal</icon>" >> /home/$user/.config/Thunar/uca.xml
  2492.    echo "   <name>Open terminal here</name>" >> /home/$user/.config/Thunar/uca.xml
  2493.    echo "   <unique-id>1454696335442808-1</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2494.    echo "   <command>exo-open --working-directory %f --launch TerminalEmulator</command>" >> /home/$user/.config/Thunar/uca.xml
  2495.    echo "   <description>Opens Terminal in current directory</description>" >> /home/$user/.config/Thunar/uca.xml
  2496.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2497.    echo "   <startup-notify/>" >> /home/$user/.config/Thunar/uca.xml
  2498.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2499.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2500.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2501.    echo "   <icon>brasero</icon>" >> /home/$user/.config/Thunar/uca.xml
  2502.    echo "   <name>Mount .iso file</name>" >> /home/$user/.config/Thunar/uca.xml
  2503.    echo "   <unique-id>1454901441765736-5</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2504.    echo "   <command>gksudo /home/$user/.hackware/xfce/mount-iso.sh %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2505.    echo "   <description>Mount .iso file</description>" >> /home/$user/.config/Thunar/uca.xml
  2506.    echo "   <patterns>*.iso</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2507.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2508.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2509.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2510.    echo "   <icon>Thunar</icon>" >> /home/$user/.config/Thunar/uca.xml
  2511.    echo "   <name>Open directory with Thunar(root)</name>" >> /home/$user/.config/Thunar/uca.xml
  2512.    echo "   <unique-id>1454901493360117-7</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2513.    echo "   <command>gksudo Thunar %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2514.    echo "   <description>Opens current directory with Thunar(root)</description>" >> /home/$user/.config/Thunar/uca.xml
  2515.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2516.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2517.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2518.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2519.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2520.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2521.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2522.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2523.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2524.    echo "   <icon>kedit</icon>" >> /home/$user/.config/Thunar/uca.xml
  2525.    echo "   <name>Open file with gedit (root)</name>" >> /home/$user/.config/Thunar/uca.xml
  2526.    echo "   <unique-id>1454901414838728-4</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2527.    echo "   <command>gksudo gedit %f</command>" >> /home/$user/.config/Thunar/uca.xml
  2528.    echo "   <description>Opens file with gedit (root)</description>" >> /home/$user/.config/Thunar/uca.xml
  2529.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2530.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2531.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2532.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2533.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2534.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2535.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2536.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2537.    echo "   <icon>file-roller</icon>" >> /home/$user/.config/Thunar/uca.xml
  2538.    echo "   <name>tar.xz compress directory</name>" >> /home/$user/.config/Thunar/uca.xml
  2539.    echo "   <unique-id>1456502230601632-3</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2540.    echo "   <command>tar -cJf %n.tar.xz %n/*</command>" >> /home/$user/.config/Thunar/uca.xml
  2541.    echo "   <description>tar.xz compresses current directory</description>" >> /home/$user/.config/Thunar/uca.xml
  2542.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2543.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2544.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2545.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2546.    echo "   <icon>drive-removable-media-usb-symbolic-1</icon>" >> /home/$user/.config/Thunar/uca.xml
  2547.    echo "   <name>Synchronize filesystem</name>" >> /home/$user/.config/Thunar/uca.xml
  2548.    echo "   <unique-id>1457388060570753-4</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2549.    echo "   <command>sync</command>" >> /home/$user/.config/Thunar/uca.xml
  2550.    echo "   <description>Write filesystem cache to disk(s)</description>" >> /home/$user/.config/Thunar/uca.xml
  2551.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2552.    echo "   <startup-notify/>" >> /home/$user/.config/Thunar/uca.xml
  2553.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2554.    echo "   <audio-files/>" >> /home/$user/.config/Thunar/uca.xml
  2555.    echo "   <image-files/>" >> /home/$user/.config/Thunar/uca.xml
  2556.    echo "   <other-files/>" >> /home/$user/.config/Thunar/uca.xml
  2557.    echo "   <text-files/>" >> /home/$user/.config/Thunar/uca.xml
  2558.    echo "   <video-files/>" >> /home/$user/.config/Thunar/uca.xml
  2559.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml  
  2560.    echo "<action>" >> /home/$user/.config/Thunar/uca.xml
  2561.    echo "   <icon>edit-find</icon>" >> /home/$user/.config/Thunar/uca.xml
  2562.    echo "   <name>Searchmonkey</name>" >> /home/$user/.config/Thunar/uca.xml
  2563.    echo "   <unique-id>1457393005240280-6</unique-id>" >> /home/$user/.config/Thunar/uca.xml
  2564.    echo "   <command>/home/$user/.hackware/xfce/searchmonkey.sh %F</command>" >> /home/$user/.config/Thunar/uca.xml
  2565.    echo "   <description>Open Searchmonkey in current directory</description>" >> /home/$user/.config/Thunar/uca.xml
  2566.    echo "   <patterns>*</patterns>" >> /home/$user/.config/Thunar/uca.xml
  2567.    echo "   <directories/>" >> /home/$user/.config/Thunar/uca.xml
  2568.    echo "</action>" >> /home/$user/.config/Thunar/uca.xml
  2569.    echo "</actions>" >> /home/$user/.config/Thunar/uca.xml
  2570.  fi
  2571.  
  2572.  
  2573.  #menu fix
  2574.  if [ "$german_language" == "yes" ]
  2575.  then
  2576.  sed -i s:'Name=Print Settings':'Name=Drucker-Einstellungen':g /usr/share/applications/system-config-printer.desktop > /dev/null 2>&1
  2577.  sed -i s:'Name=Privilege granting':'Name=Benutzerrechte gewähren':g /usr/share/applications/gksu-properties.desktop > /dev/null 2>&1
  2578.  sed -i s:'Name=Qt4 Config':'Name=Qt4 Konfiguration':g /usr/share/applications/qtconfig.desktop > /dev/null 2>&1
  2579.  sed -i s:'Name=P7ZIP File Manager':'Name=P7ZIP Dateimanager':g /usr/share/applications/p7zip.desktop > /dev/null 2>&1
  2580.  fi
  2581.  sed -i s:'Exec=htop':'Exec=lxterminal -e htop':g /usr/share/applications/htop.desktop > /dev/null 2>&1
  2582.  sed -i s:'Terminal=true':'Terminal=false':g /usr/share/applications/htop.desktop > /dev/null 2>&1
  2583.  #
  2584.  echo "gtk-menu-popup-delay = 0" > /root/.gtkrc-2.0
  2585.  echo "gtk-menu-popdown-delay = 0" >> /root/.gtkrc-2.0
  2586.  echo "gtk-menu-bar-popup-delay = 0" >> /root/.gtkrc-2.0
  2587.  echo "gtk-enable-animations = 0" >> /root/.gtkrc-2.0
  2588.  echo "gtk-timeout-expand = 0" >> /root/.gtkrc-2.0
  2589.  echo "gtk-recent-files-enabled = 0" >> /root/.gtkrc-2.0
  2590.  echo "gtk-timeout-initial = 0" >> /root/.gtkrc-2.0
  2591.  #
  2592.  sync > /dev/null 2>&1
  2593.  cp /root/.gtkrc-2.0 /home/$user/ > /dev/null 2>&1
  2594.  #
  2595.  
  2596.  #
  2597.  #
  2598.  #mime
  2599.  #
  2600.  #copy xfce4 config to new user home
  2601.  mkdir -p /home/$user/.config/xfce4 > /dev/null 2>&1
  2602.  #check dir
  2603.  sync > /dev/null 2>&1
  2604.  #
  2605.  # maybe activate
  2606.  #
  2607.  #cp -raf /root/.config/xfce4/* /home/$user/.config/xfce4/
  2608.  #
  2609.  touch /root/.Xauthority > /dev/null 2>&1
  2610.  touch /home/$user/.Xauthority > /dev/null 2>&1
  2611.  rm -Rv /home/$user/.config/xfce4/ > /dev/null 2>&1
  2612.  sync > /dev/null 2>&1
  2613.  cp -av /root/.config/xfce4/ /home/$user/.config/xfce4/ > /dev/null 2>&1
  2614.  sync > /dev/null 2>&1
  2615.  chown -R $user:$user /home/$user/.config/xfce4/ > /dev/null 2>&1
  2616.  sync > /dev/null 2>&1
  2617. ##
  2618. ##
  2619.  
  2620.  chown -R $user:$user /home/$user > /dev/null 2>&1
  2621.  sync > /dev/null 2>&1
  2622.  chmod -R g+w /home/$user > /dev/null 2>&1
  2623.  chmod -R g+w /root > /dev/null 2>&1
  2624.  
  2625.  sync > /dev/null 2>&1
  2626.  
  2627. if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  2628. then
  2629.   killall xfdesktop > /dev/null 2>&1
  2630. fi
  2631. #
  2632. rm /usr/share/applications/jconsole-1.8.0.desktop > /dev/null 2>&1
  2633. rm /usr/share/applications/jconsole.desktop > /dev/null 2>&1
  2634. rm /usr/share/applications/policytool.desktop > /dev/null 2>&1
  2635. rm /usr/share/applications/policytool-1.8.0.desktop > /dev/null 2>&1
  2636.  #
  2637. }
  2638.  
  2639. function setup_mate()
  2640. {
  2641. cd data/pool/misc/msb-14.2-mate-1.14-15082016/packages
  2642. sh install.sh > /dev/null 2>&1
  2643. cd -
  2644.  
  2645. echo "#!/bin/sh" > /root/.xinitrc
  2646. echo "userresources=/root/.Xresources" >> /root/.xinitrc
  2647. echo "usermodmap=/root/.Xmodmap" >> /root/.xinitrc
  2648. echo "sysresources=/etc/X11/xinit/.Xresources" >> /root/.xinitrc
  2649. echo "sysmodmap=/etc/X11/xinit/.Xmodmap" >> /root/.xinitrc
  2650. echo "" >> /root/.xinitrc
  2651. echo "# merge in defaults and keymaps" >> /root/.xinitrc
  2652. echo "" >> /root/.xinitrc
  2653. echo "[ -f \$sysresources ] && xrdb -merge \$sysresources" >> /root/.xinitrc
  2654. echo "[ -f \$sysmodmap ] && xmodmap \$sysmodmap" >> /root/.xinitrc
  2655. echo "[ -f \$userresources ] && xrdb -merge \$userresources" >> /root/.xinitrc
  2656. echo "[ -f \$usermodmap ] && xmodmap \$usermodmap" >> /root/.xinitrc
  2657. echo "" >> /root/.xinitrc
  2658. echo "if [ -z \"\$DESKTOP_SESSION\" -a -x /usr/bin/ck-launch-session ]; then" >> /root/.xinitrc
  2659. echo "  export DESKTOP_SESSION=\"mate\"" >> /root/.xinitrc
  2660. echo "  exec ck-launch-session dbus-launch --exit-with-session mate-session" >> /root/.xinitrc
  2661. echo "else" >> /root/.xinitrc
  2662. echo "  export DESKTOP_SESSION=\"mate\"" >> /root/.xinitrc
  2663. echo "  exec mate-session" >> /root/.xinitrc
  2664. echo "fi" >> /root/.xinitrc
  2665. chmod +x /root/.xinitrc
  2666.  
  2667. echo "#!/bin/sh" > /home/$user/.xinitrc
  2668. echo "userresources=/home/$user/.Xresources" >> /home/$user/.xinitrc
  2669. echo "usermodmap=/home/$user/.Xmodmap" >> /home/$user/.xinitrc
  2670. echo "sysresources=/etc/X11/xinit/.Xresources" >> /home/$user/.xinitrc
  2671. echo "sysmodmap=/etc/X11/xinit/.Xmodmap" >> /home/$user/.xinitrc
  2672. echo "" >> /home/$user/.xinitrc
  2673. echo "# merge in defaults and keymaps" >> /home/$user/.xinitrc
  2674. echo "" >> /home/$user/.xinitrc
  2675. echo "[ -f \$sysresources ] && xrdb -merge \$sysresources" >> /home/$user/.xinitrc
  2676. echo "[ -f \$sysmodmap ] && xmodmap \$sysmodmap" >> /home/$user/.xinitrc
  2677. echo "[ -f \$userresources ] && xrdb -merge \$userresources" >> /home/$user/.xinitrc
  2678. echo "[ -f \$usermodmap ] && xmodmap \$usermodmap" >> /home/$user/.xinitrc
  2679. echo "" >> /home/$user/.xinitrc
  2680. echo "if [ -z \"\$DESKTOP_SESSION\" -a -x /usr/bin/ck-launch-session ]; then" >> /home/$user/.xinitrc
  2681. echo "  export DESKTOP_SESSION=\"mate\"" >> /home/$user/.xinitrc
  2682. echo "  exec ck-launch-session dbus-launch --exit-with-session mate-session" >> /home/$user/.xinitrc
  2683. echo "else" >> /home/$user/.xinitrc
  2684. echo "  export DESKTOP_SESSION=\"mate\"" >> /home/$user/.xinitrc
  2685. echo "  exec mate-session" >> /home/$user/.xinitrc
  2686. echo "fi" >> /home/$user/.xinitrc
  2687. chmod +x /home/$user/.xinitrc
  2688.  
  2689. echo "#!/bin/sh" > /root/.xsession
  2690. echo "" >> /root/.xsession
  2691. echo "userresources=/root/.Xresources" >> /root/.xsession
  2692. echo "usermodmap=/root/.Xmodmap" >> /root/.xsession
  2693. echo "sysresources=/etc/X11/xinit/.Xresources" >> /root/.xsession
  2694. echo "sysmodmap=/etc/X11/xinit/.Xmodmap" >> /root/.xsession
  2695. echo "" >> /root/.xsession
  2696. echo "# merge in defaults and keymaps" >> /root/.xsession
  2697. echo "" >> /root/.xsession
  2698. echo "[ -f \$sysresources ] && xrdb -merge \$sysresources" >> /root/.xsession
  2699. echo "[ -f \$sysmodmap ] && xmodmap \$sysmodmap" >> /root/.xsession
  2700. echo "[ -f \$userresources ] && xrdb -merge \$userresources" >> /root/.xsession
  2701. echo "[ -f \$usermodmap ] && xmodmap \$usermodmap" >> /root/.xsession
  2702. echo "" >> /root/.xsession
  2703. echo "if [ -z \"\$DESKTOP_SESSION\" -a -x /usr/bin/ck-launch-session ]; then" >> /root/.xsession
  2704. echo "  export DESKTOP_SESSION=\"mate\"" >> /root/.xsession
  2705. echo "  exec ck-launch-session dbus-launch --exit-with-session mate-session" >> /root/.xsession
  2706. echo "else" >> /root/.xsession
  2707. echo "  export DESKTOP_SESSION=\"mate\"" >> /root/.xsession
  2708. echo "  exec mate-session" >> /root/.xsession
  2709. echo "fi" >> /root/.xsession
  2710. chmod +x /root/.xsession
  2711.  
  2712. echo "#!/bin/sh" > /home/$user/.xsession
  2713. echo "" >> /home/$user/.xsession
  2714. echo "userresources=/home/$user/.Xresources" >> /home/$user/.xsession
  2715. echo "usermodmap=/home/$user/.Xmodmap" >> /home/$user/.xsession
  2716. echo "sysresources=/etc/X11/xinit/.Xresources" >> /home/$user/.xsession
  2717. echo "sysmodmap=/etc/X11/xinit/.Xmodmap" >> /home/$user/.xsession
  2718. echo "" >> /home/$user/.xsession
  2719. echo "# merge in defaults and keymaps" >> /home/$user/.xsession
  2720. echo "" >> /home/$user/.xsession
  2721. echo "[ -f \$sysresources ] && xrdb -merge \$sysresources" >> /home/$user/.xsession
  2722. echo "[ -f \$sysmodmap ] && xmodmap \$sysmodmap" >> /home/$user/.xsession
  2723. echo "[ -f \$userresources ] && xrdb -merge \$userresources" >> /home/$user/.xsession
  2724. echo "[ -f \$usermodmap ] && xmodmap \$usermodmap" >> /home/$user/.xsession
  2725. echo "" >> /home/$user/.xsession
  2726. echo "if [ -z \"\$DESKTOP_SESSION\" -a -x /usr/bin/ck-launch-session ]; then" >> /home/$user/.xsession
  2727. echo "  export DESKTOP_SESSION=\"mate\"" >> /home/$user/.xsession
  2728. echo "  exec ck-launch-session dbus-launch --exit-with-session mate-session" >> /home/$user/.xsession
  2729. echo "else" >> /home/$user/.xsession
  2730. echo "  export DESKTOP_SESSION=\"mate\"" >> /home/$user/.xsession
  2731. echo "  exec mate-session" >> /home/$user/.xsession
  2732. echo "fi" >> /home/$user/.xsession
  2733. chmod +x /home/$user/.xsession
  2734.  
  2735. if [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  2736. then
  2737.  gsettings set org.mate.interface gtk-theme 'Arc'
  2738.  gsettings set org.mate.Marco.general theme 'Vertex-Light'
  2739.  gsettings set org.mate.interface icon-theme 'hackware'
  2740.  gsettings set org.mate.peripherals-mouse cursor-theme 'default'
  2741.  gsettings set org.mate.background picture-filename '/usr/share/backgrounds/hackware.jpg'
  2742.  
  2743.  gsettings set org.mate.interface document-font-name 'Open Sans 11'
  2744.  gsettings set org.mate.interface font-name 'Open Sans 11'
  2745.  gsettings set org.mate.interface monospace-font-name 'Monospace 11'
  2746.  gsettings set org.mate.stickynotes default-font 'Open Sans 11'
  2747.  gsettings set org.mate.Marco.general titlebar-font 'Open Sans Bold 11'
  2748.  gsettings set org.mate.caja.desktop font 'Open Sans 11'
  2749.  
  2750.  gsettings set org.mate.font-rendering dpi 82.0
  2751.  gsettings set org.mate.font-rendering antialiasing 'grayscale'
  2752.  gsettings set org.mate.font-rendering hinting 'slight'  
  2753.  
  2754.  gsettings set org.mate.caja.preferences show-hidden-files true
  2755.  gsettings set org.mate.caja.preferences show-image-thumbnails 'never'
  2756.  gsettings set org.mate.caja.window-state maximized true
  2757.  gsettings set org.mate.panel enable-animations false  
  2758.  
  2759.  gsettings set org.mate.thumbnailers disable-all true
  2760.  gsettings set org.mate.panel enable-autocompletion false
  2761.  gsettings set org.mate.panel enable-program-list false
  2762.  
  2763.  gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/lxterminal
  2764.  gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"
  2765.  
  2766.  #org.gnome.desktop.interface :: cursor-theme :: type s  :: 'Adwaita'  :: ''
  2767.  #org.gnome.desktop.interface :: document-font-name :: type s  :: 'Sans 11'  :: 'Sans 11'
  2768.  #org.gnome.desktop.interface :: enable-animations :: type b  :: true  :: true
  2769.  #org.gnome.desktop.interface :: font-name :: type s  :: 'Cantarell 11'  :: 'Cantarell 11'
  2770.  #org.gnome.desktop.interface :: gtk-theme :: type s  :: 'Adwaita'  :: 'Adwaita'
  2771.  #org.gnome.desktop.interface :: icon-theme :: type s  :: 'Adwaita'  :: 'Adwaita'
  2772.  #org.gnome.desktop.interface :: monospace-font-name :: type s  :: 'Monospace 11'  :: 'Monospace 11'
  2773.  
  2774.  #org.gnome.desktop.background :: picture-uri :: type s  :: 'file:///usr/share/backgrounds/gnome/adwaita-timed.xml'  :: 'file:///usr/share/backgrounds/gnome/adwaita-timed.xml'
  2775.  #org.gnome.desktop.background :: picture-options :: enum 'none' 'wallpaper' 'centered' 'scaled' 'stretched' 'zoom' 'spanned'  :: 'zoom'  :: 'zoom'
  2776.  
  2777.  #org.gnome.desktop.thumbnailers :: disable-all :: type b  :: false  :: false
  2778.  
  2779. fi
  2780.  
  2781. if ! [ "$(pidof X)" ] || [ "$(pidof Xorg)" ]
  2782. then
  2783.  dbus-launch gsettings set org.mate.interface gtk-theme 'Arc'
  2784.  dbus-launch gsettings set org.mate.Marco.general theme 'Vertex-Light'
  2785.  dbus-launch gsettings set org.mate.interface icon-theme 'hackware'
  2786.  dbus-launch gsettings set org.mate.peripherals-mouse cursor-theme 'default'
  2787.  dbus-launch gsettings set org.mate.background picture-filename '/usr/share/backgrounds/hackware.jpg'
  2788.  
  2789.  dbus-launch gsettings set org.mate.interface document-font-name 'Open Sans 11'
  2790.  dbus-launch gsettings set org.mate.interface font-name 'Open Sans 11'
  2791.  dbus-launch gsettings set org.mate.interface monospace-font-name 'Monospace 11'
  2792.  dbus-launch gsettings set org.mate.stickynotes default-font 'Open Sans 11'
  2793.  dbus-launch gsettings set org.mate.Marco.general titlebar-font 'Open Sans Bold 11'
  2794.  dbus-launch gsettings set org.mate.caja.desktop font 'Open Sans 11'
  2795.  
  2796.  dbus-launch gsettings set org.mate.font-rendering dpi 82.0
  2797.  dbus-launch gsettings set org.mate.font-rendering antialiasing 'grayscale'
  2798.  dbus-launch gsettings set org.mate.font-rendering hinting 'slight'  
  2799.  
  2800.  dbus-launch gsettings set org.mate.caja.preferences show-hidden-files true
  2801.  dbus-launch gsettings set org.mate.caja.preferences show-image-thumbnails 'never'
  2802.  dbus-launch gsettings set org.mate.caja.window-state maximized true
  2803.  dbus-launch gsettings set org.mate.panel enable-animations false  
  2804.  
  2805.  dbus-launch gsettings set org.mate.thumbnailers disable-all true
  2806.  dbus-launch gsettings set org.mate.panel enable-autocompletion false
  2807.  dbus-launch gsettings set org.mate.panel enable-program-list false
  2808.  
  2809.  dbus-launch gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/lxterminal
  2810.  dbus-launch gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"
  2811.  
  2812.  
  2813.  #org.gnome.desktop.interface :: cursor-theme :: type s  :: 'Adwaita'  :: ''
  2814.  #org.gnome.desktop.interface :: document-font-name :: type s  :: 'Sans 11'  :: 'Sans 11'
  2815.  #org.gnome.desktop.interface :: enable-animations :: type b  :: true  :: true
  2816.  #org.gnome.desktop.interface :: font-name :: type s  :: 'Cantarell 11'  :: 'Cantarell 11'
  2817.  #org.gnome.desktop.interface :: gtk-theme :: type s  :: 'Adwaita'  :: 'Adwaita'
  2818.  #org.gnome.desktop.interface :: icon-theme :: type s  :: 'Adwaita'  :: 'Adwaita'
  2819.  #org.gnome.desktop.interface :: monospace-font-name :: type s  :: 'Monospace 11'  :: 'Monospace 11'
  2820.  
  2821.  #org.gnome.desktop.background :: picture-uri :: type s  :: 'file:///usr/share/backgrounds/gnome/adwaita-timed.xml'  :: 'file:///usr/share/backgrounds/gnome/adwaita-timed.xml'
  2822.  #org.gnome.desktop.background :: picture-options :: enum 'none' 'wallpaper' 'centered' 'scaled' 'stretched' 'zoom' 'spanned'  :: 'zoom'  :: 'zoom'
  2823.  
  2824.  #org.gnome.desktop.thumbnailers :: disable-all :: type b  :: false  :: false
  2825.  
  2826. fi
  2827.  
  2828. rm -rf /usr/share/applnk/.hidden > /dev/null 2>&1
  2829. rm /usr/share/applnk/.hidden/kommander.desktop > /dev/null 2>&1
  2830.  
  2831. dconf write /org/mate/desktop/media-handling/automount-open false > /dev/null 2>&1
  2832. xdg-mime default Thunar-folder-handler.desktop inode/directory application > /dev/null 2>&1
  2833.  
  2834. ###//user
  2835. ###echo "[Qt]" >> /root/.config/Trolltech.conf
  2836. ###echo "style=GTK+" >> /root/.config/Trolltech.conf
  2837.  
  2838. ###//startup programs
  2839. ###///+user
  2840.  
  2841. ###mkdir -p /root/.config/autostart
  2842.  
  2843. ###cp -raf /etc/xdg/autostart/blueman.desktop /root/.config/autostart/
  2844. ###echo "X-MATE-Autostart-enabled=false" >> /root/.config/autostart/blueman.desktop
  2845.  
  2846. ###cp -raf /etc/xdg/autostart/gnome-keyring-pkcs11.desktop /root/.config/autostart/
  2847. ###echo "X-MATE-Autostart-enabled=false" >> /root/.config/autostart/gnome-keyring-pkcs11.desktop
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880. }
  2881.  
  2882.  
  2883.  
  2884. function setup_nvidia()
  2885. {
  2886.  null
  2887.  # kernel version(s)?
  2888.  # $install_nvidia "304.131" "340.96" "352.79" "none"
  2889. }
  2890.  
  2891. function setup_recently-used()
  2892. {
  2893.  #
  2894.  sed -i s:"StartUpMode=recent":"StartUpMode=cwd":g /root/.config/gtk-2.0/gtkfilechooser.ini  > /dev/null 2>&1
  2895.  #
  2896.  if  [ -f "/root/.local/share/recently-used.xbel" ];
  2897.  then
  2898.     chattr -i "/root/.local/share/recently-used.xbel" > /dev/null 2>&1
  2899.     rm -f "/root/.local/share/recently-used.xbel" > /dev/null 2>&1
  2900.  fi
  2901.  touch "/root/.local/share/recently-used.xbel" > /dev/null 2>&1
  2902.  chattr +i "/root/.local/share/recently-used.xbel" > /dev/null 2>&1
  2903.  #
  2904.  mkdir -p /home/$user/.local/share/
  2905.  #
  2906.  if  [ -f "/home/$user/.local/share/recently-used.xbel" ];
  2907.  then
  2908.     chattr -i "/home/$user/.local/share/recently-used.xbel" > /dev/null 2>&1
  2909.     rm -f "/home/$user/.local/share/recently-used.xbel" > /dev/null 2>&1
  2910.  fi
  2911.  touch "/home/$user/.local/share/recently-used.xbel" > /dev/null 2>&1
  2912.  chattr +i "/home/$user/.local/share/recently-used.xbel" > /dev/null 2>&1
  2913. }
  2914.  
  2915. function null()
  2916. {
  2917.  mkdir -p /tmp/null > /dev/null 2>&1
  2918.  rm -rf /tmp/null > /dev/null 2>&1
  2919. }
  2920.  
  2921. function setup_profiles()
  2922. {
  2923.  #
  2924.  null
  2925.  echo '# /etc/profile: This file contains system-wide defaults used by' > /etc/profile
  2926.  echo '# all Bourne (and related) shells.' >> /etc/profile
  2927.  echo '' >> /etc/profile
  2928.  echo '# Set the values for some environment variables:' >> /etc/profile
  2929.  echo 'export MINICOM="-c on"' >> /etc/profile
  2930.  echo 'export MANPATH=/usr/local/man:/usr/man' >> /etc/profile
  2931.  echo 'export HOSTNAME="`cat /etc/HOSTNAME`"' >> /etc/profile
  2932.  echo 'export LESSOPEN="|lesspipe.sh %s"' >> /etc/profile
  2933.  echo 'export LESS="-M"' >> /etc/profile
  2934.  echo '' >> /etc/profile
  2935.  echo "# If the user doesn't have a .inputrc, use the one in /etc." >> /etc/profile
  2936.  echo 'if [ ! -r "\$HOME/.inputrc" ]; then' >> /etc/profile
  2937.  echo '  export INPUTRC=/etc/inputrc' >> /etc/profile
  2938.  echo 'fi' >> /etc/profile
  2939.  echo '' >> /etc/profile
  2940.  echo '# Set the default system $PATH:' >> /etc/profile
  2941.  echo 'PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"' >> /etc/profile
  2942.  echo '' >> /etc/profile
  2943.  echo '# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in' >> /etc/profile
  2944.  echo "# the \$PATH.  Some means of connection don't add these by default (sshd comes" >> /etc/profile
  2945.  echo '# to mind).' >> /etc/profile
  2946.  echo 'if [ "`id -u`" = "0" ]; then' >> /etc/profile
  2947.  echo '  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null' >> /etc/profile
  2948.  echo '  if [ ! $? = 0 ]; then' >> /etc/profile
  2949.  echo '    PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH' >> /etc/profile
  2950.  echo '  fi' >> /etc/profile
  2951.  echo 'fi' >> /etc/profile
  2952.  echo '' >> /etc/profile
  2953.  echo "# I had problems with the backspace key using 'eval tset' instead of 'TERM='," >> /etc/profile
  2954.  echo '# but you might want to try it anyway instead of the section below it.  I' >> /etc/profile
  2955.  echo '# think with the right /etc/termcap it would work.' >> /etc/profile
  2956.  echo '# eval `tset -sQ "$TERM"`' >> /etc/profile
  2957.  echo '' >> /etc/profile
  2958.  echo '# Set TERM to linux for unknown type or unset variable:' >> /etc/profile
  2959.  echo 'if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then' >> /etc/profile
  2960.  echo ' TERM=linux' >> /etc/profile
  2961.  echo 'fi' >> /etc/profile
  2962.  echo '' >> /etc/profile
  2963.  echo '# Set ksh93 visual editing mode:' >> /etc/profile
  2964.  echo 'if [ "$SHELL" = "/bin/ksh" ]; then' >> /etc/profile
  2965.  echo '  VISUAL=emacs' >> /etc/profile
  2966.  echo '#  VISUAL=gmacs' >> /etc/profile
  2967.  echo '#  VISUAL=vi' >> /etc/profile
  2968.  echo 'fi' >> /etc/profile
  2969.  echo '' >> /etc/profile
  2970.  echo '# Set a default shell prompt:' >> /etc/profile
  2971.  echo "#PS1='\`hostname\`:\`pwd\`# '" >> /etc/profile
  2972.  echo 'if [ "$SHELL" = "/bin/pdksh" ]; then' >> /etc/profile
  2973.  echo " PS1='! $ '" >> /etc/profile
  2974.  echo 'elif [ "$SHELL" = "/bin/ksh" ]; then' >> /etc/profile
  2975.  echo " PS1='! \${PWD/#\$HOME/~}$ '" >> /etc/profile
  2976.  echo 'elif [ "$SHELL" = "/bin/zsh" ]; then' >> /etc/profile
  2977.  echo " PS1='%n@%m:%~%# '" >> /etc/profile
  2978.  echo 'elif [ "$SHELL" = "/bin/ash" ]; then' >> /etc/profile
  2979.  echo " PS1='$ '" >> /etc/profile
  2980.  echo 'else' >> /etc/profile
  2981.  echo " PS1='\[\e[97m\](\u\[\e[96m\]\@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" >> /etc/profile
  2982.  echo " [[ \$EUID == 0 ]] && PS1='\[\e[97m\](\[\e[95m\]\u\[\e[96m\]\@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" >> /etc/profile
  2983.  echo 'fi' >> /etc/profile
  2984.  echo "PS2='> '" >> /etc/profile
  2985.  echo 'export PATH DISPLAY LESS TERM PS1 PS2' >> /etc/profile
  2986.  echo '' >> /etc/profile
  2987.  echo '# Default umask.  A umask of 022 prevents new files from being created group' >> /etc/profile
  2988.  echo '# and world writable.' >> /etc/profile
  2989.  echo 'umask 022' >> /etc/profile
  2990.  echo '' >> /etc/profile
  2991.  echo "# Notify user of incoming mail.  This can be overridden in the user's" >> /etc/profile
  2992.  echo '# local startup file (~/.bash.login or whatever, depending on the shell)' >> /etc/profile
  2993.  echo 'if [ -x /usr/bin/biff ]; then' >> /etc/profile
  2994.  echo ' biff y 2> /dev/null' >> /etc/profile
  2995.  echo 'fi' >> /etc/profile
  2996.  echo '' >> /etc/profile
  2997.  echo '# Append any additional sh scripts found in /etc/profile.d/:' >> /etc/profile
  2998.  echo 'for profile_script in /etc/profile.d/*.sh ; do' >> /etc/profile
  2999.  echo '  if [ -x $profile_script ]; then' >> /etc/profile
  3000.  echo '    . $profile_script' >> /etc/profile
  3001.  echo '  fi' >> /etc/profile
  3002.  echo 'done' >> /etc/profile
  3003.  echo 'unset profile_script' >> /etc/profile
  3004.  echo 'alias ll="ls -alh"' >> /etc/profile
  3005.  echo 'alias ls="ls --color=auto"' >> /etc/profile
  3006.  #
  3007.  echo "PS1='\[\e[97m\](\u\[\e[96m\]@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" > /root/.bashrc
  3008.  echo "[[ \$EUID == 0 ]] && PS1='\[\e[97m\](\[\e[95m\]\u\[\e[96m\]@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" >> /root/.bashrc
  3009.  echo 'alias ll="ls -alh"' >> /root/.bashrc
  3010.  echo 'alias ls="ls --color=auto"' >> /root/.bashrc
  3011.  echo "alias shutdown='shutdown -h now'" >> /root/.bashrc
  3012.  echo "alias chromium='chromium --no-sandbox --user-data-dir'" >> /root/.bashrc
  3013.  echo "function mountiso()" >> /root/.bashrc
  3014.  echo "{" >> /root/.bashrc
  3015.  echo " mount -o loop \$1 /media/iso" >> /root/.bashrc
  3016.  echo "}" >> /root/.bashrc
  3017.  echo "function unmountiso()" >> /root/.bashrc
  3018.  echo "{" >> /root/.bashrc
  3019.  echo " umount /media/iso" >> /root/.bashrc
  3020.  echo "}" >> /root/.bashrc
  3021.  
  3022.  
  3023.  
  3024.  #
  3025.  mkdir -p /home/$user > /dev/null 2>&1
  3026.  echo "PS1='\[\e[97m\](\u\[\e[96m\]@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" > /home/$user/.bashrc
  3027.  echo "[[ \$EUID == 0 ]] && PS1='\[\e[97m\](\[\e[95m\]\u\[\e[96m\]@\[\e[94m\]\h\[\e[97m\]:\w)\[\e[97m\]☯ \[\e[m\]'" >> /home/$user/.bashrc
  3028.  echo 'alias ll="ls -alh"' >> /home/$user/.bashrc
  3029.  echo 'alias ls="ls --color=auto"' >> /home/$user/.bashrc
  3030.  echo "alias shutdown='sudo /sbin/shutdown -h now'" >> /home/$user/.bashrc
  3031.  echo "alias reboot='sudo /sbin/reboot'" >> /home/$user/.bashrc
  3032.  echo "function mountiso()" >> /home/$user/.bashrc
  3033.  echo "{" >> /home/$user/.bashrc
  3034.  echo "  mount -o loop \$1 /media/iso" >> /home/$user/.bashrc
  3035.  echo "}" >> /home/$user/.bashrc
  3036.  echo "function unmountiso()" >> /home/$user/.bashrc
  3037.  echo "{" >> /home/$user/.bashrc
  3038.  echo "  umount /media/iso" >> /home/$user/.bashrc
  3039.  echo "}" >> /home/$user/.bashrc
  3040.  
  3041.  
  3042.  #
  3043.  echo "if [ -f ~/.bashrc ]" > /root/.bash_login
  3044.  echo "then" >> /root/.bash_login
  3045.  echo "  . ~/.bashrc" >> /root/.bash_login
  3046.  echo "fi" >> /root/.bash_login
  3047.  #
  3048.  echo "if [ -f ~/.bashrc ]" > /home/$user/.bash_login
  3049.  echo "then" >> /home/$user/.bash_login
  3050.  echo "  . ~/.bashrc" >> /home/$user/.bash_login
  3051.  echo "fi" >> /home/$user/.bash_login
  3052. }
  3053.  
  3054. function setup_roccat-tools()
  3055. {
  3056.  cd data/pool/misc/sources
  3057.  cwd=$(pwd)
  3058.  tar -xjvf libgaminggear-0.12.0.tar.bz2 -C /tmp/ > /dev/null 2>&1
  3059.  mkdir -p /tmp/libgaminggear-0.12.0/build
  3060.  cd /tmp/libgaminggear-0.12.0/build
  3061.  cmake -DCMAKE_INSTALL_PREFIX="/usr" .. > /dev/null 2>&1
  3062.  make > /dev/null 2>&1
  3063.  make install > /dev/null 2>&1
  3064.  rm -rf /tmp/libgaminggear-0.12.0 > /dev/null 2>&1
  3065.  cd $cwd
  3066.  tar -xjvf roccat-tools-4.0.0.tar.bz2 -C /tmp/ > /dev/null 2>&1
  3067.  mkdir -p /tmp/roccat-tools-4.0.0/build
  3068.  cd /tmp/roccat-tools-4.0.0/build
  3069.  cmake -DCMAKE_INSTALL_PREFIX="/usr" .. > /dev/null 2>&1
  3070.  make > /dev/null 2>&1
  3071.  make install > /dev/null 2>&1
  3072.  cd $cwd
  3073.  cd ../../../..
  3074.  rm -rf /tmp/roccat-tools-4.0.0 > /dev/null 2>&1
  3075.  rm /usr/share/applications/roccatarvoconfig.desktop > /dev/null 2>&1
  3076.  rm /usr/share/applications/roccatiskufxconfig.desktop > /dev/null 2>&1
  3077.  rm /usr/share/applications/roccatkoneconfig.desktop > /dev/null 2>&1
  3078.  rm /usr/share/applications/roccatkoneplusconfig.desktop > /dev/null 2>&1
  3079.  rm /usr/share/applications/roccatkonepureconfig.desktop > /dev/null 2>&1
  3080.  rm /usr/share/applications/roccatkonepuremilitaryconfig.desktop > /dev/null 2>&1
  3081.  rm /usr/share/applications/roccatkonepureopticalconfig.desktop > /dev/null 2>&1
  3082.  rm /usr/share/applications/roccatkonextdopticalconfig.desktop > /dev/null 2>&1
  3083.  rm /usr/share/applications/roccatkovaplusconfig.desktop > /dev/null 2>&1
  3084.  rm /usr/share/applications/roccatluaconfig.desktop > /dev/null 2>&1
  3085.  rm /usr/share/applications/roccatnythconfig.desktop > /dev/null 2>&1
  3086.  rm /usr/share/applications/roccatpyraconfig.desktop > /dev/null 2>&1
  3087.  rm /usr/share/applications/roccatryosmkconfig.desktop > /dev/null 2>&1
  3088.  rm /usr/share/applications/roccatryostklconfig.desktop > /dev/null 2>&1
  3089.  rm /usr/share/applications/roccatsavuconfig.desktop > /dev/null 2>&1
  3090.  rm /usr/share/applications/roccattyonconfig.desktop > /dev/null 2>&1
  3091.  rm /usr/share/applications/roccatkova2016config.desktop > /dev/null 2>&1
  3092.  rm /usr/share/applications/roccatkiroconfig.desktop > /dev/null 2>&1
  3093. }
  3094.  
  3095.  
  3096.  function cursor-on ()
  3097. {
  3098.  if [ "x$slwv" == "xSlackware 14.1" ]
  3099.  then
  3100.   setterm -cursor on
  3101.  fi
  3102.  if [ "x$slwv" == "xSlackware 14.2" ]
  3103.  then
  3104.   setterm --cursor on
  3105.  fi
  3106. }
  3107.  
  3108.  function cursor-off ()
  3109. {
  3110.  if [ "x$slwv" == "xSlackware 14.1" ]
  3111.  then
  3112.   setterm -cursor off
  3113.  fi
  3114.  if [ "x$slwv" == "xSlackware 14.2" ]
  3115.  then
  3116.   setterm --cursor off
  3117.  fi
  3118. }
  3119.  
  3120.  
  3121.  
  3122. #
  3123. #
  3124. #
  3125. function main_setup()
  3126. {
  3127.  #
  3128.  #variables:
  3129.  #
  3130.  # $slwv "Slackware 14.1" "Slackware 14.2"
  3131.  # $slwd "slackware64-14.1" "slackware64-14.2"
  3132.  # $user "?"
  3133.  # $install_nvidia "304.131" "340.96" "361.28" "none"
  3134.  # $usb_polling "1" "2" "4" "8" "none"
  3135.  # $install_roccat "yes" "no"
  3136.  #
  3137.  clear
  3138.  echo "/$slwd-setup/setup"
  3139.  echo
  3140.  echo
  3141.  echo
  3142.  bold-on
  3143.  echo Setup
  3144.  echo =====
  3145.  bold-off
  3146.  echo
  3147.  echo
  3148.  #
  3149.  # order
  3150.  #
  3151.  export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo) -pipe"
  3152.  
  3153.  #
  3154.  if [ "x$slwv" == "xSlackware 14.1" ]
  3155.  then
  3156.    null
  3157.    setup slackware64-14.1-update
  3158.  fi
  3159.  #
  3160.  #
  3161.  if [ "$german_language" == "yes" ]
  3162.  then
  3163.    null
  3164.    setup german-language
  3165.  fi
  3166.  ##setup kernel
  3167.  #^test
  3168.  setup lilo
  3169.  setup fstab
  3170.  setup rc.local
  3171.  setup profiles
  3172.  setup modules
  3173.  setup services
  3174.  setup network
  3175.  #
  3176.  if ! [ "$usb_polling" == "none" ]
  3177.  then
  3178.    null
  3179.    setup usb-polling
  3180.  fi
  3181.  
  3182.  if [ "$install_roccat" == "yes" ]
  3183.  then
  3184.    null
  3185.    setup roccat-tools
  3186.  fi
  3187.  setup recently-used
  3188.  setup libraries
  3189.  setup packages
  3190.  setup misc
  3191.  setup terminals
  3192.  
  3193.  setup xserver
  3194.  setup xfce
  3195.  setup mate
  3196.  #
  3197.  if [ "x$slwv" == "xSlackware 14.2" ]
  3198.  then
  3199.    null
  3200.    setup pulseaudio
  3201.  fi
  3202.  #
  3203.  #
  3204.  if ! [ "$install_nvidia" == "none" ]
  3205.  then
  3206.    null
  3207.    #setup nvidia
  3208.    #^test
  3209.  fi
  3210.   chown -R $user:$user /home/$user > /dev/null 2>&1
  3211.   sync
  3212.   chmod -R g+w /home/$user > /dev/null 2>&1
  3213.   chmod -R g+w /root > /dev/null 2>&1
  3214.   sync
  3215. }
  3216.  
  3217. function setup_finished()
  3218. {
  3219.  clear
  3220.  echo /$slwd-setup/finished
  3221.  echo
  3222.  echo
  3223.  echo
  3224.  bold-on
  3225.  echo Installation finished!
  3226.  echo ======================
  3227.  bold-off
  3228.  echo
  3229.  echo
  3230.  echo Now reboot and log into your new user account
  3231.  echo
  3232.  bold-on
  3233.  echo -n $user
  3234.  bold-off
  3235.  echo using the specified password.
  3236.  echo
  3237.  echo
  3238.  echo
  3239.  echo
  3240.  bold-on
  3241.  echo "[RETURN] to reboot..."
  3242.  bold-off
  3243.  echo
  3244.  read reboot
  3245.  clear
  3246.  #
  3247.  # activate
  3248.  #
  3249.  #reboot
  3250. }
  3251.  
  3252.  
  3253. ######
  3254. #MAIN#
  3255. ######
  3256. #
  3257. # export makeflags cores *2 -j -pipe
  3258.  
  3259.  
  3260. set_color
  3261. check_version
  3262. cursor-off
  3263. start_screen
  3264. cursor-on
  3265. while ! [ "x$input_correct" == "xyes" ]
  3266.   do
  3267.   input_german-language
  3268.   input_add_user
  3269.   #input_setup_kernel
  3270.   ##(input connection speed)
  3271.   ##(input mtu size)
  3272.   input_setup_nvidia
  3273.   input_setup_usb_polling
  3274.   input_install_roccat_tools
  3275.   input_confirm_settings
  3276. done
  3277. #
  3278. # activate
  3279. #
  3280. add_user
  3281. cursor-off
  3282. main_setup
  3283. #setup_finished
  3284. cursor-on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement