Coder Social home page Coder Social logo

does not start a login shell about tabby HOT 13 CLOSED

eugeny avatar eugeny commented on July 16, 2024
does not start a login shell

from tabby.

Comments (13)

StrangeNoises avatar StrangeNoises commented on July 16, 2024

Half fixed. It As of alpha 15 it still isn't picking up the correct user's shell. For me it started up by default in /bin/sh and did not run my profile. However when I manually selected my actual shell /usr/local/bin/bash it did run the profile. The profile is in ~/.bash_profile so that may actually be appropriate (even though bin/sh is bash in reality). So the error is in not discovering my actual default shell.

/usr/local/bin/bash is in my /etc/shells, and as such is correctly listed in the list of shells in Settings, but despite being my default (as selected earlier using chsh) that isn't being picked up.

NB: Now running in High Sierra beta 1, but that seems to not be presenting any differences.

from tabby.

Eugeny avatar Eugeny commented on July 16, 2024

Have you upgraded with the config in place? If so, your previous shell choice will be used. There's a new "Default shell" option in the shell list, which is default for new installations, and will pick the shell from your /etc/passwd entry.

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

no, the high sierra upgrade on this machine failed so i ended up with a completely fresh installation. Since then I only just now installed terminus afresh to test this stuff since receiving an email notification (actually about the npm-discovery issue, related but this response was a bit off-topic to that hence putting it here).

I'm only now installing npm on this machine so will see in a bit (waiting for node to compile) about that specifically.

Right, /etc/passwd is, I think, not where you look for a user's default shell on macOS. I'd better power up my remaining Sierra machine in a bit to see if that's a change in High Sierra. But grep rachel /etc/passwd is not returning anything.

Little bit of googling, it appears this command can retrieve a user's shell:

(stand by, just realised splat-C for copy doesn't work, subject for another Issue if no-one else has already reported it...)

$ dscl localhost -read /Local/Default/Users/$USER shell
dsAttrTypeNative:shell: /usr/local/bin/bash

Confirmed, this is not new in High Sierra, but all applies in Sierra too.

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

NB: Discovered the dscl command via here: https://superuser.com/questions/379725/how-do-i-change-a-users-default-shell-in-osx#379726 discovered for myself sudo not needed just to read one's own settings.

from tabby.

Eugeny avatar Eugeny commented on July 16, 2024

Quite strange, I was testing it on my Sierra mac. I'm actually using dscl on macOS, /etc/passwd was just a brain fart :)
For some reason, your dscl output format is different - I'll check with a couple of other just Macs to be sure.

I'm tracking the Cmd-C issue in #61

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

curiouser and curiouser.

In checking something else I just tried setting the shell option back to "Default shell" and... now it's working. Beginning to think it was only not working on a completely fresh install, first-start... except it is now also working after I delete all terminus config I know about (~/Library/Application Support/terminus, ~/Library/Preferences/org.terminus*) and start up again.

BTW still not detecting npm. Can confirm homebrew npm is installed, in a path set up in /etc/paths, and thus read by /etc/profile and definitely in the $PATH visible to a default shell - now, as per the above. But that probably belongs in #4.

from tabby.

Eugeny avatar Eugeny commented on July 16, 2024

Can you please check the process' PATH by going into Settings > Open dev tools > Console and typing process.env.PATH? Thanks.

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

Result: "/usr/bin:/bin:/usr/sbin:/sbin"

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

didja really mean to close it?

from tabby.

Eugeny avatar Eugeny commented on July 16, 2024

Duh, this has completely slipped my mind - the app itself doesn't receive the $PATH from profile - only the one from launchd: https://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications

Can you check whether env -i bash -c -l "echo $PATH" contains your npm's path?

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

it does.

from tabby.

Eugeny avatar Eugeny commented on July 16, 2024

Hopefully this one will fix this once and for all

from tabby.

StrangeNoises avatar StrangeNoises commented on July 16, 2024

Apparently not, as of Alpha 18. process.env.PATH still "/usr/bin:/bin:/usr/sbin:/sbin".

from tabby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.