I am looking for a way to be able to create an icon in the "Launcher' toolbar for a custom instance of Terminal.
I was wondering if there is a way to add to (edit) the launcher button in the "Command:" field which currently shows "gnome-terminal"
to be able to automatically load specific text into the terminal command field <username>:~$
where every time you launch this button for the terminal it loads up a terminal with specified text already typed out for you.
Example:
1.) Hit custom terminal launcher button
2.) Opens terminal window
3.) Terminal commandline reads <username>:~$ <specifed text command>
I don't want it to excute the command because I need to be able to type a suffix onto the end of the specified text.
Also I would like that when the command is executed by hitting enter, that when the command is complete that it reloads that same specified text again which is <username>:~$ <specifed text command> from the example above.
Hopefully this makes sense and can be done.
Thank You for any help offered.
Terminal - Way to automatically load a predefined command
Forum rules
Before you post please read how to get help
Before you post please read how to get help
-
- Level 1
- Posts: 25
- Joined: Mon Apr 30, 2018 11:40 am
-
- Level 1
- Posts: 25
- Joined: Mon Apr 30, 2018 11:40 am
Re: Terminal - Way to automatically load a predefined command
If you go into Terminal menu bar and select
Edit - Preferences
Then select "Profiles" and select the "Command" tab at top
there are some options such as
"run a custom command instead" and "when command exits"
that seem like they might have to do with what I am looking for but not sure what to enter in the field?
Edit - Preferences
Then select "Profiles" and select the "Command" tab at top
there are some options such as
"run a custom command instead" and "when command exits"
that seem like they might have to do with what I am looking for but not sure what to enter in the field?
Re: Terminal - Way to automatically load a predefined command
you could a write a script that opens a termimal and waits or "reads" your text input and when you hit enter it runs the command with your text as a parameter.