Skip to content

Kiwix desktop on an USB Drive (Portable version)

Kelson edited this page Sep 13, 2019 · 2 revisions
Portable Kiwix Box

This documentation explains how to get a portable Kiwix on a USB flash drive, CD or DVD and launch it we a predefined set of ZIM files.

Needed

Principle

Kiwix Desktop uses a small XML file, called library.xml, to track which ZIM files are part of its internal library. By default, it will store both, ZIM files and library.xml, in the user directory which location depends on the OS:

  • On Windows, it is C:\Users\<your_user_name>\AppData\Roaming
  • On GNU/Linux, it is `/home/<your_user_name>/.local/share/kiwix
  • On GNU/Linux using Flatpak, it is /home/<your_user_name>/.var/app/org.kiwix.desktop/data/kiwix

But if a library.xml exists in the same directory than Kiwix Desktop executable (called kiwix-desktop or kiwix-desktop.exe depending on the version), then this library will be opened read only in place of the default one.

Steps

To begin, copy Kiwix Dekstop on the USB drive. Use the appimage for GNU/linux and for Windows, you will have to copy the entire directory (extracted from the ZIP file).

Then, you will have to create your custom library. ie. library.xml file. You have two ways...

With Kiwix manage

Kiwix manage is part of the Kiwix tools and allows you to manipulate a library.xml from a set a local ZIM files.

  • Copy your ZIM files on the USB drive (wherever you want)
  • Open a terminal and go inside the directory of the Kiwix Desktop executable
  • Run kiwix-manage library.xml add ZIM_FILE_1 ZIM_FILE_2

You will get a library.xml in the same directory than the Kiwix Desktop executable, pointing to the ZIM files in the USB drive.

With Kiwix desktop itself

As Kiwix Desktop can download and update the library.xml for you. It may be easier to use it. If your default library correspond to the files you want to put on your USB drive. You can simply copy the library.xml and all ZIM files in the user directory top the same directory than the Kiwix Desktop executable.

Else, you can temporary force Kiwix Desktop to use a different user directory with an environment variable. Kiwix Desktop will then create a new library.xml in your new location. You would then just have to copy the ZIM files you want to your USB drive.

To change the environment variable:

  • GNU/Linux : KIWIX_DATA_DIR=<a_directory> kiwix-desktop
  • Windows : set APPDATA=<a_directory> && kiwix-desktop.exe

Notes

On older version of this documentation was available here