Installing Latest gWaei from Debian on Ubuntu 12.04

Pre­vi­ously on The Stray World, I doc­u­mented the men­tal anguish and chal­lenges of get­ting gWaei to run prop­erly in Ubuntu 12.04. This is an anguish that had to be resolved as the Japan­ese lan­guage is essen­tial to my qual­ity of life. And not just in an otaku sense — inter­ac­tion with the Japan­ese sci­entific com­munity is essen­tial for any trop­ical forest researcher-to-be work­ing in Malaysia.

In short, I made some Japan­ese friends and I would like to be able to under­stand them when they speak and write in the language.

Any­way, the guide I wrote was a really dirty patch­work of solu­tions that showed how much I have yet to learn about installing soft­ware in Linux. Thanks to a com­ment by Zachary Dovel in that art­icle, I am now pleased to intro­duce a proper means of get­ting the latest gWaei build from the Debian source repos­it­ory to Ubuntu 12.04. If you know about back­port­ing, that is what I am doing with this guide, which is tar­geted towards those who are just slightly less know­ledge­able about back­port­ing com­pared 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.

Caveats

First of all, unin­stall gWaei if you fol­lowed my pre­vi­ous guide. I am pretty sure there will be con­flicts some­how so this would be the best way to make sure any prob­lems that arise are a res­ult of some bug in the latest gWaei and not because of a con­flict with an older component.

If you have come this far, I assume you already know how to unin­stall soft­ware and unin­stall PPAs as well. remem­ber to remove the izx PPA if you installed gWaei through that PPA.

I also installed the main depend­ency for gWaei in the pre­vi­ous guide which was libwaei1. Your mileage may vary depend­ing on whether you fol­lowed my pre­vi­ous guide. In any case, if this guide doesn’t work due to depend­ency issues, Zachary Dovel has a list of the depend­en­cies you will need to build and/or run gWaei on his site.

Choose your Architecture

Scroll to the bot­tom of the gWaei exper­i­mental branch page and click on the soft­ware archi­tec­ture suited to your com­puter. For example, I chose amd64, which will lead you to a page with mir­rors to down­load the deb file for 64 bit pro­cessor run­ning computers.

If you try to install gWaei through this method, chances are you will be told sev­eral soft­ware depend­en­cies are unavail­able, and you will prob­ably be sucked into a cycle of down­load­ing more and more depend­en­cies until everything is sat­is­fied. I wouldn’t know, because I went ahead and added the repos­it­ory to Ubuntu.

Which leads to the next, poten­tially dis­astrous and/or dan­ger­ous step.

Adding the Debian Repository

Once more, I must warn you, mess­ing up this step will res­ult in a huge damper to your day. The essen­tial thing to remem­ber is, in Ubuntu, do not install Debian bin­ar­ies from the Debian repos­it­or­ies. This means after the stand­ard “apt-get update” if you sud­denly see 1000+ updates to be installed, you have added the bin­ary pack­ages to your repos­it­or­ies, 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 install­a­tion if you are not care­ful and upgrade straight away, and no one will be able to help you out easily.

In the pre­vi­ous step, I tested out two mir­rors and chose the Taiwan mir­ror because it gave me the best down­load speed in from my present location.

In Syn­aptic Pack­age Man­ager > Set­tings > Repos­it­or­ies > Other Soft­ware tab. Click Add and paste the fol­low­ing line:

deb http://ftp.de.debian.org/debian experimental main

Make sure you change the ftp.de.debian.org/debian to a mir­ror that suits your down­load loc­a­tion. Since I chose Taiwan, my line was:

deb http://ftp.tw.debian.org/debian experimental main

Once added, you will see that your new repos­it­ory has been added to Soft­ware Sources. Make sure only the repos­it­ory for the Source Code is selec­ted. The fact that I am provid­ing an example screen­shot should tell you once more, how import­ant it is not to mess this step up.

In the Ter­minal, do a sudo apt-get update. You are likely to receive an error along the lines of:

…InRe­lease: The fol­low­ing sig­na­tures couldn’t be veri­fied because the pub­lic key is not avail­able: NO_PUBKEY AED4B06F473041FA

Note the string after NO_PUBKEY and sub­sti­tute them if neces­sary into the next line:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com AED4B06F473041FA

Copy and paste the line above into the Ter­minal to authen­tic­ate your keys. As the page where I learnt how to solve this minor gripe reiterates:

Mix­ing Debian debs with Ubuntu is NOT advised and NOT sup­por­ted. You will get a big mess and the com­munity will NOT sup­port you.

I am sure you are tired of the warn­ing labels by now. But this is just to indem­nify myself should someone write to me say­ing this install­a­tion blew up hir com­puter, and I can point back to the naus­eous amount of warn­ing labels in this post.

To close off this sec­tion, run “sudo apt-get update” to update your sources and to ensure there are no weird prob­lems. If you get a noti­fic­a­tion say­ing 1000+ updates are avail­able, you have done some­thing wrong and you need to recheck your steps.

Installing gWaei from Debian Source

This part of the sec­tion, and in fact the major­ity of this install­a­tion pro­cess is derived from this webpage as a res­ult of someone want­ing to install guake from the Debian repositories.

This step of the sec­tion will down­load gWaei and all depend­en­cies from source, build, and install it to your computer.

First, install apt-src which is as described in the guide as “a helper pro­gram that makes com­pil­ing source pack­ages easy. It’s not neces­sary, but it pre­vents you from hav­ing to type too many commands.”

sudo apt-get install apt-src

Next, cre­ate a folder for com­pil­ing gWaei. I usu­ally have a ~/Compile folder for doing build pro­jects like this. Thus for my next step, I fire up the ter­minal and enter:

cd Compile

mkdir gwaei

cd gwaei

Now for the fun part. After all of the shenanigans above, you will finally exper­i­ence the joy of installing gWaei 3.6.1–1 (at the time of writ­ing) with the commands:

apt-src -bi install gwaei

Enter your pass­word when promp­ted, and launch gWaei with your pre­ferred method.

Con­fig­ur­ing Dictionaries

The new gWaei looks refresh­ing in its new gtk3 clothes. I really wanted to clear away the rem­nants of the old dic­tion­ar­ies. Besides, there may have been updates to the dic­tion­ar­ies, espe­cially in the Examples dic­tion­ary which had some sus­pi­ciously up-to-date sentences.

Since my install­a­tion is a bit wonky as there were some rem­nants in the old set­tings inher­ited by the new ver­sion of gWaei, I chose to delete all my dic­tion­ar­ies and start anew. I also ran into fre­quent seg­ment­a­tion faults dur­ing this pro­cess, so fair warn­ing that it will work, but you will need to be persistent.

Go to the menu, and choose gWaei > Pref­er­ences > Dic­tion­ar­ies. To remove dic­tion­ar­ies, simply click the minus but­ton. The screen­shot below is the after­math of me clean­ing and rein­stalling the dictionaries.

It may be pos­sible to down­load and install the dic­tion­ar­ies through the gWaei inter­face without the down­load fail­ing. I how­ever, pre­ferred down­load­ing the dic­tion­ary files sep­ar­ately through the closest avail­able mir­ror.I’d encour­age try­ing out the down­loader 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 unfathom­able reason you are unable to down­load the files, or they fre­quently fail to install due to seg­ment­a­tion faults, pro­ceed to the next step.

Optional Install­a­tion of Dictionary

In your mir­ror of choice, get the fol­low­ing files which shall be the tar­get Source file for each respect­ive category.

  • edict.gz (Eng­lish Dictionary)
  • kradfile.gz (Kanji Dictionary)
  • enamdict.gz (Names and Places Dictionary)
  • examples.gz (Examples Dictionary)

There may be fre­quent crashes in between installing these dic­tion­ar­ies (at least I exper­i­enced them) so the trick is to per­haps add dic­tion­ar­ies one at a time until all of them have been installed.

The End?

This install­a­tion is sourced from the exper­i­mental branch of Debian, mean­ing fre­quent crashes will occur. This is where you too can con­trib­ute to the devel­op­ment of gWaei by report­ing the bugs you find.

And that’s all folks. As usual, I will post major updates at the bot­tom of this page under a great big headline.