Execute script in new gnome-terminal loading bashrc
I have a script in a gnome-terminal shell and I would like to open a new terminal, load the bashrc configuration, execute a new script and avoid the closure of the new terminal window.
I have tried to execute this commands:
gnome-terminal -x bash
the script above open a new shell and loads bashrc, but I don't know how to execute a script automatically.
gnome-terminal -x ./new_script.sh
the script above open a new shell and execute the script but doesn't load bashrc and close the window.
The result that I would like to obtain is to feel like opening a new terminal as clicking the term icon but execute a script after the bashrc setup.
bash shell-script terminal gnome-terminal bashrc
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a script in a gnome-terminal shell and I would like to open a new terminal, load the bashrc configuration, execute a new script and avoid the closure of the new terminal window.
I have tried to execute this commands:
gnome-terminal -x bash
the script above open a new shell and loads bashrc, but I don't know how to execute a script automatically.
gnome-terminal -x ./new_script.sh
the script above open a new shell and execute the script but doesn't load bashrc and close the window.
The result that I would like to obtain is to feel like opening a new terminal as clicking the term icon but execute a script after the bashrc setup.
bash shell-script terminal gnome-terminal bashrc
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a script in a gnome-terminal shell and I would like to open a new terminal, load the bashrc configuration, execute a new script and avoid the closure of the new terminal window.
I have tried to execute this commands:
gnome-terminal -x bash
the script above open a new shell and loads bashrc, but I don't know how to execute a script automatically.
gnome-terminal -x ./new_script.sh
the script above open a new shell and execute the script but doesn't load bashrc and close the window.
The result that I would like to obtain is to feel like opening a new terminal as clicking the term icon but execute a script after the bashrc setup.
bash shell-script terminal gnome-terminal bashrc
I have a script in a gnome-terminal shell and I would like to open a new terminal, load the bashrc configuration, execute a new script and avoid the closure of the new terminal window.
I have tried to execute this commands:
gnome-terminal -x bash
the script above open a new shell and loads bashrc, but I don't know how to execute a script automatically.
gnome-terminal -x ./new_script.sh
the script above open a new shell and execute the script but doesn't load bashrc and close the window.
The result that I would like to obtain is to feel like opening a new terminal as clicking the term icon but execute a script after the bashrc setup.
bash shell-script terminal gnome-terminal bashrc
bash shell-script terminal gnome-terminal bashrc
asked Jan 31 '17 at 11:05
CyrCyr
1
1
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
gnome-terminal -e command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole
there is a --noclose
flag.
In xterm
, there is a -hold
flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title
. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
Thanks! But I don't see the bashrc output when I rungnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?
– Cyr
Jan 31 '17 at 11:32
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341431%2fexecute-script-in-new-gnome-terminal-loading-bashrc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
gnome-terminal -e command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole
there is a --noclose
flag.
In xterm
, there is a -hold
flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title
. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
Thanks! But I don't see the bashrc output when I rungnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?
– Cyr
Jan 31 '17 at 11:32
add a comment |
gnome-terminal -e command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole
there is a --noclose
flag.
In xterm
, there is a -hold
flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title
. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
Thanks! But I don't see the bashrc output when I rungnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?
– Cyr
Jan 31 '17 at 11:32
add a comment |
gnome-terminal -e command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole
there is a --noclose
flag.
In xterm
, there is a -hold
flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title
. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
gnome-terminal -e command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole
there is a --noclose
flag.
In xterm
, there is a -hold
flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title
. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
edited Jan 31 '17 at 11:35
answered Jan 31 '17 at 11:12
Wissam RoujoulahWissam Roujoulah
2,853517
2,853517
Thanks! But I don't see the bashrc output when I rungnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?
– Cyr
Jan 31 '17 at 11:32
add a comment |
Thanks! But I don't see the bashrc output when I rungnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?
– Cyr
Jan 31 '17 at 11:32
Thanks! But I don't see the bashrc output when I run
gnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?– Cyr
Jan 31 '17 at 11:32
Thanks! But I don't see the bashrc output when I run
gnome-terminal -e ./new_script.sh --window-with-profile=my_profile
. Have I forgotten something?– Cyr
Jan 31 '17 at 11:32
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341431%2fexecute-script-in-new-gnome-terminal-loading-bashrc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown