mirror of
https://github.com/mintty/wsltty.git
synced 2025-01-18 03:55:49 +00:00
updates for release 0.7.0
This commit is contained in:
parent
81b586a86a
commit
ae637e4645
39
README.md
39
README.md
@ -3,31 +3,36 @@ Mintty as a terminal for Bash on Ubuntu on Windows / WSL.
|
||||
### Overview ###
|
||||
|
||||
Run the [installer](https://github.com/mintty/wsltty/releases) to install
|
||||
* wsltty package components (see below) in the user’s application directory (where WSL is also installed)
|
||||
* wsltty package components (see below) in the user’s application folder (where WSL is also installed)
|
||||
* an empty wsltty “home directory” to enable storage of a mintty config file
|
||||
* a Desktop Shortcut and a Start Menu Shortcut to start WSL with a login bash in the *Windows user profile* directory; to start in the Linux home directory instead, add a `cd` command to your Linux `$HOME/.profile` script
|
||||
* context menu entries for Windows Explorer to start WSL with a bash in the respective directory
|
||||
* a script `wsl.bat` to invoke wsltty manually; copy the script from `%LOCALAPPDATA%\wsltty` to `%SYSTEMROOT%\System32` if desired
|
||||
* Start Menu and Desktop shortcuts to start a WSL bash (with some variations, see below)
|
||||
* optional context menu entries for Windows Explorer to start a WSL bash in the respective folder, installable from the Start Menu subfolder
|
||||
* `wsl*.bat` scripts to invoke wsltty manually (with some variations and invocation options, see below)
|
||||
* an uninstall script that can be invoked manually to remove shortcuts and context menu entries
|
||||
|
||||
### Configuration ###
|
||||
|
||||
#### Command line scripts wsl.bat and wsl~.bat ####
|
||||
#### Command line scripts wsl*.bat ####
|
||||
|
||||
* To enable invocation of this script from WIN+R or from cmd.exe,
|
||||
copy it from `%LOCALAPPDATA%\wsltty` into `%SYSTEMROOT%\System32`.
|
||||
(The package does not do this to avoid trouble with missing admin privileges.)
|
||||
* To start the terminal in the current directory when calling the script from the command line,
|
||||
modify it (or a copy for this purpose) and remove the final `-l` parameter.
|
||||
* To enforce starting in your Linux home directory, do *either* of:
|
||||
* On Linux side, add a `cd` command to your `$HOME/.profile`.
|
||||
* Use `wsl~.bat` instead of `wsl.bat` (or rename it as desired).
|
||||
WSLtty installs the following scripts in its application folder `%LOCALAPPDATA%\wsltty`:
|
||||
* `wsl.bat` to start a WSL bash in the current folder/directory
|
||||
* `wsl~.bat` to start a WSL bash in the WSL user home
|
||||
* `wsl-l.bat` to start a WSL login bash
|
||||
|
||||
#### Desktop shortcut and Start menu shortcut ####
|
||||
To enable invocation of these scripts from WIN+R or from cmd.exe,
|
||||
copy them from `%LOCALAPPDATA%\wsltty` into `%SYSTEMROOT%\System32`,
|
||||
renaming them as desired.
|
||||
(The package does not do this to avoid trouble with missing admin privileges.)
|
||||
|
||||
To enforce starting in your Linux home directory, do *either* of:
|
||||
* On Linux side, add a `cd` command to your `$HOME/.profile`.
|
||||
* Use the shortcut `Bash ~ on UoW in Mintty` instead.
|
||||
#### Start Menu and Desktop shortcuts ####
|
||||
|
||||
The Start Menu subfolder WSLtty offers three shortcuts:
|
||||
* `WSL Bash % in Mintty` to start a WSL bash in the Windows %USERPROFILE% home
|
||||
* `WSL Bash ~ in Mintty` to start a WSL bash in the WSL user home
|
||||
* `WSL Bash -l in Mintty` to start a WSL login bash
|
||||
|
||||
To ensure a login bash to start in your Linux home directory,
|
||||
add a `cd` command to your `$HOME/.profile` on Linux side.
|
||||
|
||||
#### Mintty settings ####
|
||||
|
||||
|
Binary file not shown.
BIN
WSL Bash ~ in Mintty.lnk
Executable file
BIN
WSL Bash ~ in Mintty.lnk
Executable file
Binary file not shown.
39
add to context menu.bat
Normal file
39
add to context menu.bat
Normal file
@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
|
||||
rem See comments in install.bat about changing the installation directory.
|
||||
|
||||
set installdir=%LOCALAPPDATA%\wsltty
|
||||
|
||||
rem Explorer context menu
|
||||
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
|
||||
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell
|
||||
|
||||
rem WSL in Mintty
|
||||
set label=WSL in Mintty
|
||||
rem set here=in this directory
|
||||
set here=Here
|
||||
|
||||
rem WSL icon
|
||||
set icon=%LOCALAPPDATA%\lxss\bash.ico
|
||||
|
||||
rem WSL target shell
|
||||
set shell=/bin/bash
|
||||
|
||||
rem Mintty invocation
|
||||
set cmd=%installdir%\bin\mintty.exe
|
||||
set cset=-o Locale=C -o Charset=UTF-8
|
||||
set opts=--wsl
|
||||
set arg=/bin/wslbridge -t %shell%
|
||||
set target0=\"%cmd%\" %opts% %cset% -i \"%icon%\" %arg%
|
||||
rem set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" /bin/dash -c \"cd '%%1'; exec %arg%\"
|
||||
set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" --dir \"%%1\" %arg%
|
||||
|
||||
rem Registry entries
|
||||
reg add "%userdirname%\wsltty" /d "%label% %here%" /f
|
||||
reg add "%userdirname%\wsltty" /v Icon /d "%icon%" /f
|
||||
reg add "%userdirname%\wsltty\command" /d "%target1%" /f
|
||||
reg add "%userdirpane%\wsltty" /d "%label% %here%" /f
|
||||
reg add "%userdirpane%\wsltty" /v Icon /d "%icon%" /f
|
||||
reg add "%userdirpane%\wsltty\command" /d "%target0%" /f
|
||||
|
||||
:end
|
59
install.bat
59
install.bat
@ -1,9 +1,10 @@
|
||||
rem @echo off
|
||||
@echo off
|
||||
|
||||
rem If you change the installation directory,
|
||||
rem it also needs to be adapted in
|
||||
rem - the Shortcut links *.lnk
|
||||
rem - the cmd invocation scripts wsl*.bat
|
||||
|
||||
set installdir=%LOCALAPPDATA%\wsltty
|
||||
|
||||
|
||||
@ -16,9 +17,13 @@ copy uninstall.bat "%installdir%"
|
||||
|
||||
copy wsl.bat "%installdir%"
|
||||
copy wsl~.bat "%installdir%"
|
||||
copy wsl-l.bat "%installdir%"
|
||||
copy "add to context menu.bat" "%installdir%"
|
||||
copy "remove from context menu.bat" "%installdir%"
|
||||
rem does not work without admin rights:
|
||||
rem copy wsl.bat "%SYSTEMROOT%\System32"
|
||||
rem copy wsl~.bat "%SYSTEMROOT%\System32"
|
||||
rem copy wsl-l.bat "%SYSTEMROOT%\System32"
|
||||
|
||||
mkdir "%installdir%\bin"
|
||||
copy cygwin1.dll "%installdir%\bin"
|
||||
@ -35,48 +40,18 @@ mkdir "%installdir%\home\%USERNAME%"
|
||||
|
||||
:shortcuts
|
||||
|
||||
rem create Desktop Shorcut
|
||||
copy "Bash on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"
|
||||
copy "Bash ~ on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"
|
||||
rem create Start Menu Folder
|
||||
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
|
||||
mkdir "%smf%"
|
||||
copy "wsltty home & help.url" "%smf%"
|
||||
copy "WSL Bash % in Mintty.lnk" "%smf%"
|
||||
copy "WSL Bash ~ in Mintty.lnk" "%smf%"
|
||||
copy "WSL Bash -l in Mintty.lnk" "%smf%"
|
||||
mkdir "%smf%\context menu shortcuts"
|
||||
|
||||
rem create Start Menu Shortcut
|
||||
copy "Bash on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu"
|
||||
copy "Bash ~ on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu"
|
||||
|
||||
|
||||
:explorer
|
||||
|
||||
rem Explorer context menu
|
||||
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
|
||||
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell
|
||||
|
||||
rem WSL in Mintty
|
||||
set label=WSL in Mintty
|
||||
rem set here=in this directory
|
||||
set here=Here
|
||||
|
||||
rem WSL icon
|
||||
set icon=%LOCALAPPDATA%\lxss\bash.ico
|
||||
|
||||
rem WSL target shell
|
||||
set shell=/bin/bash
|
||||
|
||||
rem Mintty invocation
|
||||
set cmd=%installdir%\bin\mintty.exe
|
||||
set cset=-o Locale=C -o Charset=UTF-8
|
||||
set opts=--wsl
|
||||
set arg=/bin/wslbridge -t %shell%
|
||||
set target0=\"%cmd%\" %opts% %cset% -i \"%icon%\" %arg%
|
||||
rem set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" /bin/dash -c \"cd '%%1'; exec %arg%\"
|
||||
set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" --dir \"%%1\" %arg%
|
||||
|
||||
rem Registry entries
|
||||
reg add "%userdirname%\wsltty" /d "%label% %here%" /f
|
||||
reg add "%userdirname%\wsltty" /v Icon /d "%icon%" /f
|
||||
reg add "%userdirname%\wsltty\command" /d "%target1%" /f
|
||||
reg add "%userdirpane%\wsltty" /d "%label% %here%" /f
|
||||
reg add "%userdirpane%\wsltty" /v Icon /d "%icon%" /f
|
||||
reg add "%userdirpane%\wsltty\command" /d "%target0%" /f
|
||||
rem create Desktop Shorcuts
|
||||
copy "WSL Bash % in Mintty.lnk" "%USERPROFILE%\Desktop"
|
||||
copy "WSL Bash ~ in Mintty.lnk" "%USERPROFILE%\Desktop"
|
||||
|
||||
|
||||
:end
|
||||
|
12
makefile
12
makefile
@ -97,14 +97,10 @@ pkg: wslbridge mintty cygwin wsltty
|
||||
cp bin/mintty.exe rel/
|
||||
cp bin/wslbridge.exe rel/
|
||||
cp bin/wslbridge-backend rel/
|
||||
cp LICENSE.mintty rel/
|
||||
cp LICENSE.wslbridge rel/
|
||||
cp "Bash on UoW in Mintty.lnk" rel/
|
||||
cp "Bash ~ on UoW in Mintty.lnk" rel/
|
||||
cp wsl.bat rel/
|
||||
cp wsl~.bat rel/
|
||||
cp install.bat rel/
|
||||
cp uninstall.bat rel/
|
||||
cp LICENSE.* rel/
|
||||
cp *.lnk rel/
|
||||
cp *.url rel/
|
||||
cp *.bat rel/
|
||||
cd rel; iexpress /n wsltty.SED
|
||||
|
||||
#############################################################################
|
||||
|
22
makewinx.cfg
22
makewinx.cfg
@ -39,12 +39,17 @@ FILE3="wslbridge.exe"
|
||||
FILE4="wslbridge-backend"
|
||||
FILE5="LICENSE.mintty"
|
||||
FILE6="LICENSE.wslbridge"
|
||||
FILE7="Bash on UoW in Mintty.lnk"
|
||||
FILE8="Bash ~ on UoW in Mintty.lnk"
|
||||
FILE9="wsl.bat"
|
||||
FILE10="wsl~.bat"
|
||||
FILE11="install.bat"
|
||||
FILE12="uninstall.bat"
|
||||
FILE7="WSL Bash % in Mintty.lnk"
|
||||
FILE8="WSL Bash ~ in Mintty.lnk"
|
||||
FILE9="WSL Bash -l in Mintty.lnk"
|
||||
FILE10="wsl.bat"
|
||||
FILE11="wsl~.bat"
|
||||
FILE12="wsl-l.bat"
|
||||
FILE13="install.bat"
|
||||
FILE14="uninstall.bat"
|
||||
FILE15="add to context menu.bat"
|
||||
FILE16="remove from context menu.bat"
|
||||
FILE17="wsltty home & help.url"
|
||||
|
||||
[SourceFiles]
|
||||
SourceFiles0=.
|
||||
@ -63,4 +68,9 @@ SourceFiles0=.
|
||||
%FILE10%=
|
||||
%FILE11%=
|
||||
%FILE12%=
|
||||
%FILE13%=
|
||||
%FILE14%=
|
||||
%FILE15%=
|
||||
%FILE16%=
|
||||
%FILE17%=
|
||||
|
||||
|
12
remove from context menu.bat
Normal file
12
remove from context menu.bat
Normal file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
|
||||
:explorer context menu
|
||||
|
||||
rem delete Explorer context menu
|
||||
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
|
||||
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell
|
||||
|
||||
reg delete "%userdirname%\wsltty" /f
|
||||
reg delete "%userdirpane%\wsltty" /f
|
||||
|
||||
:end
|
@ -1,5 +1,25 @@
|
||||
@echo off
|
||||
|
||||
rem See comments in install.bat about changing the installation directory.
|
||||
|
||||
set installdir=%LOCALAPPDATA%\wsltty
|
||||
|
||||
|
||||
:shortcuts
|
||||
|
||||
rem delete Start Menu Folder
|
||||
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
|
||||
rmdir /S /Q "%smf%"
|
||||
|
||||
rem delete Desktop Shortcuts
|
||||
del "%USERPROFILE%\Desktop\WSL Bash % in Mintty.lnk"
|
||||
del "%USERPROFILE%\Desktop\WSL Bash ~ in Mintty.lnk"
|
||||
|
||||
|
||||
:explorer context menu
|
||||
|
||||
call "%installdir%\remove from context menu.bat"
|
||||
|
||||
|
||||
:undeploy
|
||||
|
||||
@ -7,23 +27,4 @@ rem currently not removing software
|
||||
rem in any case, at least the config file (home\...) should not be removed
|
||||
|
||||
|
||||
:shortcuts
|
||||
|
||||
rem delete Desktop Shortcut and Start Menu Shortcut
|
||||
del "%USERPROFILE%\Desktop\Bash on UoW in Mintty.lnk"
|
||||
del "%USERPROFILE%\Desktop\Bash ~ on UoW in Mintty.lnk"
|
||||
del "%APPDATA%\Microsoft\Windows\Start Menu\Bash on UoW in Mintty.lnk"
|
||||
del "%APPDATA%\Microsoft\Windows\Start Menu\Bash ~ on UoW in Mintty.lnk"
|
||||
|
||||
|
||||
:explorer
|
||||
|
||||
rem delete Explorer context menu
|
||||
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
|
||||
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell
|
||||
|
||||
reg delete "%userdirname%\wsltty" /f
|
||||
reg delete "%userdirpane%\wsltty" /f
|
||||
|
||||
|
||||
:end
|
||||
|
12
wsl-l.bat
Executable file
12
wsl-l.bat
Executable file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
|
||||
rem Start mintty terminal for WSL in home directory
|
||||
|
||||
rem To enable invocation of this script from WIN+R or from cmd.exe,
|
||||
rem you may want to copy this script into "%SYSTEMROOT%\System32"
|
||||
|
||||
rem You may want a variant of this script without trailing "-l"
|
||||
rem to start in the current directory from cmd.exe
|
||||
|
||||
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -t /bin/bash -l
|
||||
|
2
wsl.bat
2
wsl.bat
@ -8,5 +8,5 @@ rem you may want to copy this script into "%SYSTEMROOT%\System32"
|
||||
rem You may want a variant of this script without trailing "-l"
|
||||
rem to start in the current directory from cmd.exe
|
||||
|
||||
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -t /bin/bash -l
|
||||
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -t /bin/bash
|
||||
|
||||
|
2
wsltty home & help.url
Normal file
2
wsltty home & help.url
Normal file
@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=https://github.com/mintty/wsltty
|
2
wsl~.bat
2
wsl~.bat
@ -8,5 +8,5 @@ rem you may want to copy this script into "%SYSTEMROOT%\System32"
|
||||
rem You may want a variant of this script without trailing "-l"
|
||||
rem to start in the current directory from cmd.exe
|
||||
|
||||
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -C~ -t /bin/bash -l
|
||||
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -C~ -t /bin/bash
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user