GitXplorerGitXplorer
g

anki-jessie

public
12 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
f22abc2f249f08ebfa0312ca815a82c93dff92e8

Cleaned up

ggnprice committed 8 years ago
Unverified
48548401d832d1b848eae88c9cd70b050478917f

Clarify how to make a second chroot

ggnprice committed 8 years ago
Unverified
81b92520b2c6f82acca6f037f211e8d10d2d458c

Install mplayer

ggnprice committed 8 years ago
Unverified
f8f5563807d28a0edfecdf890ac55025984bd036

Add cleanup TODO for after 100% sure not looking back

ggnprice committed 8 years ago
Unverified
6341198ff079356e5d6b2e134af58f39e3038358

Clean up notes slightly

ggnprice committed 8 years ago
Unverified
37eb96f70157dc9323d7255017fd48873f93029b

erase all strategies but schroot

ggnprice committed 8 years ago

README

The README file for this repository.

Anki isn't available in Debian 9.0 "stretch" (the release frozen in 2017) because of the Qt 5 transition. See Debian bug #784612 . Upstream versions compatible with stretch begin with 2.1.0, which is in alpha as of 2017-02-24 .

Fortunately, schroot provides a simple and lightweight way to create a Debian 8 "jessie" environment on a "stretch" system and run a stable Anki from there.

Usage

After the setup below, this command runs Anki:

schroot -c anki -- anki

The resulting Anki has full access to my homedir (notably ~/Anki), my network connection, and my desktop environment, including the input method (fcitx) I use for typing Japanese.

Setup

Install schroot, which will facilitate entering the chroot, and debootstrap, which will populate it with "jessie" files:

sudo apt install schroot debootstrap

Create and populate the chroot's file tree:

sudo mkdir -p /srv/anki
sudo mkdir /srv/anki/chroot
sudo debootstrap jessie /srv/anki/chroot http://deb.debian.org/debian/

and tell schroot about it:

sudo tee /etc/schroot/chroot.d/anki.conf >/dev/null <<EOF
[anki]
description=Anki on jessie
type=directory
directory=/srv/anki/chroot
profile=desktop
preserve-environment=true
users=$USER
EOF

Finally, customize the chroot with your locale and time zone, and install Anki and allied packages:

sudo cp {,/srv/anki/chroot}/etc/locale.gen
sudo cp -P {,/srv/anki/chroot}/etc/localtime
sudo schroot -c anki -- apt install -y anki locales mplayer fonts-vlgothic fonts-takao

Now schroot -c anki -- anki should work!

Variations

The fonts-vlgothic package included above is one I use for Japanese. You may want other fonts packages for other languages. (E.g., for Chinese, perhaps fonts-arphic-uming fonts-wqy-zenhei.) Or copy in fonts from the host; for example:

sudo rsync -av {,/srv/anki/chroot}/usr/share/fonts/
sudo schroot -c anki -- fc-cache -v

I later made a second chroot for Anki development. For any additional chroot, vary the /srv/anki/$foo path and the schroot config's filename (/etc/schroot/chroot.d/$foo.conf), header ([$foo]), and description.