From 21ec4c0e5cca4f8b03957c8ca23ee094ba491a17 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 15 Mar 2011 09:19:22 -0400
Subject: [PATCH 1/5] Switch from timed to automatic login in desktop spin

Now that GDM no longer has language selection, there's
little reason to use timed login.

This commit changes the default config to use automatic
login instead.
---
 fedora-live-desktop.ks |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index aa8edf6..8bc525a 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -28,9 +28,8 @@ gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults
 # set up timed auto-login for after 60 seconds
 cat >> /etc/gdm/custom.conf << FOE
 [daemon]
-TimedLoginEnable=true
-TimedLogin=liveuser
-TimedLoginDelay=60
+AutomaticLoginEnable=true
+AutomaticLogin=liveuser
 FOE
 
 # Show harddisk install on the desktop
-- 
1.7.4.1


From 7765ecb3607b2169ecae8bb4f06b8a145afdef1a Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 15 Mar 2011 09:28:16 -0400
Subject: [PATCH 2/5] Change screensaver configuration

It uses gsettings now instead of gconf
---
 fedora-live-desktop.ks |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index 8bc525a..859ff93 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -22,8 +22,11 @@ nss-mdns
 %post
 cat >> /etc/rc.d/init.d/livesys << EOF
 # disable screensaver locking
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/gnome/lockdown/disable_lock_screen true >/dev/null
+cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.screensaver.gschema.override << FOE
+[org.gnome.desktop.screensaver]
+lock-enabled=false
+FOE
+glib-compile-schemas /usr/share/glib-2.0/schemas
 
 # set up timed auto-login for after 60 seconds
 cat >> /etc/gdm/custom.conf << FOE
-- 
1.7.4.1


From b8766a1c79a027168afe2634ae8cbd4988dd03b6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 15 Mar 2011 09:35:01 -0400
Subject: [PATCH 3/5] Move live install launcher from desktop to dash

Since we don't show the desktop anymore, it doesn't
make sense to put the livecd installer there.  For
now, put it as a favorite on the dash.
---
 fedora-live-desktop.ks |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index 859ff93..27d0723 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -26,6 +26,13 @@ cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.screensaver.gschema.overrid
 [org.gnome.desktop.screensaver]
 lock-enabled=false
 FOE
+
+# Show harddisk install in shell dash
+sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
+cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
+[org.gnome.shell]
+favorite-apps=['mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop', 'liveinst.desktop']
+FOE
 glib-compile-schemas /usr/share/glib-2.0/schemas
 
 # set up timed auto-login for after 60 seconds
@@ -35,13 +42,6 @@ AutomaticLoginEnable=true
 AutomaticLogin=liveuser
 FOE
 
-# 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
-chown -R liveuser.liveuser /home/liveuser/Desktop
-chmod a+x /home/liveuser/Desktop/liveinst.desktop
-
 # Turn off PackageKit-command-not-found while uninstalled
 sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
 
-- 
1.7.4.1


From b08840a0a2aca74201ba54f36373ca829ea12eb9 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 15 Mar 2011 11:16:53 -0400
Subject: [PATCH 4/5] Add live installer menu item to user menu

In the mockups here:

https://live.gnome.org/GnomeShell/Design/Whiteboards/SystemStopRestart

there is a way to install updates right above the suspend item.  For
an uninstalled livecd, installation is sort of analagous to updates on
an installed system.

This commit adds the installer to the user menu.
---
 fedora-live-desktop.ks |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index 27d0723..dc42c58 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -35,6 +35,26 @@ favorite-apps=['mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop'
 FOE
 glib-compile-schemas /usr/share/glib-2.0/schemas
 
+# add installer to user menu
+mkdir -p ~liveuser/.local/share/gnome-shell/extensions/Installer@shell-extensions.fedoraproject.org
+cat >> ~liveuser/.local/share/gnome-shell/extensions/Installer@shell-extensions.fedoraproject.org/metadata.json << FOE
+{"shell-version": ["2.91.91"], "uuid": "Installer@shell-extensions.fedoraproject.org", "name": "Installer", "description": "Install OS from user menu"}
+FOE
+
+cat >> ~liveuser/.local/share/gnome-shell/extensions/Installer@shell-extensions.fedoraproject.org/extension.js << FOE
+const PopupMenu = imports.ui.popupMenu;
+const Shell = imports.gi.Shell;
+const Main = imports.ui.main;
+const Util = imports.misc.util;
+
+function main() {
+    let item = new PopupMenu.PopupMenuItem(Shell.AppSystem.get_default().get_app('liveinst.desktop').get_name());
+    item.connect('activate', function() { Util.spawnDesktop('liveinst'); });
+
+    Main.panel._statusmenu.menu.addMenuItem(item, Main.panel._statusmenu.menu._getMenuItems().length - 1);
+}
+FOE
+
 # set up timed auto-login for after 60 seconds
 cat >> /etc/gdm/custom.conf << FOE
 [daemon]
-- 
1.7.4.1


From fb696616b70e3145f1a02a7c081244cd20c8cfe9 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 15 Mar 2011 12:35:08 -0400
Subject: [PATCH 5/5] rename liveinst.desktop to anaconda.desktop

The shell requires the name to be the same as the wmclass
of the initial window.
---
 fedora-live-desktop.ks |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index dc42c58..92ce90c 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -29,6 +29,9 @@ FOE
 
 # Show harddisk install in shell dash
 sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
+# need to move it to anaconda.desktop to make shell happy
+mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
+
 cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
 [org.gnome.shell]
 favorite-apps=['mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop', 'liveinst.desktop']
-- 
1.7.4.1

