drag/drop gives wrong path in Canonical's Ubuntu profiles #18694

Open
opened 2026-01-31 06:21:36 +00:00 by claunia · 9 comments
Owner

Originally created by @Sandbox-125 on GitHub (Oct 15, 2022).

Description of the new feature/enhancement

While dragging a file into the terminal the path it generates becomes unusable in wsl. Shouldn't it generate the path from the mount point of wsl?

Proposed technical implementation details (optional)

Originally created by @Sandbox-125 on GitHub (Oct 15, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement While dragging a file into the terminal the path it generates becomes unusable in wsl. Shouldn't it generate the path from the mount point of wsl? <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Area-SettingsIssue-BugResolution-ExternalProduct-Terminal labels 2026-01-31 06:21:36 +00:00
Author
Owner

@j4james commented on GitHub (Oct 16, 2022):

This sounds like a duplicate of #1772.

@j4james commented on GitHub (Oct 16, 2022): This sounds like a duplicate of #1772.
Author
Owner

@DHowett commented on GitHub (Oct 17, 2022):

It would... but i'm not sure why that issue is still open (i'm betting that it's explained in the issue, and I haven't yet read it :P)
We do have path drag/drop translation for WSL. It only works when you are running a WSL profile that has been untouched by (say) Canonical's Ubuntu fragment.

@Sandbox-125 can you share your settings file? what profile are you using? what path are you expecting, and what path are you getting?

@DHowett commented on GitHub (Oct 17, 2022): It would... but i'm not sure why that issue is still open (i'm betting that it's explained in the issue, and I haven't yet read it :P) We _do_ have path drag/drop translation for WSL. It only works when you are running a WSL profile that has been untouched by (say) Canonical's Ubuntu fragment. @Sandbox-125 can you share your settings file? what profile are you using? what path are you expecting, and what path are you getting?
Author
Owner

@ghost commented on GitHub (Oct 21, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Oct 21, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@Sandbox-125 commented on GitHub (Oct 22, 2022):

@DHowett I'm running an untouched Ubuntu wsl profile.

This is the settings file 👉settings.txt. The path I'm expecting is /mnt/c/something.txt instead of C:\something.txt.

@Sandbox-125 commented on GitHub (Oct 22, 2022): @DHowett I'm running an untouched Ubuntu wsl profile. This is the settings file 👉[settings.txt](https://github.com/microsoft/terminal/files/9843651/settings.txt). The path I'm expecting is `/mnt/c/something.txt` instead of `C:\something.txt`.
Author
Owner

@zadjii-msft commented on GitHub (Oct 24, 2022):

Yep, that checks out. You're running the CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc Ubuntu profile, not the Windows.Terminal.Wsl one. We can't translate paths for the profiles that Canonical generates - we can only do it for the ones we generate. This is kinda a riff on #12961 - or, is the same root cause. We need to work out with them how they can better customize the existing WSL profiles rather than redefining their own.

@zadjii-msft commented on GitHub (Oct 24, 2022): Yep, that checks out. You're running the `CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc` Ubuntu profile, not the `Windows.Terminal.Wsl` one. We can't translate paths for the profiles that Canonical generates - we can only do it for the ones we generate. This is kinda a riff on #12961 - or, is the same root cause. We need to work out with them how they can better customize the existing WSL profiles rather than redefining their own.
Author
Owner

@zadjii-msft commented on GitHub (Oct 24, 2022):

Based on the existence of #14003, I'm gonna leave this open as a separate bug. I've got a running comment in https://github.com/microsoft/terminal/issues/14003#issuecomment-1247962707 tracking all sorts of issues that the Canonical profiles have.

@zadjii-msft commented on GitHub (Oct 24, 2022): Based on the existence of #14003, I'm gonna leave this open as a separate bug. I've got a running comment in https://github.com/microsoft/terminal/issues/14003#issuecomment-1247962707 tracking all sorts of issues that the Canonical profiles have.
Author
Owner

@Jaxkr commented on GitHub (Nov 17, 2023):

Hey @zadjii-msft and @DHowett, following up on this issue because it caused me a few hours of frustration.

I completely reinstalled WSL in an attempt to get a Windows.Terminal.Wsl source profile instead of a CanonicalGroup one. I tried everything, the Store version, installing from CLI, every possible way to get WSL Ubuntu. I could NOT get anything but the CanonicalGroup one.

Ended up giving up and switching to Debian and dragging files worked perfectly again.

My question: Is it even possible to install an Ubuntu profile that works correctly with file translation? If so, how?

@Jaxkr commented on GitHub (Nov 17, 2023): Hey @zadjii-msft and @DHowett, following up on this issue because it caused me a few hours of frustration. I completely reinstalled WSL in an attempt to get a `Windows.Terminal.Wsl` source profile instead of a CanonicalGroup one. I tried everything, the Store version, installing from CLI, every possible way to get WSL Ubuntu. I could NOT get anything but the CanonicalGroup one. Ended up giving up and switching to Debian and dragging files worked perfectly again. My question: Is it even possible to install an Ubuntu profile that works correctly with file translation? If so, how?
Author
Owner

@zadjii-msft commented on GitHub (Nov 17, 2023):

I completely reinstalled WSL in an attempt to get a Windows.Terminal.Wsl source profile

I'd reckon what transpired, is that the terminal left a "tombstone" entry in the state.json file (which lives next to settings.json). At some point, we determined that the ubuntu distro didn't exist, but we erroneously marked it as deleted. Basically, you're seeing #14061.

You could clear out the profile guids from state.json, and the profile will probably re-generate.

@zadjii-msft commented on GitHub (Nov 17, 2023): > I completely reinstalled WSL in an attempt to get a `Windows.Terminal.Wsl` source profile I'd reckon what transpired, is that the terminal left a "tombstone" entry in the `state.json` file (which lives next to `settings.json`). At some point, we determined that the ubuntu distro didn't exist, but we erroneously marked it as deleted. Basically, you're seeing #14061. You could clear out the profile guids from `state.json`, and the profile will probably re-generate.
Author
Owner

@Jaxkr commented on GitHub (Nov 18, 2023):

You could clear out the profile guids from state.json, and the profile will probably re-generate.

This worked. Reinstalled ubuntu after doing this and my Penguin-icon-having Ubuntu with working path translation was back. It was hidden from the dropdown by default but it came back!

Thanks for all the work you do on Windows Terminal. I used to use ConEmu but I've switched over completely.

@Jaxkr commented on GitHub (Nov 18, 2023): > You could clear out the profile guids from `state.json`, and the profile will probably re-generate. This worked. Reinstalled ubuntu after doing this and my Penguin-icon-having Ubuntu with working path translation was back. It was hidden from the dropdown by default but it came back! Thanks for all the work you do on Windows Terminal. I used to use ConEmu but I've switched over completely.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18694