My bash prompt is not working in `screen`
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
On RedHat, screen
resets my bash prompt. I set PS1=u@h:w
in ~/.bashrc
and ~/.bash_profile
.
I added shell -$SHELL
as well to ~/.screenrc
.
But, when I open a brand new terminal window, the prompt is correct, except in screen
.
In screen
I always get this prompt format: u@h>
How can I set the same prompt in screen
?
bash gnu-screen prompt
add a comment |
On RedHat, screen
resets my bash prompt. I set PS1=u@h:w
in ~/.bashrc
and ~/.bash_profile
.
I added shell -$SHELL
as well to ~/.screenrc
.
But, when I open a brand new terminal window, the prompt is correct, except in screen
.
In screen
I always get this prompt format: u@h>
How can I set the same prompt in screen
?
bash gnu-screen prompt
add a comment |
On RedHat, screen
resets my bash prompt. I set PS1=u@h:w
in ~/.bashrc
and ~/.bash_profile
.
I added shell -$SHELL
as well to ~/.screenrc
.
But, when I open a brand new terminal window, the prompt is correct, except in screen
.
In screen
I always get this prompt format: u@h>
How can I set the same prompt in screen
?
bash gnu-screen prompt
On RedHat, screen
resets my bash prompt. I set PS1=u@h:w
in ~/.bashrc
and ~/.bash_profile
.
I added shell -$SHELL
as well to ~/.screenrc
.
But, when I open a brand new terminal window, the prompt is correct, except in screen
.
In screen
I always get this prompt format: u@h>
How can I set the same prompt in screen
?
bash gnu-screen prompt
bash gnu-screen prompt
edited Sep 12 '13 at 8:27
jasonwryan
50.8k14135190
50.8k14135190
asked Sep 12 '13 at 8:21
user2013619user2013619
100115
100115
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I became so tired of the different startup files for shells that I do this:
- Create a file
~/.shrc
and put all my config in it (including the prompt setting) - In
~/.profile
,~/.bashrc
,~/.bash_profile
and whatever file the shell might read, add this line. ~/.shrc
(note the dot) - And finally, forget all about the little details that I never quite grasp
In your case, I suspect that Bash wants ~/.profile
(a wild guess, because as stated above I never got to fully understand those startup files), so adding that might make it work.
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
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%2f90350%2fmy-bash-prompt-is-not-working-in-screen%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
I became so tired of the different startup files for shells that I do this:
- Create a file
~/.shrc
and put all my config in it (including the prompt setting) - In
~/.profile
,~/.bashrc
,~/.bash_profile
and whatever file the shell might read, add this line. ~/.shrc
(note the dot) - And finally, forget all about the little details that I never quite grasp
In your case, I suspect that Bash wants ~/.profile
(a wild guess, because as stated above I never got to fully understand those startup files), so adding that might make it work.
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
add a comment |
I became so tired of the different startup files for shells that I do this:
- Create a file
~/.shrc
and put all my config in it (including the prompt setting) - In
~/.profile
,~/.bashrc
,~/.bash_profile
and whatever file the shell might read, add this line. ~/.shrc
(note the dot) - And finally, forget all about the little details that I never quite grasp
In your case, I suspect that Bash wants ~/.profile
(a wild guess, because as stated above I never got to fully understand those startup files), so adding that might make it work.
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
add a comment |
I became so tired of the different startup files for shells that I do this:
- Create a file
~/.shrc
and put all my config in it (including the prompt setting) - In
~/.profile
,~/.bashrc
,~/.bash_profile
and whatever file the shell might read, add this line. ~/.shrc
(note the dot) - And finally, forget all about the little details that I never quite grasp
In your case, I suspect that Bash wants ~/.profile
(a wild guess, because as stated above I never got to fully understand those startup files), so adding that might make it work.
I became so tired of the different startup files for shells that I do this:
- Create a file
~/.shrc
and put all my config in it (including the prompt setting) - In
~/.profile
,~/.bashrc
,~/.bash_profile
and whatever file the shell might read, add this line. ~/.shrc
(note the dot) - And finally, forget all about the little details that I never quite grasp
In your case, I suspect that Bash wants ~/.profile
(a wild guess, because as stated above I never got to fully understand those startup files), so adding that might make it work.
edited Apr 13 '17 at 12:36
Community♦
1
1
answered Sep 12 '13 at 10:15
phunehehephunehehe
12.3k1882141
12.3k1882141
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
add a comment |
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
Hello, I put "PS1=u@h:w" into: ~/.shrc, ~/.profile, but the screen still reset my prompt.
– user2013619
Sep 12 '13 at 14:13
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
@user2013619 try removing the PS1 settings from the other file if you're doing this.
– terdon♦
Sep 12 '13 at 14:36
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%2f90350%2fmy-bash-prompt-is-not-working-in-screen%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