Possible to start different shells in different desktop environments?
Is it possible to set different shells for different desktop environments? (I know the risks/complications of multiple DEs.)
My underlying core system is Tumbleweed with KDE. For that system, I've got zsh set up with a fancy Powerline prompt.
But I've also been experimenting with i3 lately, and I'd like it to start with bash instead, with a smaller font and a more generic prompt.
Is this possible?
Thanks.
shell kde opensuse desktop-environment i3
add a comment |
Is it possible to set different shells for different desktop environments? (I know the risks/complications of multiple DEs.)
My underlying core system is Tumbleweed with KDE. For that system, I've got zsh set up with a fancy Powerline prompt.
But I've also been experimenting with i3 lately, and I'd like it to start with bash instead, with a smaller font and a more generic prompt.
Is this possible?
Thanks.
shell kde opensuse desktop-environment i3
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,exec bash -il
or similar.
– Jeff Schaller
Dec 18 at 13:34
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34
add a comment |
Is it possible to set different shells for different desktop environments? (I know the risks/complications of multiple DEs.)
My underlying core system is Tumbleweed with KDE. For that system, I've got zsh set up with a fancy Powerline prompt.
But I've also been experimenting with i3 lately, and I'd like it to start with bash instead, with a smaller font and a more generic prompt.
Is this possible?
Thanks.
shell kde opensuse desktop-environment i3
Is it possible to set different shells for different desktop environments? (I know the risks/complications of multiple DEs.)
My underlying core system is Tumbleweed with KDE. For that system, I've got zsh set up with a fancy Powerline prompt.
But I've also been experimenting with i3 lately, and I'd like it to start with bash instead, with a smaller font and a more generic prompt.
Is this possible?
Thanks.
shell kde opensuse desktop-environment i3
shell kde opensuse desktop-environment i3
edited Dec 18 at 13:05
ctrl-alt-delor
10.8k41957
10.8k41957
asked Dec 18 at 12:42
Dito
132
132
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,exec bash -il
or similar.
– Jeff Schaller
Dec 18 at 13:34
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34
add a comment |
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,exec bash -il
or similar.
– Jeff Schaller
Dec 18 at 13:34
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,
exec bash -il
or similar.– Jeff Schaller
Dec 18 at 13:34
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,
exec bash -il
or similar.– Jeff Schaller
Dec 18 at 13:34
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34
add a comment |
1 Answer
1
active
oldest
votes
Yes, it is possible.
But one user only has one set of default applications.
Sure, you can create a new user and ssh to it (ssh user2@localhost) and make the default shell of that user bash (or other) but that is probably not what you meant.
Then the rub lies on deciding what will trigger the use of one shell or another.
Simple
You can just type bash -l
at the command prompt and start working with it.
Later (when/if needed) you can make this easier.
The -l
option will ensure a clean set of environment variables and the use of default configuration files like /etc/bash.bashrc
and ~/.bashrc
.
Easy
The easiest way is to use a different console application (gnome-terminal, konsole, xterm, etc) and configure it to start the shell you want on start. Assuming that you use konsole in KDE, and i3-sensible-terminal is the default for i3, you can configure gnome-terminal to load bash on start and use gnome-terminal as your terminal. Go to Edit --> Profile Preferences --> Command --> Run a custom command instead of my shell --> Custom command --> bash -l
.
Equivalent settings could be done with most other shell terminals.
Then it is just a matter of starting the related terminal to get either zsh or bash in any of the DM.
DM
If you have (or could install) wmctrl
, then, this line will tell you which DM is currently running:
wmctrl -m
From that, you can decide which profile to load in konsole:
case $(wmctrl -m| grep 'Name:') in
Name: i3) konsole --profile i3 ;;
Name: kde) konsole --profile kde ;;
esac
Of course, you need to edit the configuration for each profile like font size, colors, etc.
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
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%2f489681%2fpossible-to-start-different-shells-in-different-desktop-environments%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
Yes, it is possible.
But one user only has one set of default applications.
Sure, you can create a new user and ssh to it (ssh user2@localhost) and make the default shell of that user bash (or other) but that is probably not what you meant.
Then the rub lies on deciding what will trigger the use of one shell or another.
Simple
You can just type bash -l
at the command prompt and start working with it.
Later (when/if needed) you can make this easier.
The -l
option will ensure a clean set of environment variables and the use of default configuration files like /etc/bash.bashrc
and ~/.bashrc
.
Easy
The easiest way is to use a different console application (gnome-terminal, konsole, xterm, etc) and configure it to start the shell you want on start. Assuming that you use konsole in KDE, and i3-sensible-terminal is the default for i3, you can configure gnome-terminal to load bash on start and use gnome-terminal as your terminal. Go to Edit --> Profile Preferences --> Command --> Run a custom command instead of my shell --> Custom command --> bash -l
.
Equivalent settings could be done with most other shell terminals.
Then it is just a matter of starting the related terminal to get either zsh or bash in any of the DM.
DM
If you have (or could install) wmctrl
, then, this line will tell you which DM is currently running:
wmctrl -m
From that, you can decide which profile to load in konsole:
case $(wmctrl -m| grep 'Name:') in
Name: i3) konsole --profile i3 ;;
Name: kde) konsole --profile kde ;;
esac
Of course, you need to edit the configuration for each profile like font size, colors, etc.
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
add a comment |
Yes, it is possible.
But one user only has one set of default applications.
Sure, you can create a new user and ssh to it (ssh user2@localhost) and make the default shell of that user bash (or other) but that is probably not what you meant.
Then the rub lies on deciding what will trigger the use of one shell or another.
Simple
You can just type bash -l
at the command prompt and start working with it.
Later (when/if needed) you can make this easier.
The -l
option will ensure a clean set of environment variables and the use of default configuration files like /etc/bash.bashrc
and ~/.bashrc
.
Easy
The easiest way is to use a different console application (gnome-terminal, konsole, xterm, etc) and configure it to start the shell you want on start. Assuming that you use konsole in KDE, and i3-sensible-terminal is the default for i3, you can configure gnome-terminal to load bash on start and use gnome-terminal as your terminal. Go to Edit --> Profile Preferences --> Command --> Run a custom command instead of my shell --> Custom command --> bash -l
.
Equivalent settings could be done with most other shell terminals.
Then it is just a matter of starting the related terminal to get either zsh or bash in any of the DM.
DM
If you have (or could install) wmctrl
, then, this line will tell you which DM is currently running:
wmctrl -m
From that, you can decide which profile to load in konsole:
case $(wmctrl -m| grep 'Name:') in
Name: i3) konsole --profile i3 ;;
Name: kde) konsole --profile kde ;;
esac
Of course, you need to edit the configuration for each profile like font size, colors, etc.
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
add a comment |
Yes, it is possible.
But one user only has one set of default applications.
Sure, you can create a new user and ssh to it (ssh user2@localhost) and make the default shell of that user bash (or other) but that is probably not what you meant.
Then the rub lies on deciding what will trigger the use of one shell or another.
Simple
You can just type bash -l
at the command prompt and start working with it.
Later (when/if needed) you can make this easier.
The -l
option will ensure a clean set of environment variables and the use of default configuration files like /etc/bash.bashrc
and ~/.bashrc
.
Easy
The easiest way is to use a different console application (gnome-terminal, konsole, xterm, etc) and configure it to start the shell you want on start. Assuming that you use konsole in KDE, and i3-sensible-terminal is the default for i3, you can configure gnome-terminal to load bash on start and use gnome-terminal as your terminal. Go to Edit --> Profile Preferences --> Command --> Run a custom command instead of my shell --> Custom command --> bash -l
.
Equivalent settings could be done with most other shell terminals.
Then it is just a matter of starting the related terminal to get either zsh or bash in any of the DM.
DM
If you have (or could install) wmctrl
, then, this line will tell you which DM is currently running:
wmctrl -m
From that, you can decide which profile to load in konsole:
case $(wmctrl -m| grep 'Name:') in
Name: i3) konsole --profile i3 ;;
Name: kde) konsole --profile kde ;;
esac
Of course, you need to edit the configuration for each profile like font size, colors, etc.
Yes, it is possible.
But one user only has one set of default applications.
Sure, you can create a new user and ssh to it (ssh user2@localhost) and make the default shell of that user bash (or other) but that is probably not what you meant.
Then the rub lies on deciding what will trigger the use of one shell or another.
Simple
You can just type bash -l
at the command prompt and start working with it.
Later (when/if needed) you can make this easier.
The -l
option will ensure a clean set of environment variables and the use of default configuration files like /etc/bash.bashrc
and ~/.bashrc
.
Easy
The easiest way is to use a different console application (gnome-terminal, konsole, xterm, etc) and configure it to start the shell you want on start. Assuming that you use konsole in KDE, and i3-sensible-terminal is the default for i3, you can configure gnome-terminal to load bash on start and use gnome-terminal as your terminal. Go to Edit --> Profile Preferences --> Command --> Run a custom command instead of my shell --> Custom command --> bash -l
.
Equivalent settings could be done with most other shell terminals.
Then it is just a matter of starting the related terminal to get either zsh or bash in any of the DM.
DM
If you have (or could install) wmctrl
, then, this line will tell you which DM is currently running:
wmctrl -m
From that, you can decide which profile to load in konsole:
case $(wmctrl -m| grep 'Name:') in
Name: i3) konsole --profile i3 ;;
Name: kde) konsole --profile kde ;;
esac
Of course, you need to edit the configuration for each profile like font size, colors, etc.
answered Dec 18 at 15:05
Isaac
11.2k11648
11.2k11648
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
add a comment |
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
Excellent. I'm the only user on this machine. (There's only one other person in the household and she most definitely does not speak Linux). I'll try getting it set up shortly. Thanks.
– Dito
Dec 18 at 16:10
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f489681%2fpossible-to-start-different-shells-in-different-desktop-environments%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
Woops, deleted my original answer. Saw you were talking about the shell and not the terminal emulator. If you want to change font, change that in your terminal though.
– bgregs
Dec 18 at 13:12
Neat idea; I don't have i3 at hand, but I suspect you could put code in your shell's initialization file that checked parent processes for the existence of i3; if found,
exec bash -il
or similar.– Jeff Schaller
Dec 18 at 13:34
Maybe I am totally misreading it, but: are you using the same terminal emulator in both desktop environments? Which terminal emulator?
– fra-san
Dec 18 at 13:37
I didn't mention it, but I was planning on keeping a terminal reserved for the "fancy graphics" DE like KDE, on which I can show the glyphs for OS type, a clock icon, etc. And dedicating a separate terminal (they're small apps and I've got lots of storage) just for i3. I can set any terminal app as default in i3, that's easy even for a newbie like me. It's the shell and all the ($PS1) formatting I'd like to change automagically.
– Dito
Dec 18 at 14:34