Skip to content

Instantly share code, notes, and snippets.

@ralavay
Last active December 24, 2015 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralavay/6804701 to your computer and use it in GitHub Desktop.
Save ralavay/6804701 to your computer and use it in GitHub Desktop.
Install Stardict in Ubuntu
#!/bin/bash
#
# Installs stardict in Ubuntu 12.04 and enables its systray icon
echo "
This script will add 'ppa:ubuntu-vn/ppa' repo to your update list
then install 'stardict' and 'english<->vietnamese' 'japanese<->vietnamese' dicts
"
sleep 1.5
# enable system tray icon in Unity system tray
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
# add Ubuntu-vn repo to download dictionaries from
sudo apt-add-repository ppa:ubuntu-vn/ppa -y
sudo apt-get update
# install stardict
sudo apt-get install stardict -y
# default to install english<->vietnamese and japanese<->vietnamese
EN="ovdp-english-vietnamese-stardict ovdp-vietnamese-english-stardict"
#FR="ovdp-french-vietnamese-stardict ovdp-vietnamese-french-stardict"
JP="ovdp-japanese-vietnamese-stardict ovdp-vietnamese-japanese-stardict"
#CN="ovdp-chinese-vietnamese-stardict" # can not found the vietnamese-chinese dic?
# install dicts
# you can manually download dictionaries and extract to `/usr/share/stardic/dic`
sudo apt-get install -y $EN $JP $CN $FR
echo "
########################## DONE ##########################
The 'ubuntu-vn/ppa' provides many dicts you can search for dict by 'apt-cache search vietnamese' etc
Then install it by 'sudo apt-get install PACKAGE_NAME'
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment