Merge ~sylvain-pineau/checkbox-ng:fix-xdg-restart into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 64b69903479f2a099ba35eb46af0ad1aff581e08
Merged at revision: 9c009f45150a45dcc37c75e03dcb187429df47ab
Proposed branch: ~sylvain-pineau/checkbox-ng:fix-xdg-restart
Merge into: checkbox-ng:master
Diff against target: 14 lines (+3/-0)
1 file modified
plainbox/impl/session/restart.py (+3/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+402353@code.launchpad.net

Description of the change

Fix the XDG restart strategy by prefixing the Desktop file Exec cmd with sh -c

Tested using checkbox-cli and the power-automated test plan

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/plainbox/impl/session/restart.py b/plainbox/impl/session/restart.py
2index 8dc93e8..b3c72cd 100644
3--- a/plainbox/impl/session/restart.py
4+++ b/plainbox/impl/session/restart.py
5@@ -111,6 +111,9 @@ class XDGRestartStrategy(IRestartStrategy):
6 def prime_application_restart(self, app_id: str,
7 session_id: str, cmd: str) -> None:
8 filename = self.get_desktop_filename(app_id)
9+ # Prefix the command with sh -c to comply with the Exec spec
10+ # See https://askubuntu.com/a/1242773/32239
11+ cmd = "sh -c " + cmd
12 if self.app_terminal:
13 cmd += ';$SHELL'
14 self.config.set('Desktop Entry', 'Exec', cmd)

Subscribers

People subscribed via source and target branches