Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Releases: xilun/cbwin

various improvements, fixes, and optimizations

30 Dec 00:54
Compare
Choose a tag to compare

This release introduces the following changes:

  • slashes are converted to backslashes in the module name, and it is also quoted if necessary
  • environment variable names are now properly handled in a case insensitive way
  • process termination when stdin is redirected is now slightly faster
  • the callers have been separated in two different binaries: one for wrun and one for wcmd/wstart (which executes wrun with an updated command line)
  • outbash.exe is now built with additional security checks (provided by MSVC 2015 and Windows 10)
  • MSVC's std::thread has been replaced with "mingw.thread.h", saving ~ 200kB in outbash.exe

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

convert absolute executable path to Win32 in wrun & better handling of Ctrl-C

28 Oct 20:48
Compare
Choose a tag to compare

wrun now converts absolute executable path in DriveFs to Win32 path, and also pass it to outbash.exe in a separated field. This lets use it instead of /init as a .exe interpreter on Windows Insider builds >= 14951. However, note that wrun still won't let spawned Win32 processes survive to its own death by default, so unless you have a special reason to want to do that I do not particularly recommend it. Also, the behavior has not changed for relative paths, and will not be very good in case of spaces in the executable path in this case...

Example (only for Windows Insider builds >= 14951):

$ sudo -s
# cd /proc/sys/fs/binfmt_misc
# echo -1 > WSLInterop
# echo ":WSLInterop:M::MZ::/usr/local/bin/wrun:" > register
# exit
$ export PATH="$PATH:/mnt/c/Windows/System32"
$ notepad.exe & ps x | grep notepad.exe | grep -v grep
2475 tty1     S      0:00 /usr/local/bin/wrun /mnt/c/Windows/System32/notepad.exe

Note that in Win 10 1607, you don't have the binfmt_misc feature in WSL. However, cbwin still runs perfectly well there if you invoke it explicitly (and future versions of cbwin will continue to target Win 10 1607).

EDIT: this release should also prevent Ctrl-C from closing the whole session when some Win32 console programs are running.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

use cwd of outbash.exe if not in DriveFs

22 Oct 13:12
Compare
Choose a tag to compare

This release uses the current directory of outbash.exe instead of failing if a launcher is not called from the DriveFs. This is to get the same behavior as MS interop introduced in Insider build 14951.

Note that adding an initial ':' param will still use the Windows home directory instead of the one that would have been used otherwise.

Also note that this release does not include the experimental feature about console mode switching that is in v0.10.1-beta, because this feature is not finished.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

Beta release: switch console modes between Win32 and WSL and ensure bash.exe ignores Ctrl-C

17 Oct 19:00
Compare
Choose a tag to compare

This is a beta release for people wanting to test console mode switching. This should improve compat with Win32 console programs, although the result is not perfect with interactive programs (especially on Win10 1607, it might be slightly better on the last Insider builds). In this version, the console mode switching heuristic is clearly not good for background use (wcmd win32_console_prog &, or Ctrl-Z then bg)

Install as usual...

I recommend to stick with version 0.10 unless you want to specifically test this new behavior (including the behavior of Ctrl-C).

fix multi-user security & add --help in the clients

20 Aug 16:03
Compare
Choose a tag to compare

This release fixes a security issue; it was possible to intercept stdin/stdout/stderr redirections. See #30 for details.

This release also introduces an --help option in the wcmd/wstart/wrun commands.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Note that this release changes the protocol between outbash.exe and the wcmd/wstart/wrun callers. You must update both.

Enjoy!

improve reliability of process launch

01 Aug 19:18
Compare
Choose a tag to compare
Pre-release

This release works around spurious failures of process startup due to an internal Windows error in the function retrieving the list of TCP connections (see #17, see also https://social.msdn.microsoft.com/Forums/en-US/e8eaa270-8662-4202-bac4-2b4930b5bde9/getextendedtcptable-sometimes-returns-0xc0000001 ).

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

EDIT: WARNING: A security risk when used on multi-user computers has been discovered after this release (see #30). It is fixed in v0.10.

outbash.exe is now signed with Authenticode

30 Jul 01:54
Compare
Choose a tag to compare

Starting from this release, outbash.exe will be signed with Authenticode.

There are no other changes between v0.7 and v0.8.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

EDIT: WARNING: A security risk when used on multi-user computers has been discovered after this release (see #30). It is fixed in v0.10.

multi-user security

26 Jul 22:26
Compare
Choose a tag to compare
multi-user security Pre-release
Pre-release

Starting from this release, the user of caller processes is checked.

Also, by default %SystemRoot%\system32\bash.exe will be used, and an option has been added to override it if needed (--outbash-launcher <your_bash.exe>)

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

EDIT: WARNING: A security risk when used on multi-user computers has been discovered after this release (see #30). It is fixed in v0.10.

improvements for other consoles and ptys + syntax to run from %USERPROFILE%

02 Jul 14:59
Compare
Choose a tag to compare

Starting from this release, redirections are forced when launching from a pty (they are not when launching from the Windows Console, as usual). To cover the use case described in #11, the callers also try to fallback to the port number saved in ~/.config/cbwin/outbash_port if the OUTBASH_PORT environment variable does not exists. ~/.config/cbwin/outbash_port is set if you launch outbash.exe with --outbash-session as its first param.

A syntax to launch from the %USERPROFILE% directory has also been added - ex: wstart : notepad. This is useful to launch something while in a VolFs cwd in WSL.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!

job suspend/resume support + set OUTBASH_PORT for non-interactive bash

28 Jun 21:59
Compare
Choose a tag to compare

This release adds support of job suspend/resume (ctrl-Z, fg). The suspension is now propagated to outbash, which suspends the corresponding Win32 processes of the job. Likewise, when the WSL caller (wcmd or wrun) resumes, the corresponding Win32 processes are also resumed. (Suspension does not apply to the target program launched with wstart, only potentially to the transient cmd that is about to launch it.)

Also, the way the environment variable OUTBASH_PORT is setup has changed and now it is always set, whereas previously it was only set for interactive non-login shells.

To install from the binary archive, copy outbash.exe where you want.

Launch a "Bash on Ubuntu on Windows" session with outbash.exe, and from your unpacked archive directory launch sudo ./install.sh (this will put the WSL wcmd/wstart/wrun commands in /usr/local/bin)

Enjoy!