New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chsh does not recognize fish as a shell #669

Closed
ryanthejuggler opened this Issue Apr 18, 2013 · 16 comments

Comments

Projects
None yet
@ryanthejuggler

ryanthejuggler commented Apr 18, 2013

According to this page:

All Debian shell packages should insert the name of their binary into the shells file; if they do not this is a bug.

The make install command ought to do this automatically. As it is, chsh throws the error:

chsh: /usr/local/bin/fish is an invalid shell
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 18, 2013

It went smoothly for me on OS X 10.8.3 (Mountain Lion). Which are you running?

ghost commented Apr 18, 2013

It went smoothly for me on OS X 10.8.3 (Mountain Lion). Which are you running?

@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey Apr 18, 2013

Member

If you install using the Debian packages, rather than compiling from source, fish will be added to /etc/shells. Supported Debian packages are at http://download.opensuse.org/repositories/home:/siteshwar/ and I support the PPA at https://launchpad.net/~zanchey/+archive/fishfish-snapshot .

make install probably shouldn't fiddle with anything outside $PREFIX.

Member

zanchey commented Apr 18, 2013

If you install using the Debian packages, rather than compiling from source, fish will be added to /etc/shells. Supported Debian packages are at http://download.opensuse.org/repositories/home:/siteshwar/ and I support the PPA at https://launchpad.net/~zanchey/+archive/fishfish-snapshot .

make install probably shouldn't fiddle with anything outside $PREFIX.

@ryanthejuggler

This comment has been minimized.

Show comment
Hide comment
@ryanthejuggler

ryanthejuggler Apr 18, 2013

I'm on Ubuntu 12.10. Not trying to be pedantic or anything; I assumed it would be a quick fix. If it violates best practices though you can mark this bug as wontfix.

ryanthejuggler commented Apr 18, 2013

I'm on Ubuntu 12.10. Not trying to be pedantic or anything; I assumed it would be a quick fix. If it violates best practices though you can mark this bug as wontfix.

@lcowell

This comment has been minimized.

Show comment
Hide comment
@lcowell

lcowell Apr 18, 2013

Can you confirm that you have added /usr/local/bin/fish to your /etc/shells file ? I ran in to this issue as well.

lcowell commented Apr 18, 2013

Can you confirm that you have added /usr/local/bin/fish to your /etc/shells file ? I ran in to this issue as well.

@ryanthejuggler

This comment has been minimized.

Show comment
Hide comment
@ryanthejuggler

ryanthejuggler Apr 18, 2013

Ahh, perhaps I should clarify.

Installing using make install does not add fish to /etc/shells. I did add it manually and that allowed me to use fish just fine, but my bug report was to automate the process using the makefile. Since only the superuser can make install it would be simple to add a line to the makefile appending /usr/local/bin/fish to the shells file.

Sorry for any confusion.

ryanthejuggler commented Apr 18, 2013

Ahh, perhaps I should clarify.

Installing using make install does not add fish to /etc/shells. I did add it manually and that allowed me to use fish just fine, but my bug report was to automate the process using the makefile. Since only the superuser can make install it would be simple to add a line to the makefile appending /usr/local/bin/fish to the shells file.

Sorry for any confusion.

@adisbladis

This comment has been minimized.

Show comment
Hide comment
@adisbladis

adisbladis Apr 19, 2013

Contributor

@ryanthejuggler Bad idea.. Neither configure nor Makefile should modify anything outside of $PREFIX
This is something that should be done by the packager for the specific platform.
I made a pull request to fix exactly this type of behaviour just over a week ago: #655

This caveat is already in the "make install" output:

To use fish as your login shell:

  • add the line '/usr/local/bin/fish' to the file '/etc/shells'.
  • use the command 'chsh -s /usr/local/bin/fish'.

So maybe highlight that better, otherwise I feel this is a non-issue.

Contributor

adisbladis commented Apr 19, 2013

@ryanthejuggler Bad idea.. Neither configure nor Makefile should modify anything outside of $PREFIX
This is something that should be done by the packager for the specific platform.
I made a pull request to fix exactly this type of behaviour just over a week ago: #655

This caveat is already in the "make install" output:

To use fish as your login shell:

  • add the line '/usr/local/bin/fish' to the file '/etc/shells'.
  • use the command 'chsh -s /usr/local/bin/fish'.

So maybe highlight that better, otherwise I feel this is a non-issue.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Apr 21, 2013

Member

It might be reasonable to add a special target to the Makefile that would add it to /etc/shells/, as long as it is something that is run manually, and not part of the install target.

Member

ridiculousfish commented Apr 21, 2013

It might be reasonable to add a special target to the Makefile that would add it to /etc/shells/, as long as it is something that is run manually, and not part of the install target.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Apr 27, 2013

Member

We have a script build_tools/osx_package_scripts/add-shell that adds fish to /etc/shells. It should work fine on Linux.

Member

ridiculousfish commented Apr 27, 2013

We have a script build_tools/osx_package_scripts/add-shell that adds fish to /etc/shells. It should work fine on Linux.

@bpinto

This comment has been minimized.

Show comment
Hide comment
@bpinto

bpinto May 18, 2013

Contributor

I didn't know about the script, this is how I did it:

grep -q '^/usr/local/bin/fish$' /etc/shells; or echo '/usr/local/bin/fish' | sudo tee -a /etc/shells
Contributor

bpinto commented May 18, 2013

I didn't know about the script, this is how I did it:

grep -q '^/usr/local/bin/fish$' /etc/shells; or echo '/usr/local/bin/fish' | sudo tee -a /etc/shells
@onrea

This comment has been minimized.

Show comment
Hide comment
@onrea

onrea Mar 23, 2014

‍cat /etc/shells

# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/fish

Why the instruction says: /usr/local/bin/fish ?

onrea commented Mar 23, 2014

‍cat /etc/shells

# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/fish

Why the instruction says: /usr/local/bin/fish ?

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Mar 23, 2014

Member

/usr/local/bin is the usual install path. If you have fish installed somewhere else, then naturally the path in /etc/shells will be different.

Member

ridiculousfish commented Mar 23, 2014

/usr/local/bin is the usual install path. If you have fish installed somewhere else, then naturally the path in /etc/shells will be different.

@onrea

This comment has been minimized.

Show comment
Hide comment
@onrea

onrea Mar 24, 2014

@ridiculousfish
I've installed it this way:

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get install fish

onrea commented Mar 24, 2014

@ridiculousfish
I've installed it this way:

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get install fish
@siteshwar

This comment has been minimized.

Show comment
Hide comment
@siteshwar

siteshwar Mar 24, 2014

Member

We should update readme file to show how to switch to fish as default shell when it's installed through packages.

Member

siteshwar commented Mar 24, 2014

We should update readme file to show how to switch to fish as default shell when it's installed through packages.

@CoolOppo

This comment has been minimized.

Show comment
Hide comment
@CoolOppo

CoolOppo May 11, 2016

Contributor

This is still an issue to this day. I just had this problem, which led me back to this very old thread. I fixed it by adding fish to /etc/shells, but I agree with everybody that make install should automatically do this.

Contributor

CoolOppo commented May 11, 2016

This is still an issue to this day. I just had this problem, which led me back to this very old thread. I fixed it by adding fish to /etc/shells, but I agree with everybody that make install should automatically do this.

@faho

This comment has been minimized.

Show comment
Hide comment
@faho

faho May 11, 2016

Member

The README has been updated with a command to update /etc/shells.

make install should not do this, as it is also executed as part of packaging fish - it should not touch the system beyond $DESTDIR.

There is nothing more to do here for us. If you are a user, consider installing fish via packages or just add it to your shells file.

Member

faho commented May 11, 2016

The README has been updated with a command to update /etc/shells.

make install should not do this, as it is also executed as part of packaging fish - it should not touch the system beyond $DESTDIR.

There is nothing more to do here for us. If you are a user, consider installing fish via packages or just add it to your shells file.

@faho faho closed this May 11, 2016

@faho faho modified the milestones: fish-future, 2.3.0 Jun 9, 2016

@Trigun27

This comment has been minimized.

Show comment
Hide comment
@Trigun27

Trigun27 Apr 22, 2017

for me work this command usermod -s /usr/bin/fish username

Trigun27 commented Apr 22, 2017

for me work this command usermod -s /usr/bin/fish username

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment