Closing terminal window dosn't kill sudo'ed program

Ralf Mardorf ralf.mardorf at alice-dsl.net
Fri May 22 09:21:40 CEST 2015


On Fri, 22 May 2015 00:33:20 +0000 (UTC), Grant Edwards wrote:
>On 2015-05-22, Ralf Mardorf <ralf.mardorf at alice-dsl.net> wrote:
>> On Fri, 22 May 2015 01:20:53 +0200, Ralf Mardorf wrote:
>>>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.    
>>
>> I forgot to mention, that you don't need to run two terminals, just
>> follow my advices, resp. test the workaround. IOW uncheck the "run in
>> terminal" option.
>
>That's what I posted in my solution, and you replied saying that was
>wrong and I should check the "run in terminal option".
>
>Unchecking "run in terminal" and using this command works just fine:
>
>  sudo xfce4-terminal -x <whatever>

"unchecking" = _do not_ check the box.
"checking"   = check the box

>What is the need for anything more complicated?

To solve the child process issue without the need to have two open
terminal windows. Writing a second script as a wrapper won't work
either, since then the one and only Window gets closed, but if the
script launches itself you only need one open terminal window and when
closing the window all processes get terminated.

If the box of the launcher is checked, then you get two terminal
windows.

>I also don't uderstand why you said I should use -e instead of -x.
>
>Don't it do exactly the same thing when there is a single command with
>no arguments?

That's correct. As already pointed out, I would use options that are
compatible to roxterm.
I'm used to it, a hbait comparable to the habit regarding bashisms.
You don't need to care about bashisms when using bash, but if you're
used to avoid them when ever possible, the scripts are more likely
portable.


More information about the Xfce mailing list