#!/bin/bash source /etc/functions.magic ### # xfce installation script # Copyright (C) Thomas "ShALLaX" Pedley (gentoox@shallax.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ### $important clear echo "This will install the XFCE windowmanager" sleep 5 $busy echo "emerge xfce4..." emerge xfce4 failCheck emerge $busy ### # Swap TWM for XFCE ### sed "s/twm/startxfce4/" /etc/skel/.xinitrc > /tmp/xinitrc && rm -rf /etc/skel/.xinitrc && mv /tmp/xinitrc /etc/skel/.xinitrc && chmod 644 /etc/skel/.xinitrc sed "s/twm/startxfce4/" /home/gentoox/.xinitrc > /tmp/xinitrc && rm -rf /home/gentoox/.xinitrc && mv /tmp/xinitrc /home/gentoox/.xinitrc && chmod 644 /home/gentoox/.xinitrc && chown gentoox:users /home/gentoox/.xinitrc sed "s/twm/startxfce4/" /root/.xinitrc > /tmp/xinitrc && rm -rf /root/.xinitrc && mv /tmp/xinitrc /root/.xinitrc && chmod 644 /root/.xinitrc ### # Swap startkde for XFCE ### sed "s/startkde/startxfce4/" /etc/skel/.xinitrc > /tmp/xinitrc && rm -rf /etc/skel/.xinitrc && mv /tmp/xinitrc /etc/skel/.xinitrc && chmod 644 /etc/skel/.xinitrc sed "s/startkde/startxfce4/" /home/gentoox/.xinitrc > /tmp/xinitrc && rm -rf /home/gentoox/.xinitrc && mv /tmp/xinitrc /home/gentoox/.xinitrc && chmod 644 /home/gentoox/.xinitrc && chown gentoox:users /home/gentoox/.xinitrc sed "s/startkde/startxfce4/" /root/.xinitrc > /tmp/xinitrc && rm -rf /root/.xinitrc && mv /tmp/xinitrc /root/.xinitrc && chmod 644 /root/.xinitrc ### # Sort out the width and position of xvkbd ### sed "s/-81/-74/" /etc/skel/.xinitrc > /tmp/xinitrc && rm -rf /etc/skel/.xinitrc && mv /tmp/xinitrc /etc/skel/.xinitrc && chmod 644 /etc/skel/.xinitrc sed "s/-81/-74/" /home/gentoox/.xinitrc > /tmp/xinitrc && rm -rf /home/gentoox/.xinitrc && mv /tmp/xinitrc /home/gentoox/.xinitrc && chmod 644 /home/gentoox/.xinitrc && chown gentoox:users /home/gentoox/.xinitrc sed "s/-81/-74/" /root/.xinitrc > /tmp/xinitrc && rm -rf /root/.xinitrc && mv /tmp/xinitrc /root/.xinitrc && chmod 644 /root/.xinitrc chown gentoox:wheel /home/gentoox/.xinitrc chmod 755 /home/gentoox/.xinitrc chmod 755 /root/.xinitrc chmod 755 /etc/skel/.xinitrc cd /home/gentoox rm -rf /home/gentoox/.xfce4 rm -rf ./xfcegentoox* $downloading $wget --limit-rate=${limitrate} $gentooxurl/patch-files/xfcegentoox.tbz2 failCheck download $busy tar -jxvf /home/gentoox/xfcegentoox.tbz2 failCheck decompress rm -rf /home/gentoox/xfcegentoox.tbz2* chown -R gentoox:users /home/gentoox/.xfce4 chown gentoox:wheel /home/gentoox/.xfce4/xfce4rc cp -a /home/gentoox/.xfce4 /root/ cp -a /home/gentoox/.config /root/ cp -a /home/gentoox/.xfce4 /etc/skel/ cp -a /home/gentoox/.config /etc/skel/ chown -R root:root /root/.xfce4 chown -R root:root /root/.config chown -R root:root /etc/skel/.xfce4 chown -R root:root /etc/skel/.config echo "onxfce1" >> /etc/conf.d/magic-database grep -vi "onkde1" /etc/conf.d/magic-database >> /etc/conf.d/magic-database.tmp mv /etc/conf.d/magic-database.tmp /etc/conf.d/magic-database chown root:root /etc/conf.d/magic-database chmod 600 /etc/conf.d/magic-database cd /etc rm -rf /etc/xfce4 rm -rf ./xfceetc.tbz2 $downloading $wget --limit-rate=${limitrate} $gentooxurl/patch-files/xfceetc.tbz2 failCheck download $busy tar -jxvf /etc/xfceetc.tbz2 failCheck decompress rm -rf /etc/xfceetc.tbz2 mkdir -p /home/gentoox/.wallpaper 1> /dev/null 2> /dev/null cd /home/gentoox/.wallpaper rm -rf ./xfce.png $downloading $wget --limit-rate=${limitrate} $gentooxurl/patch-files/xfce.png failCheck download $busy chown -R gentoox:users /home/gentoox/.wallpaper chmod -R 755 /home/gentoox/.wallpaper