-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added lxlstartup.cmd, for Windows 11's WSL2 with systemd enabled
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@rem lxlstartup.cmd: | ||
@rem for Windows 11's WSL2 with systemd enabled | ||
@rem executed when a user logging in | ||
@rem this file, or its shortcut, should be in the user's StartUp folder: | ||
@rem (%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) | ||
|
||
@rem use smaller window | ||
@mode con:cols=66 lines=10 | ||
@set PROMPT=# | ||
|
||
@rem start putty pageant | ||
@set PUTTYDIR=%USERPROFILE%\WinUtils\puttyall | ||
@set KEYDIR=%USERPROFILE%\WinUtils\puttyall\Keys | ||
@start /b %PUTTYDIR%\PAGEANT.EXE %KEYDIR%\mykey.ppk | ||
|
||
@rem trigger wsl using execmd of nircmd (https://www.nirsoft.net/utils/nircmd.html) | ||
@rem "nircmd execmd" runs a cmd with hidden cmd window | ||
@rem "wsl ~" starts WSL session and steys there to avoid WSL's automatic stop | ||
@set NIRCMD=%USERPROFILE%\WinUtils\nircmd\NirCmd.exe | ||
@start /b %NIRCMD% execmd wsl ~ | ||
|