diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-10-09 21:44:22 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-10-09 21:44:22 +0200 |
commit | bd81e5b2dd106e51e5884a6cd07b94d6ad4ac6b6 (patch) | |
tree | 55ef20507fce8ea5077ba11f19886e6e74697b42 /bin | |
parent | c1e95b2d2c4909a577542395ae34f8630c7fedb8 (diff) |
bin:pm_test: Resume checkbox as a normal user (sudo -u)
Fixes: LP:1720970
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pm_test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/pm_test b/bin/pm_test index 395498c..35cd215 100755 --- a/bin/pm_test +++ b/bin/pm_test @@ -202,8 +202,8 @@ class PowerManagementOperation(object): MessageDialog(title, message).run() if self.args.checkbox_respawn_cmd: subprocess.run( - r'DISPLAY=:0 x-terminal-emulator -e "bash -c \"source {}; exec bash\""'.format( - self.args.checkbox_respawn_cmd), shell=True) + r'DISPLAY=:0 x-terminal-emulator -e "sudo -u {} bash -c \"source {}; exec bash\""'.format( + self.user, self.args.checkbox_respawn_cmd), shell=True) def teardown(self): """ |