[Basic usage]
The gnome-terminal command is used to open a new terminal, directly on the command line
$ gnome-terminal
You can open a new terminal with some common parameters:
Auto Maximize after open
$ gnome-terminal--maximize
full screen after opening
$ gnome-terminal--full-screen
Set Title
$ gnome-terminal--title= "new title"
open multiple terminals, multiple tabs
$ gnome-terminal--window--window #打开两个
$ gnome-terminal--window--tab--window--tab--tab #打开两个, first two tab, Second 3 tab
set open position and size (width x Height + left offset + offset above)
$ gnome-terminal--geometry=80x25+10+10
[Auto Execute command after start]
There are two parameters to implement this function,-e and-X, the two differences are:
-E can occur more than once, if in front of all--window, indicating that all windows and tabs work,
If you are behind--window or--tab, which means that only the tab is executed, be aware that only one parameter can be followed by-e
that is, if there are spaces, you need to use quotation marks, see the following example
- x can occur only once, and all content after-X is considered a command to execute, so a space can appear
These commands are executed for all tabs.
For example:
$ gnome-terminal-e ls
$ gnome-terminal-x ls
The results of both executions are the same, that is, the new terminal Flash is gone, there are several ways:
one is to modify the configuration of the terminal, right-click on the terminal point and select Profiles->profile Preferences
then find the title and command, there is a when command exits, followed by the selection of
Hold the terminal open and then you can
The second is to redirect the result to less so that it does not exit until it executes .
$ gnome-terminal-x ls|less
the third is to launch a bash inside bash
$ gnome-terminal-x bash-c "LS; EXEC bash "
$ Gnome-terminal-e ' bash-c "LS; EXEC bash "'
Note that the last command is EXEC bash, and if you write bash directly, it's equivalent to opening a child shell, so there's a
The disadvantage is that directly press the Close button, you will be prompted to run the program
It is important to note that the commands executed here are not valid for all configurations of the. BASHRC before calling. BASHRC.
=gnome-terminal Technique =[Reprint]