Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2310  / 2 Years ago, tue, february 1, 2022, 8:57:29

In Unity, the Update Manager was included in the power cog menu along with log out, suspend, shut down etc. But in GNOME Shell, I do not find such an option. Is there any extension or tweak to make Update Manager appear in that menu?


More From » gnome

 Answers
5

This way to solve the problem is achieved by using the alternative-status-menu extension.



Install extension



If you have not installed the alternative-status-menu extension, type the following commands in the terminal.



sudo add-apt-repository ppa:webupd8team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell-extensions-alternative-status-menu


Patching



gedit update-menu-extension.patch


Cut the following, and paste in the editor.



diff -urNP org/extension.js new/extension.js
--- org/extension.js 2011-11-10 00:12:19.912240830 +0900
+++ new/extension.js 2011-11-10 00:10:14.779233789 +0900
@@ -2,6 +2,7 @@
const Lang = imports.lang;
const St = imports.gi.St;

+const Shell = imports.gi.Shell;
const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const GnomeSession = imports.misc.gnomeSession;
@@ -10,6 +11,13 @@
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;

+function updateManager(item) {
+ Main.overview.hide();
+ let app = Shell.AppSystem.get_default().lookup_setting('update-manager.desktop');
+ app.activate();
+}
+
+
function updateSuspend(object, pspec, item) {
item.actor.visible = object.get_can_suspend();
}
@@ -57,6 +65,10 @@
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item);

+ item = new PopupMenu.PopupMenuItem(_("Update Manager"));
+ item.connect('activate', Lang.bind(this, updateManager));
+ this.menu.addMenuItem(item);
+
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);


Add a blank line at the last line, and save.



cp /usr/share/gnome-shell/extensions/[email protected]/extension.js

patch -p1 < update-menu-extension.patch

sudo cp extension.js /usr/share/gnome-shell/extensions/[email protected]/.


Restart gnome-shell and turn on the alternative-status-menu extension by gnome-tweak-tool.



Screenshot of added entry (note: in Japanese)



The above screenshot is from the Japanese version. "アップデートマネージャー" = "Update Manager".
Don't worry, the menu item ("Update Manager") will be displayed in English.



Note: If you will upgrade alternative-status-menu, you can not use "Update Manager" menu in session menus because alternative-status-menu extension will be overwritten.



Recovery



sudo apt-get purge gnome-shell-extensions-alternative-status-menu


or



sudo apt-get install --reinstall gnome-shell-extensions-alternative-status-menu

[#42195] Wednesday, February 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kroapathe

Total Points: 445
Total Questions: 117
Total Answers: 99

Location: Botswana
Member since Sun, Sep 19, 2021
3 Years ago
;