setting up xonsh to run by default?

383 views
Skip to first unread message

Brandon Marzolf

unread,
Apr 21, 2018, 9:36:07 AM4/21/18
to xonsh
I just found out about xonsh last night because I follow r/linuxmasterrace and this meme came up


..and I was curious about xonsh all of a suddon. Watched the presentation from pycon 2016 and then i installed it. Been playing with it all morning. The big draw, other than the python nativeness and ease of settings is that it's supposed to be cross platform. I use Linux at home, but must use windows at work.

First question is on Linux, how to load xonsh as the default shell. I'm so used to bash just loading by default.

Second, how do I go about setting the same thing up on windows?

Gil Forsyth

unread,
Apr 21, 2018, 10:28:15 AM4/21/18
to Brandon Marzolf, xonsh
Hey Brandon,

That meme is hilarious, thanks for forwarding it. 

On Linux, you first have to add the full path to wherever xonsh is installed to your `/etc/shells` file.
Then you can use the `chsh` command to change your default shell to xonsh.

Re: Windows, others may be able to chime in, but I think you'll need to install a new terminal emulator.  I know that melund, one of our windows devs, uses cmder or conemu and likes that.  There's some info in our docs about windows setup that can hopefully get you started in the right direction: http://xon.sh/windows.html

-Gil

--
You received this message because you are subscribed to the Google Groups "xonsh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xonsh+unsubscribe@googlegroups.com.
To post to this group, send email to xo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xonsh/6e0a8879-f622-4241-ab38-528775683f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brandon Marzolf

unread,
Apr 22, 2018, 9:44:47 AM4/22/18
to xonsh
I used pip to install xonsh, it looks like it put it in my anaconda/bin folder in my home directory. In anaconda/bin there is a xonsh and a xon.sh. I have tried using both of those as a defualt shell through chsh -s /home/brandon/anaconda/bin/xonsh and then i tried /xon.sh and both gave me the error "not a valid login shell". So where is the real xonsh? Why can't it just be in /bin/xonsh like the rest of the shells?


On Saturday, April 21, 2018 at 10:28:15 AM UTC-4, Gil Forsyth wrote:
Hey Brandon,

That meme is hilarious, thanks for forwarding it. 

On Linux, you first have to add the full path to wherever xonsh is installed to your `/etc/shells` file.
Then you can use the `chsh` command to change your default shell to xonsh.

Re: Windows, others may be able to chime in, but I think you'll need to install a new terminal emulator.  I know that melund, one of our windows devs, uses cmder or conemu and likes that.  There's some info in our docs about windows setup that can hopefully get you started in the right direction: http://xon.sh/windows.html

-Gil
On Sat, Apr 21, 2018 at 9:36 AM, Brandon Marzolf <brandon...@gmail.com> wrote:
I just found out about xonsh last night because I follow r/linuxmasterrace and this meme came up


..and I was curious about xonsh all of a suddon. Watched the presentation from pycon 2016 and then i installed it. Been playing with it all morning. The big draw, other than the python nativeness and ease of settings is that it's supposed to be cross platform. I use Linux at home, but must use windows at work.

First question is on Linux, how to load xonsh as the default shell. I'm so used to bash just loading by default.

Second, how do I go about setting the same thing up on windows?

--
You received this message because you are subscribed to the Google Groups "xonsh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xonsh+un...@googlegroups.com.

Gil Forsyth

unread,
Apr 22, 2018, 9:59:04 AM4/22/18
to Brandon Marzolf, xonsh
Hi Brandon,

So the full path to the executable also needs to be in `/etc/shells` before `chsh` will allow you to change to it.  For your anaconda install, that would mean that
`/home/brandon/anaconda/bin/xonsh` should be in `/etc/shells/`

You can also certainly create a symlink to `xonsh` to `/bin/xonsh` -- you would then have to add the path to the symlink to `/etc/shells` before `chsh` will work

I hope that helps!

To unsubscribe from this group and stop receiving emails from it, send an email to xonsh+unsubscribe@googlegroups.com.

To post to this group, send email to xo...@googlegroups.com.

Brandon Marzolf

unread,
Apr 23, 2018, 7:49:23 AM4/23/18
to xonsh
Ha, yeah now I feel silly, just had a typo...

So another question if I may, how do I get the tab-complete function to be case-insensitive?

Gil Forsyth

unread,
Apr 23, 2018, 10:01:01 AM4/23/18
to Brandon Marzolf, xonsh
Hi Brandon, 

Glad that's sorted. For case insensitive completions set 

$CASE_SENSITIVE_COMPLETIONS=False

Anthony Scopatz

unread,
Apr 23, 2018, 10:27:58 AM4/23/18
to Gil Forsyth, Brandon Marzolf, xonsh
Hi Brandon,

Thanks for the image!  Also, to add to Gil's comment, here is the link to the docs: http://xon.sh/envvars.html#case-sensitive-completions

Be Well
Anthony


For more options, visit https://groups.google.com/d/optout.
--

Asst. Prof. Anthony Scopatz
Nuclear Engineering Program
Mechanical Engineering Dept.
University of South Carolina
sco...@cec.sc.edu
Office: (803) 777-9334
Cell: (512) 827-8239
Office: Horizon 1, #011 (ground floor, not first)
Book a meeting with me at https://scopatz.youcanbook.me/
Open up an issue: https://github.com/scopatz/me/issues
Check my calendar

Brandon Marzolf

unread,
Apr 23, 2018, 2:12:18 PM4/23/18
to xonsh
Thank you, that was quite helpful!
Reply all
Reply to author
Forward
0 new messages