Giter VIP home page Giter VIP logo

Comments (14)

sedwards2009 avatar sedwards2009 commented on June 9, 2024

It is having trouble finding your cygwin installation directory. It looks in the windows registry at
HKLM\SOFTWARE\Cygwin\setup\rootdir to see if the installer recorded the dir there. If that fails it also looks for cygwin in the default Babun install location ($user_home/.babun/cygwin or something).

I'm cooking up some code now so that people can explicitly say as a command option where cygwin is located. It shouldn't take long.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024
2016-03-17 20:43:56.415 DEBUG [main #0] Found cygwin installation: C:\cygwin64

Is this lying?

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

@Freaky Is there or was there ever, a cygwin installation in C:\cygwin64? It sounds reasonable. That is the default installation directory if you use the installer.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024

There is.

To be clear, here's the full backtrace:

TypeError: Cannot read property 'cygwinDir' of null
at Object.factory (C:\extraterm-0.5.0-win32-x64\resources\app\src\ptyproxy.js:106:52)
at main (C:\extraterm-0.5.0-win32-x64\resources\app\src\main.js:49:40)
at Object.<anonymous> (C:\extraterm-0.5.0-win32-x64\resources\app\src\main.js:584:1)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (C:\extraterm-0.5.0-win32-x64\resources\app\main.js:8:1)

This hack in ptyproxy.js lets the app launch, albeit I don't actually get a shell, just a "Welcome to Extraterm!":

var sessionProfile = config.expandedProfiles[0];
var pythonExe = findCygwinPython("c:\\cygwin64");

My lack of config would explain why sessionProfile would be null.

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

OK, it just looks like it can't find cygwin.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024

So why does it say "Found cygwin installation"?

Lack of shell is tracked down to the dummy passwd file I made because for some reason cygwin setup didn't make one.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024

Yup, that's it - duff passwd file causes sessionProfile to be null. Fixing that lets me roll back my hack.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024

And this would explain why it's missing and how to generate them if needed: https://stackoverflow.com/questions/28573763/i-am-unable-to-find-the-etc-passwd-file-in-cygwin

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

I wonder if it is worth the effort to check for a nonsense value from /etc/passwd and then default to /bin/bash.

from extraterm.

Freaky avatar Freaky commented on June 9, 2024

To be clear, the initial error was there being no /etc/passwd, because cygwin doesn't create one any more.

You should really be using getpwent(3) and friends rather than poking at it directly.

from extraterm.

nathan-sain avatar nathan-sain commented on June 9, 2024

extraterm also finds my cygwin directory.

2016-03-17 16:46:41.589 DEBUG [main #0] Found cygwin installation: C:\cygwin64

My issue may be related to you parsing the passwd file. I changed my home directory path in the passwd file to point outside of the C:\cygwin64 directory.

UCA:unused:1000:513:U-9J88PS1\UCA,S-1-5-21-1060225852-1179717075-1491434510-1000:/cygdrive/k/home:/bin/bash

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

Cygwin doesn't create a /etc/passwd anymore?? I guess that is possible.

I would use getpwent() if I had it but Electron (and Extraterm) are not cygwin applications on Windows so they don't have direct access to cygwin's compatibility layer. It doesn't even have direct access to a PTY. This is why is uses Python in cygwin to act as a proxy. This python is inside the cygwin world and bridges the two.

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

I've spun this missing /etc/passwd problem into its own issue #9 .

from extraterm.

sedwards2009 avatar sedwards2009 commented on June 9, 2024

I think I've covered the problems discussed in this thread in other issues. v0.6.0 will have these cygwin related fixes.

closing.

from extraterm.

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.