#!/bin/bash source /etc/functions.magic ### # GDM 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 GDM - An X login manager." sleep 5 echo "Calculating dependencies... please wait." $busy ### # If you dont have GDM, you do now ### ### # Do we need an updated automake? ### automakeVersion=`automake --version | grep automake -m1 | awk '{ print $4 }' | sed "s/[\-\.A-z]//g"` if [ $automakeVersion -lt 182 ]; then clear echo "You need to emerge automake for this patch to work, forcing automake update." sleep 5 emerge automake fi ### # Re-emerge gdm regardless of if there is an update. ### clear echo "emerge gdm..." emerge gdm failCheck emerge $busy clear ### # Grab theme and config files. ### cd /usr/share/gdm rm -rf gdmusr.tbz2 $downloading $wget --limit-rate=${limitrate} $gentooxurl/patch-files/gdmusr.tbz2 failCheck download tar -jxvpf gdmusr.tbz2 failCheck decompress rm -rf gdmusr.tbz2 cd /etc/X11/gdm rm -rf gdmetc.tbz2 $downloading $wget --limit-rate=${limitrate} $gentooxurl/patch-files/gdmetc.tbz2 failCheck download tar -jxvpf gdmetc.tbz2 failCheck decompress rm -rf gdmetc.tbz2 ### # Since we'll be using Xsession, it must be created and linked # back to xinitrc, also it needs to be +x ### ln -sf /home/gentoox/.xinitrc /home/gentoox/.xsession 1> /dev/null 2> /dev/null chmod 755 /home/gentoox/.xinitrc chmod 755 /home/gentoox/.xsession chown gentoox:users /home/gentoox/.xsession ln -sf /root/.xinitrc /root/.xsession 1> /dev/null 2> /dev/null chmod 755 /root/.xinitrc chmod 755 /root/.xsession ln -sf /etc/skel/.xinitrc /etc/skel/.xsession 1> /dev/null 2> /dev/null chmod 755 /etc/skel/.xinitrc chmod 755 /etc/skel/.xsession ### # Set all users to have "custom" as their last session # so that no configuring is required ### cd /home/gentoox echo "[Desktop]" > /home/gentoox/.dmrc echo "Session=custom" >> /home/gentoox/.dmrc chown gentoox:users /home/gentoox/.dmrc chmod 644 /home/gentoox/.dmrc cd /root echo "[Desktop]" > /root/.dmrc echo "Session=custom" >> /root/.dmrc chown root:root /root/.dmrc chmod 644 /root/.dmrc cd /etc/skel echo "[Desktop]" > /etc/skel/.dmrc echo "Session=custom" >> /etc/skel/.dmrc chown root:root /etc/skel/.dmrc chmod 644 /etc/skel/.dmrc ### # Remove the old startx script ### rm -rf /home/gentoox/.startx ### # Update the environment variables to load gdm ### clear grep -v DISPLAYMANAGER /etc/env.d/00basic > /etc/env.d/00basic.tmp mv /etc/env.d/00basic.tmp /etc/env.d/00basic chown root:root /etc/env.d/00basic chmod 644 /etc/env.d/00basic echo "DISPLAYMANAGER=\"gdm\"" >> /etc/env.d/00basic env-update source /etc/profile clear