From bd81e5b2dd106e51e5884a6cd07b94d6ad4ac6b6 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Mon, 9 Oct 2017 21:44:22 +0200 Subject: bin:pm_test: Resume checkbox as a normal user (sudo -u) Fixes: LP:1720970 --- bin/pm_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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): """ -- cgit v1.2.3