From f36ebea234c204d29d2b8e6fa2f55fd2906b08cb Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 15 Mar 2011 11:16:53 -0400 Subject: [PATCH] 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 file changed, 20 insertions(+) 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]