From b16ad854c8d7a8043f509a81102b188c86ff8f9e Mon Sep 17 00:00:00 2001 From: gignsky Date: Wed, 20 Sep 2023 11:54:27 -0400 Subject: [PATCH 1/4] updated README.md to show hotfix for problems with WSL Remote Sessions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 417903d..8e68081 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,12 @@ If you run into any errors or have feature requests, please [open an issue](http Calling out known issues can help limit users opening duplicate issues against your extension. --> +## Notes on use with Windows Subsystem for Linux (WSL) + +If you are running Activity Watcher on your windows machine but work in vscode inside a WSL remote window aw-watcher-vscode will attempt to connect to the aw-server via localhost:5600 but since WSL runs on a different subnet than your windows machine port-forwarding IS required. + +This can be accomplished by locating the "PORTS" view under `View > Open View > Ports` and selecting `Add Port` then typing in `5600` (no quotes), this should auto-forward the WSL subnet's localhost port of 5600 to your Windows machines `localhost:5600` and show an origin of `User Forwarded`. + ## Release Notes ### 0.5.0 From 6c1947060cfa15f7dc51d5a4add7d146fb7a28db Mon Sep 17 00:00:00 2001 From: gignsky Date: Wed, 20 Sep 2023 12:23:06 -0400 Subject: [PATCH 2/4] added a permanent solution to the problem and cleaned up markdown --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8e68081..2f600a1 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,19 @@ Calling out known issues can help limit users opening duplicate issues against y ## Notes on use with Windows Subsystem for Linux (WSL) +#### Problem If you are running Activity Watcher on your windows machine but work in vscode inside a WSL remote window aw-watcher-vscode will attempt to connect to the aw-server via localhost:5600 but since WSL runs on a different subnet than your windows machine port-forwarding IS required. +#### Temporary Solution This can be accomplished by locating the "PORTS" view under `View > Open View > Ports` and selecting `Add Port` then typing in `5600` (no quotes), this should auto-forward the WSL subnet's localhost port of 5600 to your Windows machines `localhost:5600` and show an origin of `User Forwarded`. +#### Permanent Solution +With the above described solution it is necessary to do so on each and every vscode workspace you open. If you would like to avoid having to manually forward the port each time you can follow the two simple steps listed below to permanently forward port `5600` to localhost. + +1. In your WSL shell run the command `ip a` and take note of WSL's IP Address, this will most likely be one of two IPs that appears, the 127.0.0.1 address is the loopback address and should NOT be used, take note of the other IP as it will be used in step two. +2. Open powershell on your windows machine with admin privileges and run the following command, while remembering to replace `WSL_IP` with the IP address noted in step 1. + - `netsh interface portproxy add v4tov4 listenport=5600 connectport=5600 connectaddress=[WSL_IP]` + ## Release Notes ### 0.5.0 From 2a29fcd6ef93f29155e9ed03443cabba253b5e2e Mon Sep 17 00:00:00 2001 From: gignsky Date: Wed, 20 Sep 2023 12:24:58 -0400 Subject: [PATCH 3/4] docs: update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2f600a1..4439828 100644 --- a/README.md +++ b/README.md @@ -52,13 +52,13 @@ Calling out known issues can help limit users opening duplicate issues against y ## Notes on use with Windows Subsystem for Linux (WSL) -#### Problem +#### Problem If you are running Activity Watcher on your windows machine but work in vscode inside a WSL remote window aw-watcher-vscode will attempt to connect to the aw-server via localhost:5600 but since WSL runs on a different subnet than your windows machine port-forwarding IS required. -#### Temporary Solution +#### Temporary Solution This can be accomplished by locating the "PORTS" view under `View > Open View > Ports` and selecting `Add Port` then typing in `5600` (no quotes), this should auto-forward the WSL subnet's localhost port of 5600 to your Windows machines `localhost:5600` and show an origin of `User Forwarded`. -#### Permanent Solution +#### Permanent Solution With the above described solution it is necessary to do so on each and every vscode workspace you open. If you would like to avoid having to manually forward the port each time you can follow the two simple steps listed below to permanently forward port `5600` to localhost. 1. In your WSL shell run the command `ip a` and take note of WSL's IP Address, this will most likely be one of two IPs that appears, the 127.0.0.1 address is the loopback address and should NOT be used, take note of the other IP as it will be used in step two. From 63272570ec9a665f0a6a0c4936f2ad992b367ec6 Mon Sep 17 00:00:00 2001 From: gignsky Date: Wed, 20 Sep 2023 13:15:06 -0400 Subject: [PATCH 4/4] docs: update README.md to fix possible bug --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4439828..879b245 100644 --- a/README.md +++ b/README.md @@ -59,11 +59,12 @@ If you are running Activity Watcher on your windows machine but work in vscode i This can be accomplished by locating the "PORTS" view under `View > Open View > Ports` and selecting `Add Port` then typing in `5600` (no quotes), this should auto-forward the WSL subnet's localhost port of 5600 to your Windows machines `localhost:5600` and show an origin of `User Forwarded`. #### Permanent Solution -With the above described solution it is necessary to do so on each and every vscode workspace you open. If you would like to avoid having to manually forward the port each time you can follow the two simple steps listed below to permanently forward port `5600` to localhost. +With the above described solution it is necessary to do so on each and every vscode workspace you open. If you would like to avoid having to manually forward the port each time you can follow the step listed below to permanently forward port `5600` to localhost. -1. In your WSL shell run the command `ip a` and take note of WSL's IP Address, this will most likely be one of two IPs that appears, the 127.0.0.1 address is the loopback address and should NOT be used, take note of the other IP as it will be used in step two. -2. Open powershell on your windows machine with admin privileges and run the following command, while remembering to replace `WSL_IP` with the IP address noted in step 1. - - `netsh interface portproxy add v4tov4 listenport=5600 connectport=5600 connectaddress=[WSL_IP]` +1. Open powershell on your windows machine with admin privileges and run the following command. + - `netsh interface portproxy add v4tov4 listenport=5600 connectport=5600 connectaddress=*` + + - NOTE: If `connectaddress` is set to the WSL IP address rather than `*` it will cause aw-server to fail to start. ## Release Notes