application startup on terminal/shell

Ralf Mardorf kde.lists at yahoo.com
Mon Oct 18 17:34:19 UTC 2021


On Mon, 18 Oct 2021 19:29:14 +0200, Ralf Mardorf wrote:
>On Mon, 18 Oct 2021 19:25:44 +0200, Ralf Mardorf wrote:
>>On Mon, 18 Oct 2021 13:01:50 -0400, Little Girl wrote:  
>>>you can edit the shortcut and add a command that
>>>launches neofetch before the command that launches the terminal,
>>>putting && between them to make sure that the terminal will
>>>only be launched if neofetch has already been launched.    
>>
>>Hi,
>>
>>I suspect the terminal needs to run first.
>>
>>Running
>>
>>terminal && neofetch
>>
>>might run neofetch after the terminal is closed, not while it's
>>running.
>>
>>However, my script example
>>
>>#!/bin/bash
>>
>>terminal-name.real "$@" & neofetch
>>
>>exit
>>
>>might start neofetch, before the terminal is ready. So it should be
>>something similar to
>>
>>#!/bin/bash
>>
>>terminal-name.real "$@" & sleep 2; neofetch
>>
>>exit
>>
>>Regards,
>>Ralf  
>
>Oops, I wrote nonsense.
>
>The terminal should provide a command line option to execute commands.
>
>#!/bin/bash
>
>terminal-name.real "$@" --execute neofetch
>
>exit
>
>Or similar ;).

terminal-name.real "$@" & sleep 2; neofetch

wouldn't run neofetch in the terminal

Roxterm provides -e, --execute,
xfce4-terminal provides -x, --execute, -e, --command=command, IIRC it
requires trail and error or reading man pages to use those execute
options. Sometimes it's a little bit tricky. However, I've done this a
thousand times, but nor with neofetch.




More information about the ubuntu-users mailing list