holepunchto / pear

combined Peer-to-Peer (P2P) Runtime, Development & Deployment tool
https://docs.pears.com/
Apache License 2.0
107 stars 10 forks source link

Two non-blocking issues when launching a pear desktop project from Windows Subsistem for Linux (WSL) #367

Open CastenettoA opened 1 week ago

CastenettoA commented 1 week ago

I followed the "Pear Deskop Chat App" tutorial from the docs on WSL2 (Windows subsystem for Linux 2, the most recent version).

Initially I have some issues on WSL that I solved. These issues partially prevented the project from behaving normally. Note: the installation of 'pear runtime' is archieved correctly without on my WSL problems.

Now that I can run the project correctly on WSL I share with you my simple fixes.

CASE 1 - libgbm.so.1 not installed

CASE 2 - Failed to connect to the bus

`Update packages and install D-Bus (if not already present)
sudo apt update
sudo apt install dbus

Start the D-Bus daemon
sudo service dbus start

Check the socket
ls /run/user/1000/bus

If the socket does not exist, start a D-Bus session
eval $(dbus-launch --sh-syntax)

`

My best, Andrea.

CastenettoA commented 1 week ago

I share that in Windows Subsystem for Linux (WSL 2) i follow this tutorial, making pear terminal app, and sadly I found a issue.

This the steps to try to reproduce the error:

  1. Follow in full this tutorial https://docs.pears.com/guides/making-a-pear-terminal-app
  2. Launch the app with pear run --dev . and open at least one more terminal with the key as input
  3. From the new terminal write a message
  4. Now the issue is visible: the new message is not shared with other connected peers and no error show up on console.

The version of pear is the 4444. Now I try directly on a Linux machine, maybe this is a problem with the structure of WSL2 itself. My best, andrea.

lejeunerenard commented 10 hours ago

@CastenettoA thank you for the details explanation and fixes! What linux distro and version were you using with WSL2? And was it a fresh installation or have you installed packages previously?