Closing terminal window dosn't kill sudo'ed program
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Fri May 22 01:20:53 CEST 2015
On Thu, 21 May 2015 20:34:45 +0000 (UTC), Grant Edwards wrote:
>If I do that, I get _two_ terminal windows. The one with the app, and
>the one where the "sudo xfce4-terminal" command was executed. Ugly.
If you didn't terminate the script ps aux | grep testit.sh will always
show that it's still running. You can solve it by running sudo inside
the scrip.
xfce4-terminal -x /path/testit.sh
#!/bin/bash
while sleep 1
do
sudo date
done
if you run
xfce4-terminal -x sudo /path/testit.sh
#!/bin/bash
while sleep 1
do
date
done
you need to "close" the terminal by terminating the script with Ctrl+C
instead of just closing the terminal.
>> sudo xfce4-terminal -e ./testit.sh
>
>How is that different from my solution?
>
> sudo xfce4-terminal -x ./testit.sh
Compatibility with a better terminal emulation ;).
--
It only looks like a tape-recorder. It's actually a pen.
So you can write with it and no one will know.
--
It only looks like a tape-recorder. It's actually a pen.
So you can write with it and no one will know.
More information about the Xfce
mailing list