Quantcast
Channel: MobileRead Forums - Reading and Management
Viewing all articles
Browse latest Browse all 23783

Calibre on Ubuntu on Windows (WSL)

$
0
0
Although not apparent at first glance, this picture is calibre running on the Windows Subsystem for Linux.



Why?: Because you can
No really why?: Shit and giggles
Theoretical whys:
- test if your plugin works on linux
- use linux-only plugins (although as of this moment there is only one such plugin - recoll - and it should not be linux-only since recoll is also available on the windows platform).
- (very theoretical) I have a feeling that visual studio ptvsd will work better connecting to a linux remote debugger than it does with the source code on a local windows only environment. (more to come on that later if I manage it).

Environment:
- Windows 14965+
______________________________
/ Distributor ID: Ubuntu Description: \
| Ubuntu 16.04.1 LTS Release: 16.04 |
\ Codename: xenial /
-------------------------------------

How to do it.

Windows side:
- install VcXsrv (or Xming, but I used VcXrv)

Bash side:
- X11 forwarding
Code:

echo "export DISPLAY=:0.0" >> ~/.bashrc
- fix most dbus problems
Code:

sudo sed -i 's$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$' /etc/dbus-1/session.conf
- install calibre
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install -y calibre

- monotonic patch
for some reason, kovid's monotonic implementation crashes in this environment. replace it with pipy's own monotonic lib.
Code:

sudo mv /usr/lib/calibre/calibre/utils/monotonic.py /usr/lib/calibre/calibre/utils/monotonic.bak
sudo mv /usr/lib/calibre/calibre/utils/monotonic.pyc /usr/lib/calibre/calibre/utils/monotonic.bakc
sudo wget https://raw.githubusercontent.com/atdt/monotonic/master/monotonic.py

I mostly tested the UI. calibre-viewer, calibre-editor, calibre, etc.

There shouldn't be anything not obvious missing. I chose not to go into the obvious stuff like install xpdf to be able to view pdf files, etc.

Viewing all articles
Browse latest Browse all 23783

Trending Articles