#	    The AnonOS Project presents:
#      ,---.                                             
#      |---|,---.,---.,---.,---.,---.,---.,---.,---.,---.
#      |   ||   ||   ||   ||   |,---||    |---',---||---'
#      `   '`   '`   '`---'`   '`---^`---'`---'`---^`---'
#                                 ,
#              ,-.       _,---._ __  / \  < where did my salmon go?
#             /  )    .-'       `./ /   \
#            (  (   ,'            `/    /|
#             \  `-"             \'\   / |
#              `.              ,  \ \ /  |
#               /`.          ,'-`----Y   |
#              (            ;        |   '
#              |  ,-.    ,-'         |  /
#              |  | (   |            | /
#              )  |  \  `.___________|/
#              `--'   `--'
#
# This kickstart creates an Annonaceae LiveCD based on LXDE. Annonaceae
# is a liveCD that maintains anonymity.
#
%include base.ks

#----------------------------------------------------------------------------
#                             Packages to install
#----------------------------------------------------------------------------
%packages
# LXDE desktop
@lxde-desktop
lxlauncher
obconf
lxdm

# internet
firefox
transmission

# office
abiword
gnumeric
#glista

# graphics
epdfview
mtpaint

# audio & video
gmixer
lxmusic
asunder

# I'm looking for something smaller than
gnomebaker

# utils
galculator
parcellite
xpad
gnome-packagekit*
# Uncomment to use yumex instead of gnome-packagekit
#-gnome-packagekit
#yumex

# system
notification-daemon

# Command line
powertop
yum-utils
yum-presto

# more Desktop stuff
hal-storage-addon
alsa-plugins-pulseaudio
# If possible, replace NetworkManager with Wicd. May not work though, as Anaconda may require it...
NetworkManager-gnome

# Java is too big, and no one uses it anyway, so screw it.
#java-1.6.0-openjdk-plugin

xcompmgr
xdg-user-dirs-gtk
# needed for xdg-open to support LXDE
perl-File-MimeInfo
# pam-fprint causes a segfault in LXDM when enabled
-fprintd-pam
# needed for automatic unlocking of keyring (#643435)
gnome-keyring-pam

#----------------------------------------------------------------------------
#                               Stuff to Remove
#----------------------------------------------------------------------------

# make sure kpackagekit doesn't end up the LXDE live images
-kpackagekit

# LXDE has lxpolkit. Make sure no other authentication agents end up in the spin.
-polkit-gnome
-polkit-kde

# make sure xfce4-notifyd is not pulled in
-xfce4-notifyd

# dictionaries are big
-aspell-*
-hunspell-*
-man-pages-*
-words

# save some space
-nss_db
-sendmail
ssmtp
-acpid

# drop some system-config things
-system-config-boot
#-system-config-language
-system-config-lvm
-system-config-network
-system-config-rootpassword
#-system-config-services
-policycoreutils-gui

# save some space
-samba-client
-mpage
-sox
-hplip
-hpijs
-numactl
-isdn4k-utils
-autofs
# smartcards won't really work on the livecd.
-coolkey
-ccid
-wget

# qlogic firmwares
-ql2100-firmware
-ql2200-firmware
-ql23xx-firmware
-ql2400-firmware

# scanning takes quite a bit of space :/
-xsane
-xsane-gimp
-sane-backends

%end

%post
# LXDE and LXDM configuration

# create /etc/sysconfig/desktop (needed for installation)
cat > /etc/sysconfig/desktop <<EOF
PREFERRED=/usr/bin/startlxde
DISPLAYMANAGER=/usr/sbin/lxdm
EOF

cat >> /etc/rc.d/init.d/livesys << EOF
# disable screensaver locking and make sure gamin gets started
cat > /etc/xdg/lxsession/LXDE/autostart << FOE
/usr/libexec/gam_server
@lxpanel --profile LXDE
@pcmanfm --desktop --profile lxde
@pulseaudio -D
FOE

# set up preferred apps 
cat > /etc/xdg/libfm/pref-apps.conf << FOE 
[Preferred Applications]
WebBrowser=mozilla-firefox.desktop
MailClient=fedora-claws-mail.desktop
FOE

# set up auto-login for liveuser
sed -i 's|# autologin=dgod|autologin=liveuser|g' /etc/lxdm/lxdm.conf

# Show harddisk install on the desktop
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
mkdir /home/liveuser/Desktop
cp /usr/share/applications/liveinst.desktop /home/liveuser/Desktop

# Add autostart for parcellite
cp /usr/share/applications/fedora-parcellite.desktop /etc/xdg/autostart

# this goes at the end after all other changes.
chown -R liveuser:liveuser /home/liveuser
restorecon -R /home/liveuser

EOF

%end



