johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.27k stars 288 forks source link

Running it on WSL and WSL2 #617

Closed Include-sys closed 3 years ago

Include-sys commented 3 years ago

Describe the bug Hello, in WSL(Windows Subsystem for Linux) version 1 It doesn't work exactly because of usage of memfd and this is WSL issue actually, but I wanted to say it anyway.

But in WSL version 2 there is a bug but I'm not sure It's because of WSL or Foliate. A X Server working on Windows and I can open GUI applications. Foilate opens fine but when I try to open a book this message shown in terminal screen,

(WebKitWebProcess:2): Gtk-WARNING **: 14:00:09.857: cannot open display: 172.21.96.1:0 Unable to init server: Could not connect: Connection refused

I tried to install older versions of foliate and It seems version 2.1.1 works fine.

To Reproduce Steps to reproduce the behavior: Enable WSL and Virtual Machine Platform from Windows Features, Install WSL2 update from https://docs.microsoft.com/en-us/windows/wsl/install-win10 In Powershell type wsl set-default-version 2 to enable WSL2. Install Ubuntu from Microsoft Store On Windows install VcXsrv from https://sourceforge.net/projects/vcxsrv/ At the launch of XLaunch(VcXSrv) check "Disable access control" at Extra Options page. When you are on Ubuntu, export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 and launch the Foliate and try to open Catalog or a book.

Expected behavior Books should open.

Screenshots foliate

Working version, image

Version:

Include-sys commented 3 years ago

I compiled it without sandboxing support and It works now.

image

archisman-panigrahi commented 3 years ago

@Include-sys How did you compile it without sanboxing support?

Include-sys commented 3 years ago

@apandada1 https://github.com/johnfactotum/foliate/issues/115#issuecomment-718192275