Error run share-wsl-ports.xsh

Hello …

For some time now, I’ve been getting these messages when starting a Torizon IDE project.

* Executing task: xonsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/firmwares/lmn/LmnOverRpmsgTester/.conf/share-wsl-ports.xsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/firmwares/lmn/LmnOverRpmsgTester 
* The terminal process failed to launch: Cannot launch a terminal process in an untrusted workspace with cwd /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/firmwares/lmn/LmnOverRpmsgTester and userHome /home/carlton.

When I run the script in the terminal, there’s no error message. This is a bit confusing.

Also, I’m developing remotely on a separate Ubuntu 22.04 system… no WSL.
Is there a solution for this?

Best
Gerald Koss

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help! Could you let me know which OS and version you are using?

The error you’re encountering appears to be related to VS Code’s workspace trust settings rather than a Torizon-specific issue. However, to provide the most accurate guidance for your Torizon IDE project setup, I need to understand your platform configuration better.

Could you please run the tdx-info command on your target device and share the output? This will help me understand your hardware and OS configuration. You can find more information about this command at Getting Device Information with Tdx-Info | Toradex Developer Center

Additionally, please let me know:

  • Which version of Torizon OS you’re running on your target device
  • Your SoM and carrier board configuration

The share-wsl-ports.xsh script you mentioned is typically used for WSL environments(1), but since you’re developing on a native Ubuntu 22.04 system, this might be part of the issue. Once I understand your complete setup, I can provide more targeted troubleshooting steps.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

My VSCode runs on a mac os computer.
And the Torizon IDE is installed on an AMD64 Ubuntu.

The tdx-info is variable.

Thank you for the clarification! Now I understand your setup better.

Understanding the Issue

The error you’re encountering is related to VS Code’s workspace trust settings combined with the fact that you’re running VS Code on macOS while connecting to a remote Ubuntu system. The share-wsl-ports.xsh script is specifically designed for Windows WSL environments(1), so it’s not applicable to your macOS + remote Ubuntu setup.

Solution

Since you’re developing on macOS with a remote Ubuntu system, you don’t need the WSL port sharing functionality. Here’s how to resolve this:

1. Trust Your Workspace

First, ensure your VS Code workspace is trusted:

  • Open VS Code
  • Go to File > Preferences > Settings (or Code > Preferences > Settings on macOS)
  • Search for “trusted”
  • Make sure your project folder is in a trusted location

2. Disable WSL-Specific Tasks

The share-wsl-ports.xsh task is not needed for your setup. You can disable it by:

  • Opening your project’s .vscode/tasks.json file
  • Looking for any tasks related to share-wsl-ports
  • Either remove them or add a condition to skip them on non-WSL environments

3. Verify Your Project Setup

Since you mentioned the tdx-info is variable, please ensure you have:

  • A properly configured Torizon target device
  • The Torizon IDE Extension properly installed on your remote Ubuntu system
  • Your project created using one of the Torizon templates(1)

Next Steps

To provide more specific guidance, could you please share:

  1. Which version of Torizon OS you’re running on your target device
  2. Your SoM and carrier board configuration (you can get this with tdx-info on the target device)
  3. Whether you’re working with a single-container or multi-container project

The key point is that the WSL-specific scripts should not be running in your macOS + remote Ubuntu environment, and the workspace trust issue can be resolved through VS Code’s trust settings.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.