vercel / pkg

Package your Node.js project into an executable
https://npmjs.com/pkg
MIT License
24.28k stars 1.01k forks source link

Node app is headless when run in Ubuntu #525

Closed alexanderson1993 closed 3 years ago

alexanderson1993 commented 5 years ago

In Ubuntu 18.04 Desktop, running the packaged Node app by double-clicking on the app causes the app to run in the background, completely headless with no way to close the app other than running a kill command. By contrast, on macOS and Windows, it opens up a terminal window and shows the stdout of the program. Closing the terminal window closes the app. Am I doing something wrong, or is that the expected behavior? By preference, I would like the Ubuntu version to open up terminal window when it is executed.

Worth noting: If the Node app is run from the terminal like ./my-app, it runs in that terminal window with the output, exactly the way I would expect it to when double-clicking on it.

alexanderson1993 commented 5 years ago

Also worth noting: I am using pkg@4.3.4

philippejadin commented 5 years ago

I confirm I have the same problem on latest mint. Anyone has an idea on how to get the terminal back ?

AndoGhevian commented 4 years ago

I wrote a package for this, maybe it can help you, I also wrote a usage example for pkg, here are the links - OpenTerm and Usage example with pkg.

Nashorn commented 3 years ago

having same issue

AndoGhevian commented 3 years ago

Hey @Nashorn, I mentioned the package above - OpenTerm, its written for the same reason, to run cli-apps in different platforms with different terminal emulators, and i created a project VT-pkg with the exact thing that you want, so that apps not run headless, and in the important-notes section i clarify what i do, Maybe its not clear, or there are some bug that you noticed, tell me if so, i will fix it. Sorry for mention this again, its not an advertising:)) I just trying to help.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] commented 3 years ago

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.