Browse Source

lots of fixes

tags/nilmdbuntu-1
Jim Paris 10 years ago
parent
commit
2e7d617c70
4 changed files with 46 additions and 17 deletions
  1. +4
    -3
      TODO
  2. +3
    -0
      buildiso.sh
  3. +20
    -11
      customize-inner.sh
  4. +19
    -3
      customize.sh

+ 4
- 3
TODO View File

@@ -1,7 +1,7 @@
- Try other Ubuntu/Xubuntu versions

Problems with 3ce08771a631f9e373f65995fd2114a817326e98:
- Ubiquity chooser doesn't have nilmdb background
* Ubiquity chooser doesn't have nilmdb background --- skip it!
* Theme is still "Greybird" not "Clearlooks"
* Icons are still "elementary Xfce dark" not "elementary Xfce"
* Change xfdesktop background color to black
@@ -10,5 +10,6 @@ Problems with 3ce08771a631f9e373f65995fd2114a817326e98:
* capture.sh should say skipping
* ubiquity still shows release notes?
* release notes need to exist
- in live CD, ssh_host_dsa_key is ba636e7440..
- quiet/splash removal failed --- preseed late_command didn't work
* in live CD, ssh_host_dsa_key is ba636e7440..
* quiet/splash removal failed --- preseed late_command didn't work
* build hybrid iso

+ 3
- 0
buildiso.sh View File

@@ -42,3 +42,6 @@ xorriso -as mkisofs \
-boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
${ISO}

# fix iso for hybrid booting
isohybrid ${ISO}

+ 20
- 11
customize-inner.sh View File

@@ -251,23 +251,28 @@ wait
trap "" 0

# Put some default desktop shortcuts in place
mkdir -p /etc/skel/Desktop
cp /usr/share/applications/exo-terminal-emulator.desktop /etc/skel/Desktop
cp /usr/share/applications/exo-web-browser.desktop /etc/skel/Desktop
chmod +x /etc/skel/Desktop/* # needs to be executable for 13.04+

# XFCE customizations
cat > /usr/share/gconf/defaults/88_nilmdbuntu-settings <<"EOF"
DESKTOP=/etc/skel/Desktop
mkdir -p $DESKTOP
cp /usr/share/applications/exo-terminal-emulator.desktop $DESKTOP || true
cp /usr/share/applications/exo-web-browser.desktop $DESKTOP || true
chmod +x $DESKTOP/* # needs to be executable for 13.04+

# XFCE / theme customizations
if [ -d /usr/share/themes/Clearlooks ] && \
[ -d /usr/share/icons/elementary-xfce ] ; then
cat > /usr/share/gconf/defaults/88_nilmdbuntu-settings <<"EOF"
/desktop/gnome/interface/gtk_theme "Clearlooks"
/desktop/gnome/interface/icon_theme "elementary-xfce"
EOF
update-gconf-defaults
update-gconf-defaults
fi

XML=/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
XML=/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml
BG=/usr/share/xfce4/backdrops
dpkg-divert --local --rename --add ${XML}
cat >$XML <<"EOF"
mkdir -p $XML
cat >$XML/xfce4-desktop.xml <<"EOF"
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-desktop" version="1.0">
<property name="desktop-icons" type="empty">
<property name="style" type="int" value="2"/>
@@ -310,6 +315,10 @@ cat >$XML <<"EOF"
</property>
</channel>
EOF
sed -i -s -e 's/Greybird/Default/g' $XML/xfwm4.xml || true
sed -i -s -e 's/Greybird/Clearlooks/g' $XML/xsettings.xml || true
sed -i -s -e \
's/elementary-xfce-dark/elementary-xfce/g' $XML/xsettings.xml || true

# Firefox defaults
cat >/etc/firefox/syspref.js <<"EOF"


+ 19
- 3
customize.sh View File

@@ -16,11 +16,20 @@ echo "NilmDBuntu $VERSION by Jim Paris" > ${ISO}/.disk/info
# Set up preseed file
cp ${ISO}/preseed/xubuntu.seed ${ISO}/preseed/nilmdbuntu.seed
cat >> ${ISO}/preseed/nilmdbuntu.seed <<"EOF"
# Late commands:
# Commands to run on successful install:
# - Regenerate SSH host keys
# - Remove "quiet splash" from grub command line
d-i preseed/late_command string \
in-target rm /etc/ssh/ssh_host_*; \
in-target sh -c "rm /etc/ssh/ssh_host_*"; \
in-target dpkg-reconfigure openssh-server; \
in-target sed -i -s -e 's/quiet splash//g' /etc/default/grub; \
in-target update-grub; \
echo "done"

# Ubiquity doesn't actually use preseed/late_command, so copy those.
# If these end up running twice, it's KK.
ubiquity ubiquity/success_command string \
in-target sh -c "rm /etc/ssh/ssh_host_*"; \
in-target dpkg-reconfigure openssh-server; \
in-target sed -i -s -e 's/quiet splash//g' /etc/default/grub; \
in-target update-grub; \
@@ -47,10 +56,17 @@ sed -i -s \
${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg

# Remove quiet and splash from boot command lines. Easier than a
# custom plymouth theme and it's helpful.
# custom plymouth theme and it's helpful info.
sed -i -s -e "s/ quiet splash//g;" \
${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg

# Remove hidden-timeout from isolinux. Otherwise, isolinux
# automatically adds "maybe-ubiquity" to the kernel command line.
# This prevents that, which means it will go directly to the live
# desktop with the sweet background pic.
sed -i -s -e "s/^hidden-timeout/# hidden-timeout/g" \
${ISO}/isolinux/gfxboot.cfg

# Run the customize-inner.sh script inside the chroot
sudo cp nilmdbuntu.png ${FS}/usr/share/xfce4/backdrops/nilmdbuntu.png
sudo cp customize-inner.sh ${FS}/root/customize-inner.sh


Loading…
Cancel
Save