Conemu: How would I tell ConEmu to strip out the /mnt paths for WSL when opening it from the right click menu?

Created on 3 Feb 2018  路  1Comment  路  Source: Maximus5/ConEmu

Versions

ConEmu build: 180111 x64
OS version: Windows Latest Stable 2017 Fall Update x64
Used shell version: WSL (Ubuntu)

Preface

I set ConEmu to open a WSL terminal as my default terminal. It also defaults to my user's default directory on start. No problems here so far (/c/Users/Nick in my case).

I also have ConEmu integrated into my Windows right click menu, so if I right click anywhere within my C drive, it opens up at the location with a /c/XXX location. Again, no problem.

Problem

I keep most of my files on a different drive (e). As you know, you can access these files by going to /mnt/e within WSL and it all works.

But in my case, I set up a proper mount in WSL to map /mnt/e to /e by having this in my bashrc file: sudo mount --bind /mnt/e /e. So now if I cd /e, I end up in the same spot as /mnt/e and everything is cool.

But when I right click inside of my e folder, ConEmu always puts me in the /mnt/e path. This is standard behavior but how can I adjust ConEmu to always use /e instead?

This is a real problem because Docker requires you use /e instead of /mnt/e or its volume mounts won't work. I find myself having to manually cd into the non-/mnt version of the path all the time, which is both error prone and a nuisance.

other-wsl

Most helpful comment

You've reported this on wrong place.
https://github.com/Microsoft/WSL/issues/

When you start "ConEmu here" from Explorer, ConEmu doesn't force starting shell to change the working directory to certain folder, instead ConEmu process changes its own working directory to E:\... (there is no /mnt of course) and starting shell inherits this working folder.

So you shall ask Microsoft engineers how to eliminate /mnt from working folder. Tat is the only correct solution IMHO.

Alternatively you may try to force your shell to certain folder by shell startup command or even write a script in your ~/.profile stripping /mnt and do cd.

>All comments

You've reported this on wrong place.
https://github.com/Microsoft/WSL/issues/

When you start "ConEmu here" from Explorer, ConEmu doesn't force starting shell to change the working directory to certain folder, instead ConEmu process changes its own working directory to E:\... (there is no /mnt of course) and starting shell inherits this working folder.

So you shall ask Microsoft engineers how to eliminate /mnt from working folder. Tat is the only correct solution IMHO.

Alternatively you may try to force your shell to certain folder by shell startup command or even write a script in your ~/.profile stripping /mnt and do cd.

Was this page helpful?
0 / 5 - 0 ratings