Linux Mint Elyssa – How to Enable Korean + Japanese + French and German (Updated for Arch Linux)

Please see my latest update on May 13, 2011, below!

I like foreign languages. They are always entertaining, and remind me to respect those who have a hard time learning English as a second language. Since some people are stumbling onto this blog in search of a way to enable Japanese support in Mint, I will write down how I set it up to work on both my laptop and desktop (even though I did mention my setup very briefly in one of my earlier posts). By the way, this guide is 100% compatible with Daryna and not just Elyssa. This means you Ubuntu Gutsy and Hardy people should listen up as well.

First, how to install Japanese/Korean/Chinese support:

  • Get “scim-bridge” from the repositories/Synaptic if you don’t have it already.
  • Open up /etc/X11/xinit/xinput.d/scim with root access with any text editor. E.g., something like this: gksudo gedit /etc/X11/xinit/xinput.d/scim.
  • Make the file look like this (the lines that start with # are all “comments” and do not affect anything at all):
  • Now, keep these values for these variables in mind. You can open up a blank gedit document and copy/paste the stuff above into it for reference, because you’ll need it for the following step.
  • Make /etc/X11/xinput.d/none and /etc/X11/xinput.d/default the same as the file we just edited. But, for extra safety, only copy/paste over the values for the variables that are in the /etc/X11/xinput.d/scim file (the ones shown up above in code font). There are other variables with values (or no values) in the none and default files that you do not need to touch, so leave these as is.
  • Now, restart X. (X is the graphical window manager for Linux. It runs everything you see, and it also handles fonts and such, so you need to restart. Either log out and log back in (shortcut key for this is CTRL + ALT + BACKSPACE) or just reboot if you really feel like it.
  • Now, there should be a little keyboard icon on the system tray/Panel. Right-click on it, and click on SCIM Setup.
  • For FrontEnd -> Global Setup, choose English as your default keyboard layout.
  • Update the hotkeys for FrontEnd -> Global Setup -> Hotkeys -> Next input method. The default hotkeys are a bit annoying for me. I like to set up a custom hotkey that is Control+Control_R+KeyRelease; so, when I press both CTRL keys, and then release the Right CTRL key, the input method changes to Japanese. If I do it again, the input method changes to Korean. Doing it again takes me back to my default English layout.
  • In IMEngine -> Global Setup, uncheck the Other boxes. You don’t need these (uncheck both the English/European box and the RAW CODE box) as they are clutter and get cycled into your custom hotkey you set up above.
  • Right-click on the keyboard in the system tray/Panel again, and this time, click on Reload Configuration. (I think you might have been prompted earlier when you made the changes I described above; but do it again just for good measure.)
  • Again, restart X.
  • Done! Now, you have a global hotkey of Control+Control_R+KeyRelease that works in ANY program — gedit, Firefox, and even the terminal!!! (The keyboard icon in the system tray will update whenever you press the hotkey to reflect your current selection.) Control+Spacebar switches between your Japanese or Korean input back to your English layout. (NOTE: If you never saw any keyboard icon in your system tray, then this is because you don’t have the Notification Area item added to your Panel. Do so, and it will show up.)

For French and German:

  • In Start -> Preferences -> Keyboard, click on the Layouts tab and click on Add. Add the French layout and German layout, both with their default variants (unless you want Dvorak or something).
  • In the same tab, click on the Layout Options button. Click on Layout switching, which should be bolded by default on Elyssa/Daryna. Now, for some reason, the default hotkey does not work for me on my basic QWERTY keyboard (no success on my laptop’s keyboard, either). Also, as much as I like the Both Alt keys together change layout option, it doesn’t work for me. But this one does: Right Win-key changes layout. So click this one. Try other ones if you really hate using the right windows key.
  • Right-click on your Panel, and click Add to Panel. Click on the Keyboard Indicator item and add it.
  • Restart X? I don’t remember. But it should be working right away, if I recall correctly. Notice how each time you press the hotkey, the indicator changes from “USA” to “Fra” to “Deu” and back again. Neat!

I hope you find these things useful. がんばって!

UPDATE July 12, 2008: For some reason, the Layout switching options for switching between English, French, and German input as described above does not work properly. It only works right after you set the shortcut key. After a reboot, it will not work. I think this is a bug, but it may be just my system.

UPDATE July 25, 2008: The Layout switching option not working is a bug present in Ubuntu Hardy. Details here.

UPDATE September 24, 2008: In Xubuntu 8.04.1, you can at least get the Keyboard Layout Switcher (an item that you can add to the Panel) to work properly by going into /etc/X11/xorg.conf, and adding the names of the layouts for the “XkbLayout” option, as well as updating the settings ins Keyboard Preferences to reflect whatever is defined for “XkbLayout”. So, for me, this setting was set to simply “us” before, for US English. I changed it to look like “us,fr,de”; then, I went into Menu -> Settings -> Settings Manager -> Keyboard -> Layouts, and added the proper US, FR, and DE layouts, in that order (although I doubt this proper order is necessary). Then, I also unchecked the “Use X configuration” setting as well in the same dialog box (I know, this is odd, considering how we want the changes reflected in xorg.conf to take effect). Now, after these two changes, the Keyboard Layout Switcher works correctly, even after a reboot. FYI, in the Keyboard Preferences dialog box mentioned above, I use the olpc2, oss_nodeadkeys, and nodeadkeys variants for the us, fr, and de layouts, respectively, and my keyboard model is Generic 105-key (Intl) PC.

Unfortunately, making it switch layouts via a keyboard hotkey, à la SCIM, is beyond me. Clicking on the flag icon in my Panel will do for now.

Also, as for the Korean + Japanese, as of Xubuntu 8.04.1, you’ll have to install the scim-hangul and anthy and scim-anthy packages to get the two languages to show up in your SCIM setup dialog box (my apologies for not mentioning this if this was also the case before).

UPDATE February 22, 2009 (on Arch Linux): I don’t use Xubuntu anymore — I use Arch Linux + Xmonad (no XFCE, no KDE, no Gnome, just Xmonad). From my experience on 2 installations of Arch (one on my desktop and one on my laptop), the layout switching between us, fr, and de all work with the following xorg.conf:

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option "XkbModel" "pc104"
    Option "XkbLayout" "us,fr,de"
    Option "XkbOptions" "grp:rctrl_toggle"

That’s right — you can get layout switching functionality with just a couple lines in your xorg.conf file. The only quirk is that when I do press the right CTRL key to toggle between us, fr, and de layouts, the “us” layout is actually in there twice — i.e., I have to press the right CTRL key two times to switch from us to fr. (This quirk has been fixed now — see update on June 16, 2010 below.) But cycling between all of these layouts work all the time, and consistently, even after reboot! It’s just one more reason to switch to Arch Linux. BTW, scim works perfectly fine in Arch Linux — just put the following in your ~/.xinitrc file, BEFORE “exec xmonad” if you’re using Xmonad:

export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
scim -d

Just follow the Arch wiki on SCIM for more details. Press CTRL+Space to bring up the scim pop-up window (assuming you’ve installed at least one input method, like scim-anthy or scim=hangul), and from there you can right-click on it to bring up the scim configuration window, for all your tweaking/hotkey customizations.

UPDATE March 26, 2009: You might want to be interested in this post I just wrote as well, for displaying good-looking Korean and Japanese fonts in your terminal/console.

UPDATE June 16, 2010: The quirky behavior of the layout “us” being there twice is now gone — I think the latest xorg updates (1.7 series, probably) have fixed that bug.

UPDATE May 13, 2011: I now use the setxkbmap program to do all my layout switching. As for Korean/Japanese input, I use ibus (SCIM is supposedly not maintained anymore).

UPDATE August 24, 2011: I don’t use multiple xorg keyboard layouts any more; see this post.

Linux Mint 5.0 “Elyssa” on a Secondary Hard Drive

(NOTE: I’m doing this entire post from memory so forgive me if some things do not perfectly match up with your own Elyssa install. Also, the solution described below only works easily when working with 2 hard drives, one with Windows on it and the other with Linux on it (the more drives and partitions, the more painstaking and troublesome the various numerical/lettering edits as described below). I realize that this is a rather long post, but rest assured — the only permanent change to your system is the editing of the /boot/grub/menu.lst file, and nothing else.)

After a few hours of reinstalling a couple times, tweaking, and fiddling around, I’ve managed to successfully install Elyssa on my PC. Strange, since Daryna installed without a hitch (but then again, I chose an automatic disk resize option at the time, and Windows XP was the only OS installed in the system). I will try to suppress my joy at solving this problem in a matter of hours instead of days like some rather unfortunate people on the Ubuntu forums. First, a run-down of my hardware just before I tried to overwrite Daryna with Elyssa:

There are 2 hard drives:

  • The first hard drive (let’s give it a name to avoid any overlap with other hard drive designations/settings discussed later in this post — let’s call it Vincent) is a SATA drive (3.0 Gbps or something like that). It has the basic C:\ partition for Windows, and 3 more partitions for various data/documents (D, E, and F).
  • The second drive, let’s call it Jules, is an old IDE drive and has 3 partitions: a “G” drive, NTFS partition that is used yet again for data/documents; an ext3 partition for my old Daryna install; and finally, a basic swap partition.

In my first attempt at installing using the Elyssa live CD’s install wizard, when I got to the partitioning dialog box, I simply deleted the old ext3 and swap partitions, as I wanted a complete, fresh install of Elyssa. Also, I wanted to create a separate /home partition instead of just having one “/” (aka “root”) partition for everything as was the case before under Daryna’s automatic disk-resize install. So I went ahead and created two ext3 partitions — one mounted at “/” and the other at “/home”. (I do not recall the choices I made regarding the “primary” or “logical” option — I think I chose “/” as primary and “/home” as logical; however, I have a feeling that this setting did not affect the problems/solutions I will talk about in this post). Finally, I created a swap partition as usual. In the dialog box that followed that had an “Advanced…” button on it, I clicked it, and made sure to install GRUB onto Jules, not Vincent. This was because I only wanted to physically mess around with the drive that had the old GRUB loader on it, and leave Vincent untouched. (So for example, if Jules got screwed, and GRUB got corrupted somehow, that I would be able to go into BIOS and change the hard drive boot priority to make Vincent, instead of Jules w/ GRUB, load first. This way, as far as Windows is concerned, it’s as if nothing ever happened.)

Everything installed smoothly, but when GRUB loaded with the usual list of operating systems, it gave me an “Error 17” when I told it to load Mint, and additionally complained about the partition being unreadable or something to that effect.

Don’t worry, I realize now that nothing was damaged, and your system will be fine as well. It’s just a small technicality that tripping up GRUB.

I’ll keep to the essentials. The basic problem was: GRUB did not recognize the drives correctly; that is, it switched the order of drives so that it thought Jules was Vincent instead of Vincent being Jules, or vice versa.

The solution (from your perspective, with Jules and Vincent working as our hypothetical):

1. If you keep trying to press ENTER in the GRUB menu (to load into Mint), you’ll eventually be left with a low-tech looking version of the same with a blue/black background (I think those were the colors). But although it looks crappier than the first GRUB menu with prettier graphics, this version lets you customize how Mint reads from the hard drives and partitions! Perfect for figuring out what is on Mint’s mind. All you have to do is edit 3 things. Now, with the default Mint OS highlighted (the toppmost one, not the “recovery mode” one), just press “e” on the keyboard. (There is a list of commands at the bottom of the screen at this point, so you’re free to look if you’re curious.) This will bring up a cheap looking text editor. All we have to do is edit a few values (to boot into Mint successfully, whereupon you will make these custom options permanent):

  1. First, edit the top line that says something like “root (hd1,0)“. The first number is the drive number, and the second number is the partition number. Most likely, if it does say (hd1,0), this means that, for purposes of our Jules/Vincent situation, that Jules was recognized as hard drive 0, and Vincent was recognized as hard drive 1. That is, it tried to boot into Mint using hard drive 1, or Vincent, instead of Jules who has GRUB with him. (Mint, like Ubuntu, counts from 0. I know, it’s confusing, but it’s a programming thing, I think (array elements, anyone?).) Since we know that there are only 2 hard drives in our system — Vincent and Jules — the only possibilities for the first number is either 0 or 1. Change it to 0 if it is currently set as 1 (or 1 if it is currently set as 0 — and accordingly, do everything opposite for the rest of the steps below). So now, the top line looks like “root (hd0,0)“.
  2. Now that we’ve told Mint to look at Jules, things are looking good. However, there is a corresponding value that must be changed in a similar way to make this complete. In the second line, you’ll see something like “root=dev/sdb1” or something like that (push the left arrow so you can look back far enough — the line is a long line and didn’t show up completely on my monitor). Change this to say sda1 instead of sdb1. Yes, “a” and “b” again refer to hard drives, and you just need to harmonize them with the changes you made in the top line.
  3. Now just press “b” (it doesn’t matter whether you’re currently highlighting the top line or the second line), and GRUB will try to boot with those minute changes you’ve just made. If it still fails to boot and gives an Error 17, never fear, just press enter and you’ll be brought back to the same screen. Make sure that the customized lines still look the same, but this time, change the second/partition number in “root (hd0,0)“. So, change it to “root (hd0,1)“. Voila, Mint boots successfully!! (If it doesn’t, stop reading this post, and consult the Ubuntu/Mint forums instead.)

The whole point of the above 3 steps is to intelligently guess the correct numbers. And the guesswork should be a breeze, since we only have 2 drives and GRUB will reload instantly after each failure. The second number discussed in step 3 is limited to the number of partitions you have (probably something like 0, 1, or 2, again depending on the number of partitions you saw in the live CD Mint installer’s partitioning dialog box). Keep repeating steps 1 + 2 and 3 until you can boot into Mint without a hitch.

Now that we can boot into Mint, we need to make these changes permanent. Just type sudo su in the terminal, and then type in gedit /boot/grub/menu.lst. This is the only file we’ll be editing, so you’re almost there!

  1. If you go down near to the bottom of the file, you’ll see some lines that look very familiar to the ones you just edited. Change them accordingly to what you did above — both the (hd#,#) and the sda/sdb values.
  2. If you go up a bit, you’ll see a value called groot. It also references the same (hd#,#) value that is the default topmost line in GRUB’s menu (the one we just edited above). Change it accordingly. (In our case, (hd0,1).)
  3. Right above groot is another line that has a sda/sdb value in it (I think it was kopt or something like that). Again, change this to match the setting that worked. (In our case, sda1).
  4. Save the changes.

Now, restart. If you did everything correctly, all of the Mint options in the GRUB menu should work. So far so good! But if your problem was exactly like my problem, then Windows should not boot from within the GRUB menu, and it will complain about NTLDR being missing. Again, this is just a problem that can be fixed from the /boot/grub/menu.lst file. So, go back into Mint and edit the file, and go down to the very bottom, where it has settings for Windows. By this point, you should be able to recognize that the (hd#,#) setting is wrong. Change it to look like this (hd1,0). This is the solution pursuant to the hypothetical above. And, it makes sense: it now reads so that it looks at hd1 (Vincent), not hd0 (Jules); and within hd1, it says to look at the very first partition (your C:\ drive).

Reboot, and try to go into Windows from GRUB. If it works, great! But for me, I still couldn’t get into Windows by this point. So what I did was edit the Windows entry in /boot/grub/menu.lst again, and add two lines,

map     (hd0) (hd1)
map     (hd1) (hd0)

below the word “savedefault” (this order probably does not matter, but the two “map” lines above should come after the “root” line, I think). Save, and reboot, and try to boot into Windows. It should work just fine. What these two “map” lines did was basically tell Windows to look at Vincent first, not Jules, because Jules only has Linux and some other NTFS data on it.

So there you have it. In retrospect, the crux of the matter was that GRUB had Vincent and Jules switched around, and thought that Vincent has Linux on it. The steps we took above simply swapped Jules and Vincent into their correct positions. Again, the beauty of this solution is that, essentially, you only have to edit /boot/grub/menu.lst! No grub repair or update-grub or using a “Super GRUB disK” or anything like that. But of course, this only works well and quickly if you have 2 hard drives. If you have more drives, and thus more partitions, you’ll have to edit more things and exhaust more possibilities — but now that I think about it, the same principles should apply, and this solution should still work.

And yes, Pulp Fiction was a fun movie. Vincent and Jules are characters from the film.

Q6600, Zalman CNPS 9500, and eVGA 680i

My PC has a Q6600 processor overclocked to 2.8 GHz (312.5 FSB, or 1250 as it shows up in the BIOS) on a eVGA 680i TR motherboard. Although the 680i was quite excellent for overclocking the e6600, it isn’t so nice with the Q6600. I have the Q6600 paired up with the Zalman 9500 cooler from my e6600 days.

For quite some time, I tried overclocking my Q6600 beyond 2.8 GHz, without any success. I tried voltages on the RAM, other motherboard features, RAM timings, etc. Today, I installed Coretemp 0.99 and realized that my cooler was the bottleneck all along. If I run Prime 95, the core temperatures on all four cores (with a few degrees difference) reach the high 60’s! No wonder I couldn’t overclock beyond 2.8 GHz. And this is with the Q6600 on 1.2 volts in BIOS (CPU-Z says 1.184 volts). It idles at 45, 40, 40, and 44 degrees for each core respectively.

The moral of the story: make sure you keep a close eye on the CPU temperature when overclocking!

Linux Mint 5.0 “Elyssa” Main Edition – First Impressions

I couldn’t hold back — once I realized that Elyssa was released a couple days ago, I just had to install it immediately. So I did, on my old Dell Latitude D505 Laptop. I had been running WinXP and Daryna on it with dual boot, so I figured I’d install over the old Daryna partitions.

I had to manually delete the ext3 and swap partitions that Daryna had created for itself during its install process some months earlier. Manually creating the partitions wasn’t hard at all — I just created a large ext3 filesystem partition, and set it as my Logical drive (my laptop, like all laptops, has only 1 hard drive, so setting it as Logical instead of Primary seemed to be the right thing to do), with Mount Point at “/” (without the quotes). Then, I manually created a swap partition about 1 GB in size (they say you should make this about twice the size of available RAM on your system, so it worked out for me because I have 512MB of RAM). It installed nicely. I guess I got rid of my fears of manually editing partitions, with this experience, haha.

Here are a few glitches (not “bugs,” since these are fixable with little effort) with Elyssa Main Edition, after applying all the updates as of the writing of this post:

  • CompizConfig Settings Manager (labeled as Advanced Desktop Effects Settings in the mintMenu (Start menu)), comes installed, which is nice. However, none of the settings gets saved after you edit them. Run compiz –replace in the terminal, and this should fix things.
  • mintMenu itself seems problematic. If you click on any icon/application, mintMenu does not close until you click outside of the menu. To fix this, click on the top-left hand corner (there should be a small, emtpy, rounded square), and this should do the trick. This has got to be the weirdest glitch I’ve seen in a long time. Well, at least it fixes itself rather elegantly.
  • gnome-terminal does not remember the “Show Menubar” option being unchecked. However, this might not be Elyssa’s fault.

But hey, a few bad apples isn’t going to ruin the party. Here are some nice things I’ve noticed in the couple hours of usage I’ve put into Elyssa so far:

  • The Aurora Gtk Engine I liked (before switching to another theme because of speed issues) comes installed by default (just select it in the Appearances dialog box). And, the speed has significantly improved. I just hope things will perform the same way on different hardware (that is, on my desktop machine).
  • Firefox 3 RC1 comes with Elyssa by default. I didn’t realize this before, but this means that mintUpdate/Synaptic (depending on which one you prefer — I actually prefer Synaptic) will automatically update Firefox to its official 3.0 version once it gets compiled properly and uploaded to Hardy Heron’s servers (Mint has a history of being compatible with Ubuntu’s releases, and yes, since Elyssa is Hardy Heron-compatible, Elyssa is also a “LTS” as is Hardy Heron, and will be supported for the next 3 years.)
  • CCSM comes installed by default. I made a mental note to myself before of how Daryna was weird in that it had CompizFusion’s Desktop Cube plugin enabled by default, but had no way of customizing its behavior. Elyssa even comes with a “Simple” CCSM variant, which is supposedly an “easier” way of editing the plethora of plugins provided by CCSM.

So there you have it. I will be writing a new post with “Tips” or any bugfixes/glitches issues later if they add up enough to make it worth the effort. Otherwise, I recommend upgrading to Elyssa via a fresh install, since Elyssa is a Long-Term Support release (LTS), and will be supported for the coming 3 years.

UPDATE June 10, 2008: (File sharing bug) There is a file sharing bug present in Elyssa (as well as Hardy Heron); if you try to share a folder, and click the boxes to let others have writing permissions in that folder, it will give you an error that looks something like this (in the same dialog box):

‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error

…and basically prevent you from sharing any folders/files. I can’t believe such a huuuuge bug escaped the eyes of developers; it seems to be a Samba issue. According to someone named bastafidli, the solution is to type in chmod 777 /var/lib/samba/usershares in the terminal. This worked for me (without any logging out/in as suggested by the people in the link above), so it will probably work for you until the Samba people kill the bug. (In case you’re curious, the command chmod simply changes the permissions on a given target; google “chmod 777” for more info.)

UPDATE June 14, 2008: (File sharing and Fonts) Two things:

  1. The ‘net usershare’ message file sharing bug I pointed out in the June 10, 2008 update above may only be half the battle. I still have trouble easily enabling file sharing from my Elyssa laptop to my Daryna PC. This thread looks useful, however, and I will consult it after I get my PC upgraded to Elyssa.
  2. Alas, the “fonts:///” address does not work in Nautilus (i.e., file explorer) any more!! I have no idea why the Ubuntu people did this, but Mint must suffer as well because of this. Adding fonts seems to be rather roundabout in Elyssa/Hardy. For now, you can manually create a folder in your home directory and name it .fonts. Then, drag any TTF files into this directory, and as usual, run sudo fc-cache -fv in the terminal. This worked for me in adding the Tahoma font (which does not come in the msttcorefonts package in the Hardy repositories).

GTD – It Seems to Be Working

This is a follow-up post to my first post about GTD, the self-productivity system. The system seems to be working. My next actions list (or “actions list” for short), has steadily increased and decreased in items in the past weeks. I still haven’t broken down the gigantic projects I’ve documented into my projects list into bite-sized, do-able chunks to be incorporated into the actions list, but things are still looking very good.

I have less stress.

The overwhelming psychological benefit you get from knowing exactly where you are on the “Map of Life” feels great. It’s not so much of an energizing, high-five kind of feeling than a more relaxed state of existence. As I’ve said before, the GTD mantra of getting everything important out of your head and writing it down has really made me feel more in control of my life. If you’re really interested about GTD, google it or read my first post about it, where I laid out a brief, core summary of the system.