• Re: Xfce run executable file in terminal

    From Eben King@21:1/5 to mick.crane on Tue Apr 1 01:10:02 2025
    On 3/31/25 17:36, mick.crane wrote:
    Xfce4
    I've loads of Perl scripts dotted about in different directories I'd
    like to select them in Thunar and run them in a terminal with a click or
    two.
    "Open terminal here" in Xfce desktop is very handy but still have to
    list the directory contents, find the one I want and type or paste it's
    name.
    Is there a way to get Thunar to run selected file in a terminal?
    mick


    Right click -> "Open with" -> "Open with other application" -> Xterm
    works. I think after the first time you do this, the terminal emulator
    you use will become default. ICBW. ISTM that XFCE Terminal should work
    as well, but it just gives me the "working" cursor for a few seconds.
    Be warned that while this will run in the terminal emulator, it won't
    stop at the end. The window with vanish as soon as the program exits.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to mick.crane on Tue Apr 1 01:30:01 2025
    On 3/31/25 14:36, mick.crane wrote:
    Xfce4
    I've loads of Perl scripts dotted about in different directories I'd
    like to select them in Thunar and run them in a terminal with a click or
    two.
    "Open terminal here" in Xfce desktop is very handy but still have to
    list the directory contents, find the one I want and type or paste it's
    name.
    Is there a way to get Thunar to run selected file in a terminal?
    mick


    I added a Custom Action to Thunar as follows:


    Thunar -> Edit -> Configure custom actions...

    + (Add a new custom action)


    Pop-up dialog "Custom Actions"

    Basic
    Name Run
    Description Run an executable file in xterm
    Command xterm -e "/usr/bin/env %f ; read -p 'Press Enter to close
    terminal'"
    Keyboard Shortcut None
    uncheck Use Startup Notification
    Icon No icon

    Appearance Conditions
    File Pattern *
    Appears if selection contains
    check Other Files

    OK

    x (Close dialog window)


    Thunar -> navigate to directory containing executable file

    Right-click on file -> Run


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roland Mueller@21:1/5 to All on Thu Apr 10 11:30:01 2025
    When starting the terminal with some command from command line one can add
    the -H flag to keep the terminal open. This way the window does not close
    after completion of the command but it cannot be used for running commands.

    /usr/bin/xfce4-terminal -H -x /path/to/mycommand.sh

    ti 1.4.2025 klo 2.57 Eben King (eben@gmx.us) kirjoitti:



    On 3/31/25 17:36, mick.crane wrote:
    Xfce4
    I've loads of Perl scripts dotted about in different directories I'd
    like to select them in Thunar and run them in a terminal with a click or two.
    "Open terminal here" in Xfce desktop is very handy but still have to
    list the directory contents, find the one I want and type or paste it's name.
    Is there a way to get Thunar to run selected file in a terminal?
    mick


    Right click -> "Open with" -> "Open with other application" -> Xterm
    works. I think after the first time you do this, the terminal emulator
    you use will become default. ICBW. ISTM that XFCE Terminal should work
    as well, but it just gives me the "working" cursor for a few seconds.
    Be warned that while this will run in the terminal emulator, it won't
    stop at the end. The window with vanish as soon as the program exits.



    <div dir="ltr"><div>When starting the terminal with some command from command line one can add the -H flag to keep the terminal open. This way the window does not close after completion of the command but it cannot be used for running commands.</div><div>
    <br></div>/usr/bin/xfce4-terminal     -H     -x /path/to/mycommand.sh</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">ti 1.4.2025 klo 2.57 Eben King (<a href="mailto:eben@gmx.us">eben@gmx.us</a>) kirjoitti:<
    </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>

    On 3/31/25 17:36, mick.crane wrote:<br>
    &gt; Xfce4<br>
    &gt; I&#39;ve loads of Perl scripts dotted about in different directories I&#39;d<br>
    &gt; like to select them in Thunar and run them in a terminal with a click or<br>
    &gt; two.<br>
    &gt; &quot;Open terminal here&quot; in Xfce desktop is very handy but still have to<br>
    &gt; list the directory contents, find the one I want and type or paste it&#39;s<br>
    &gt; name.<br>
    &gt; Is there a way to get Thunar to run selected file in a terminal?<br>
    &gt; mick<br>


    Right click -&gt; &quot;Open with&quot; -&gt; &quot;Open with other application&quot; -&gt; Xterm<br>
    works.  I think after the first time you do this, the terminal emulator<br> you use will become default.  ICBW.  ISTM that XFCE Terminal should work<br> as well, but it just gives me the &quot;working&quot; cursor for a few seconds.<br>
    Be warned that while this will run in the terminal emulator, it won&#39;t<br> stop at the end.  The window with vanish as soon as the program exits.<br>

    </blockquote></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eben King@21:1/5 to Roland Mueller on Sat Apr 12 23:10:03 2025
    On 4/10/25 05:26, Roland Mueller wrote:
    When starting the terminal with some command from command line one can add the -H flag to keep the terminal open. This way the window does not close after completion of the command but it cannot be used for running commands.

    /usr/bin/xfce4-terminal -H -x /path/to/mycommand.sh

    Neat, thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)