diff --git a/plinth/action_utils.py b/plinth/action_utils.py index 337c45cd7..a1f26a19c 100644 --- a/plinth/action_utils.py +++ b/plinth/action_utils.py @@ -36,15 +36,9 @@ def systemd_get_default() -> str: return process.stdout.decode().strip() -def systemd_set_default(target: str, isolate: bool = True): - """Set the default target that systemd will boot into. - - If 'isolate' is True, then immediate switch the current system target to - newly set target resulting in starting/stopping of services. - """ +def systemd_set_default(target: str): + """Set the default target that systemd will boot into.""" subprocess.run(['systemctl', 'set-default', target], check=True) - if isolate: - subprocess.run(['systemctl', 'isolate', target], check=True) def service_daemon_reload(): diff --git a/plinth/modules/gnome/__init__.py b/plinth/modules/gnome/__init__.py index a464232f2..b26a39948 100644 --- a/plinth/modules/gnome/__init__.py +++ b/plinth/modules/gnome/__init__.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later """FreedomBox app to configure GNOME desktop.""" +from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ from plinth import action_utils @@ -23,8 +24,12 @@ _description = [ 'You may install further graphical applications using the software ' 'center provided within.'), box_name=_(cfg.box_name)), _('This app is not suitable for low-end hardware. It requires at least ' - '4GiB for RAM, 4GiB or disk space and a GPU capable of basic 3D ' + '4GiB of RAM, 4GiB of disk space and a GPU capable of basic 3D ' 'acceleration.'), + format_lazy( + _('After installing, enabling, disabling, or uninstalling the app, ' + 'you will need to restart the machine for ' + 'changes to take effect.'), power_url=reverse_lazy('power:restart')), ] diff --git a/plinth/modules/gnome/manifest.py b/plinth/modules/gnome/manifest.py index de18fdb4a..fae93bd0e 100644 --- a/plinth/modules/gnome/manifest.py +++ b/plinth/modules/gnome/manifest.py @@ -3,7 +3,7 @@ from django.utils.translation import gettext_lazy as _ -backup = {} +backup: dict = {} tags = [ _('Desktop'), diff --git a/plinth/privileged/service.py b/plinth/privileged/service.py index 657ec9c76..c299c98ac 100644 --- a/plinth/privileged/service.py +++ b/plinth/privileged/service.py @@ -9,12 +9,12 @@ from plinth.daemon import Daemon, RelatedDaemon @privileged -def systemd_set_default(target: str, isolate: bool = True): +def systemd_set_default(target: str): """Set the default target that systemd will boot into.""" if target not in ['graphical.target', 'multi-user.target']: raise ValueError('Invalid target') - action_utils.systemd_set_default(target, isolate) + action_utils.systemd_set_default(target) @privileged