Skip to content

Instantly share code, notes, and snippets.

@ACEMerlin
Created November 24, 2018 06:00
Show Gist options
  • Save ACEMerlin/0db059e6e055e3ef56e8ffde26b01f88 to your computer and use it in GitHub Desktop.
Save ACEMerlin/0db059e6e055e3ef56e8ffde26b01f88 to your computer and use it in GitHub Desktop.
Files that easy your life with X-server on windows
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory]
[HKEY_CURRENT_USER\Software\Classes\Directory\Background]
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell]
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\LinuxShell]
@="Open Linux shell here"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\LinuxShell\command]
@="wscript.exe \"E:\\wsl\\bat-launcher.vbs\" \"open-linux-shell-here\" \"%V\""
[HKEY_CURRENT_USER\Software\Classes\Directory\shell]
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\LinuxShell]
@="Open Linux shell here"
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\LinuxShell\command]
@="wscript.exe \"E:\\wsl\\bat-launcher.vbs\" \"open-linux-shell-here\" \"%V\""
If WScript.Arguments.Count <= 0 Then
WScript.Quit
End If
bat = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) & WScript.Arguments(0) & ".bat"
arg = ""
If WScript.Arguments.Count > 1 Then
arg = WScript.Arguments(1)
End If
CreateObject("WScript.Shell").Run """" & bat & """ """ & arg & """", 0, False
C:\Windows\System32\wscript.exe "E:\wsl\bat-launcher.vbs" "emacs"
@echo off
x410.exe /wm
REM "C:\Program Files\VcXsrv\vcxsrv.exe" -clipboard -wgl -nohostintitle -silent-dup-error -multiwindow -xkblayout us -xkbvariant dvorak
ubuntu1804.exe run "cd ~; export DISPLAY=127.0.0.1:0.0; /home/merlin/.spacemacs.d/script/ec"
@echo off
REM ### Start X410 in Windowed Apps Mode. If X410 is already running in Desktop Mode,
REM ### it'll be terminated first without any warning message box.
start /B x410.exe /wm
REM ### Setup a D-Bus instance that will be shared by all X-Window apps
ubuntu1804.exe run "sh -ic 'if [ -z \"$(pidof dbus-launch)\" ]; then export DISPLAY=127.0.0.1:0.0; dbus-launch --exit-with-x11; fi;'"
REM ### Go to the selected folder path and open your terminal app
ubuntu1804.exe run "cd \"$(wslpath '%1')\"; export DISPLAY=127.0.0.1:0.0; export GTK_THEME=Arc:dark; export GDK_SCALE=2; exec tilix"
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\LinuxShell]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\LinuxShell\command]
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\LinuxShell]
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\LinuxShell\command]
start /B x410.exe /desktop
ubuntu1804.exe run "if [ -z \"$(pidof xfce4-session)\" ]; then export DISPLAY=127.0.0.1:0.0; xfce4-session; pkill '(gpg|ssh)-agent'; fi;"
C:\Windows\System32\wscript.exe "E:\wsl\bat-launcher.vbs" "open-linux-shell-here" "E:\Documents"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment