Previously on The Stray World, I documented the mental anguish and challenges of getting gWaei to run properly in Ubuntu 12.04. This is an anguish that had to be resolved as the Japanese language is essential to my quality of life. And not just in an otaku sense — interaction with the Japanese scientific community is essential for any tropical forest researcher-to-be working in Malaysia.
In short, I made some Japanese friends and I would like to be able to understand them when they speak and write in the language.
Anyway, the guide I wrote was a really dirty patchwork of solutions that showed how much I have yet to learn about installing software in Linux. Thanks to a comment by Zachary Dovel in that article, I am now pleased to introduce a proper means of getting the latest gWaei build from the Debian source repository to Ubuntu 12.04. If you know about backporting, that is what I am doing with this guide, which is targeted towards those who are just slightly less knowledgeable about backporting compared to me.
NOTE: YOU WILL BE INSTALLING EXPERIMENTAL SOFTWARE FROM A DEBIAN REPOSITORY INTO UBUNTU. DO NOT DO THIS UNLESS YOU ABSOLUTELY UNDERSTAND THE RISKS INVOLVED. THE CHANCES OF YOU MESSING UP YOUR COMPUTER SHOULD BE MINIMAL IF YOU FOLLOW THE INSTRUCTIONS EXACTLY AS WRITTEN. HOWEVER, ALTHOUGH I WILL FEEL BAD, MY RESPONSIBILITIES FOR POTENTIALLY MESSING UP YOUR COMPUTER WILL ONLY BE AN APOLOGY AND A CORRECTION TO ANY ERROR THAT COULD HAVE CAUSED THAT DAMAGE.
IF YOU HAPPEN TO KNOW A BETTER WAY TO DO THE FOLLOWING, PLEASE CORRECT ME IN THE COMMENTS.
First of all, uninstall gWaei if you followed my previous guide. I am pretty sure there will be conflicts somehow so this would be the best way to make sure any problems that arise are a result of some bug in the latest gWaei and not because of a conflict with an older component.
If you have come this far, I assume you already know how to uninstall software and uninstall PPAs as well. remember to remove the izx PPA if you installed gWaei through that PPA.
I also installed the main dependency for gWaei in the previous guide which was libwaei1. Your mileage may vary depending on whether you followed my previous guide. In any case, if this guide doesn’t work due to dependency issues, Zachary Dovel has a list of the dependencies you will need to build and/or run gWaei on his site.
Choose your Architecture
Scroll to the bottom of the gWaei experimental branch page and click on the software architecture suited to your computer. For example, I chose amd64, which will lead you to a page with mirrors to download the deb file for 64 bit processor running computers.
If you try to install gWaei through this method, chances are you will be told several software dependencies are unavailable, and you will probably be sucked into a cycle of downloading more and more dependencies until everything is satisfied. I wouldn’t know, because I went ahead and added the repository to Ubuntu.
Which leads to the next, potentially disastrous and/or dangerous step.
Adding the Debian Repository
Once more, I must warn you, messing up this step will result in a huge damper to your day. The essential thing to remember is, in Ubuntu, do not install Debian binaries from the Debian repositories. This means after the standard “apt-get update” if you suddenly see 1000+ updates to be installed, you have added the binary packages to your repositories, which means you need to re-read this part of the guide again as it is not too late to pull back. You will mess up your installation if you are not careful and upgrade straight away, and no one will be able to help you out easily.
In the previous step, I tested out two mirrors and chose the Taiwan mirror because it gave me the best download speed in from my present location.
In Synaptic Package Manager > Settings > Repositories > Other Software tab. Click Add and paste the following line:
deb http://ftp.de.debian.org/debian experimental main
Make sure you change the ftp.de.debian.org/debian to a mirror that suits your download location. Since I chose Taiwan, my line was:
deb http://ftp.tw.debian.org/debian experimental main
Once added, you will see that your new repository has been added to Software Sources. Make sure only the repository for the Source Code is selected. The fact that I am providing an example screenshot should tell you once more, how important it is not to mess this step up.
In the Terminal, do a sudo apt-get update. You are likely to receive an error along the lines of:
…InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
Note the string after NO_PUBKEY and substitute them if necessary into the next line:
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com AED4B06F473041FA
Copy and paste the line above into the Terminal to authenticate your keys. As the page where I learnt how to solve this minor gripe reiterates:
Mixing Debian debs with Ubuntu is NOT advised and NOT supported. You will get a big mess and the community will NOT support you.
I am sure you are tired of the warning labels by now. But this is just to indemnify myself should someone write to me saying this installation blew up hir computer, and I can point back to the nauseous amount of warning labels in this post.
To close off this section, run “sudo apt-get update” to update your sources and to ensure there are no weird problems. If you get a notification saying 1000+ updates are available, you have done something wrong and you need to recheck your steps.
Installing gWaei from Debian Source
This part of the section, and in fact the majority of this installation process is derived from this webpage as a result of someone wanting to install guake from the Debian repositories.
This step of the section will download gWaei and all dependencies from source, build, and install it to your computer.
First, install apt-src which is as described in the guide as “a helper program that makes compiling source packages easy. It’s not necessary, but it prevents you from having to type too many commands.”
sudo apt-get install apt-src
Next, create a folder for compiling gWaei. I usually have a ~/Compile folder for doing build projects like this. Thus for my next step, I fire up the terminal and enter:
Now for the fun part. After all of the shenanigans above, you will finally experience the joy of installing gWaei 3.6.1–1 (at the time of writing) with the commands:
apt-src -bi install gwaei
Enter your password when prompted, and launch gWaei with your preferred method.
The new gWaei looks refreshing in its new gtk3 clothes. I really wanted to clear away the remnants of the old dictionaries. Besides, there may have been updates to the dictionaries, especially in the Examples dictionary which had some suspiciously up-to-date sentences.
Since my installation is a bit wonky as there were some remnants in the old settings inherited by the new version of gWaei, I chose to delete all my dictionaries and start anew. I also ran into frequent segmentation faults during this process, so fair warning that it will work, but you will need to be persistent.
Go to the menu, and choose gWaei > Preferences > Dictionaries. To remove dictionaries, simply click the minus button. The screenshot below is the aftermath of me cleaning and reinstalling the dictionaries.
It may be possible to download and install the dictionaries through the gWaei interface without the download failing. I however, preferred downloading the dictionary files separately through the closest available mirror.I’d encourage trying out the downloader within gWaei first, as if it works straight out of the box, you will not need to bother with the next step. If for some unfathomable reason you are unable to download the files, or they frequently fail to install due to segmentation faults, proceed to the next step.
Optional Installation of Dictionary
In your mirror of choice, get the following files which shall be the target Source file for each respective category.
- edict.gz (English Dictionary)
- kradfile.gz (Kanji Dictionary)
- enamdict.gz (Names and Places Dictionary)
- examples.gz (Examples Dictionary)
There may be frequent crashes in between installing these dictionaries (at least I experienced them) so the trick is to perhaps add dictionaries one at a time until all of them have been installed.
This installation is sourced from the experimental branch of Debian, meaning frequent crashes will occur. This is where you too can contribute to the development of gWaei by reporting the bugs you find.
And that’s all folks. As usual, I will post major updates at the bottom of this page under a great big headline.