Comments (7)
👍 I can not use tmux with cbwin right now.
from cbwin.
@HeathNaylor yep, I thought about that precisely when trying tmux :)
from cbwin.
I think an extra background outbash.exe should be automatically started by the first interactive one, and somehow kept running at least until WSL is shut down (not only all interactive outbash.exe; really the whole WSL session). Both ports of interactive and background outbash.exe would be communicated to the WSL session. Then, if the caller is not on a "real" console, it would not only force redirections but also use the background outbash.exe port. Also if the caller is on a real console but has no interactive port, only a session port, it should also force redirections.
However such a behavior presents a security risk if users only want to temporarily allow callback of Win32 from WSL, because they could not be aware that it might continue to be possible after all their interactive outbash.exe sessions are finished (if WSL is not stopped either because it still runs bash.exe sessions, or for other reasons) -- therefore a systray icon might be a good idea to indicate that the background process is running.
from cbwin.
Also a flag shall be provided to launch an interactive outbash.exe without starting (if it does not exist) a session one.
from cbwin.
Also, at least in a first time, the console window of the background outbash.exe shall be kept, preferably hidden but with an option through the systray icon to display it again, so that traces of the background process can be seen (for now they are exclusively emitted to stderr).
from cbwin.
Also a flag shall be provided to launch an interactive outbash.exe without starting (if it does not exist) a session one.
Problem: the lack of a mandatory background session outbash.exe would render it difficult for the caller to choose which port to use in case there is no stdfd to a real console. Unfortunately connect() to a localhost closed port fails only after a 1s timeout (why???), which makes it not a good idea to try to fallback on another port; we must know the "good" one beforehand.
So to fix that pb, the caller must also know if it is in an outbash.exe with the backgroundless option -- in which case the env var (interactive) will be used if it exists; otherwise the env var will only be used if it exists and if the caller is on a "real" console.
from cbwin.
I think a new --outbash-daemon
option is necessary, just write ~/.config/cbwin/outbash_port
and run in background without running any bash.exe process.
--outbash-session
also works, but I need to write a .js script to hide outbash.exe, and a bash is always running in WSL.
var ws = new ActiveXObject("WScript.Shell");
ws.Run("outbash.exe --outbash-session", 0, false);
from cbwin.
Related Issues (20)
- wrun: can't translate a WSL VolFs path to a Win32 one HOT 7
- Default command handler HOT 10
- some win32 console programs "sometimes" do line feed instead of new line, but a workaround seems possible HOT 1
- a cmd-like behavior distinguishing between console / GUI target programs might be useful HOT 1
- backgrounded & force redirected caller => SIGTTIN
- Use double quotes to prevent word splitting may be better HOT 12
- Problem with arguments containing the character "&" HOT 1
- wcmd cmd no longer laggy, but eats characters HOT 1
- Let cbwin in session mode launch multiple wcmd instances in parallel HOT 11
- sockets for redirections are not using any security HOT 6
- wstart /mnt/c/windows does not work HOT 7
- Not work inside zsh HOT 14
- behavior of environment variable inconsistent in regards to case sensitivity HOT 1
- No terminal support HOT 6
- Vagrant output doesn't wrap correctly HOT 4
- interactive win32 console programs are broken (input and output) HOT 5
- Native Windows support for launching Windows applications HOT 1
- Some inputted characters skipped in Docker interactive terminal HOT 1
- Starting parameters for bash.exe
- Can't remove cbwin from my pc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbwin.