Sublime Forum

Unable to start sublime_text with wslg.exe

#1

My intention is to be able to create a windows 10 shortcut that utilizes wslg.exe (included in a new WSL2 install) to open a sublime text instance that has been installed on the WSL’s Ubuntu-22.04 distribution (which is the default). I noticed a similar issue posted here for sublime_merge.

Here is my ldd output:

$ ldd /opt/sublime_text/sublime_text
        linux-vdso.so.1 (0x00007fffeabf7000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f877524f000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f877524a000)
        libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f87751ea000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f87750b0000)
        libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f8775029000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8774ee7000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8774e00000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8774de0000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8774ddb000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8774bb2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8775e01000)
        libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007f8774ba5000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8774b2d000)
        libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f8774a75000)
        libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f8774a41000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f8774a17000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8774a11000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f8774a07000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f87749ef000)
        libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f87749e2000)

Here is the shortcut command:

"C:\Program Files\WSL\wslg.exe" -d Ubuntu-22.04 --cd "~" -- /opt/sublime_text/sublime_text

Running sublime_text from an already running WSL terminal works as expected. Also, using wslg.exe in a similar fashion works for things like VLC, nautilus, xeyes, etc.

0 Likes