Skip to content

Commit

Permalink
added lxlstartup.cmd, for Windows 11's WSL2 with systemd enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ElTopo committed Sep 15, 2023
1 parent b556527 commit 2502595
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lxlstartup.cmd
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 ~

0 comments on commit 2502595

Please sign in to comment.