Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can type in Japanese in xterm and kterm but I can't do it in gedit or kedit.
I assume that the following would start kinput2 up on login - from [dspnet.fr.eu.org]
Code:
edit your .xinitrc file and add this, just before window manager.
# Start Japanese environment
export LANG=ja_JP.eucJP
export LC_MESSAGES=ja_JP.eucJP
export LC_CTYPE=ja_JP.eucJP
LANGUAGE=C
export LANGUAGE
# Start Japanese input
XMODIFIERS="@im=kinput2"
export XMODIFIERS
kinput2 -xim -kinput -canna &
xmodmap -e 'keycode 115 = Kanji'
[window manager - mine is fvwm2]
However, I don't know where the .xinitrc file is.
Problem 2:
When I view a site such as www.google.co.jp. The text has mostly been replaced with something similar to this
------
|30|
|CB|
------
I assume this is some encoding issue. So, when I boot up Libranet it displays a Language/Locale selection. The Japanese choice also shows up with the same boxed characters.
Close to giving up on Linux.... In Windows I would have just installed the IME for Japanese (one app) and it's all done
yeah, you can just create the .xinitrc file in your home directory. But doing it that way can be a pain because you have to start the windowmanger from it as well. Most distribution use an i18n file. Create a file .i18n in your home directory (note the .; it's a hidden file) and then put in the lines:
And then create the files .Xresources and .Xdefaults in your home directory and put in:
*inputMethod: kinput2
in both of them.
Now create a file startkinput2 in the directory .kde/Autostart (also in your home directory). It should look like this:
#!/bin/bash
kinput2 &
Now you have to make this file executable. If you are using konqueror, you should be able to do it by right clicking the file, go to properties and then to the permissions tab.
If you log in to KDE again, japanese input should be working.
If you get messed up fonts, try replacing the ja_JP.eucJP with ja_JP.UTF-8.
In browsers, you sometimes have to tell the browser explicitly that the page is in japanese. It's not a specifically linux thing.
You should be able to set Konqueror to show hidden files as well. Look through the menus (KDE is not very good with menu layout so make sure you look everywhere). ls -a will also show all hidden files. If there is no .xinitrc in the output of ls -a (in your home directory), then it doesn't exist which is normal if you use a graphical login manager.
Your hidden files are located in you home directory. To get to the home directory type cd and then hit enter (from the command line). In the gui you will have to look through the diretories until you find a show hidden files option of some sort...maybe file properties?
Now try ls -lah (again command line)
this will list all the stuff in you home directory including your hidden files.
Another thing you might try is (well can you use a text editor?)...on the command line type:
vim (or emacs or whatever) .
and then hit tab this will do autocomplete which will then list all the hidden files in your current directory. Try doing that in DOS. It is a no go (at least I dont like how you have to scroll through your options...)
As for problems with not being able to read Japanese text, I sometimes see those boxes you are refering to, but by no means is the screen littered with them.
Stick with Linux as long as you want to. It is a learning experience. Windows is quite dull in my opinion.
Last edited by Kroenecker; 09-07-2004 at 10:46 PM.
you could use
find -name .xinitrc
if you are looking for .xinitrc. But if it doesn't appear in the output of
ls -a
in your home directory it is not there and it is useless to look for it. You've got to create it.
Hey Quatsch, any idea why a stray box character like microsnot describes will show up once in a while in Japanese text? ...Do you have that problem/annoyance? I didnt suffer until upgrading to LFS 5.1 so I am thinking that something might be wrong with fonts. Or not...then again with the older version of X from LFS5, text was sometimes badly ... mangled (only way to describe it) though readable.
I don't think it's the fonts. It's something to do with the system not being able to correctly identify which encoding to use. I can get those boxes to show when I open a japanese text that is encoded in the pretty standart iso-2022-jp and choose UTF-16 as encoding in mozilla. I suspect it is more to be blamed on the files not properly identifying what encoding it uses than the system. It might be that the move to UTF-8 locales worsens the problem since programs will probably presume that a file is in UTF if it doesn't say otherwise.
quatsch:
I followed your instructions as mentioned in post 3:
.i18n
.Xresources
.Xdefaults
startkinput2
I can get Japanese input in kterm but not in any text editors. Am I missing anything?
I'm aware that the .xinitrc file doesn't exist on my system but knowing how to search for hidden files will be useful later
What should I try next? Should I create the .xinitrc file. How do I start the windowmanager from it? I suppose currently it boots up to some graphical WM where I can select the Locale and Desktop environment.
-=-=-=-
Regarding the boxed characters. I think my fonts are screwed up. When I boot up to Japanese locale all messages are shown in those boxed characters...
Although the strange this is...that wasn't the initial result. I can't seem to get the same initial result again. LANG=en_?? I can't remember exactly but all the values were "en_<something>" rather than "POSIX"
In regards to the boxed text issue...If I look at web pages with Konqueror, the Japanese fonts are rendered correctly...I'm so confused
I don't have the /etc/X11/xinit/xinitrc.d/ directory.
Funnily though...there's a file called xinitrc in /etc/X11/xinit/xinitrc/ directory. It's not hidden though. The contents:
Code:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
. /etc/X11/Xsession
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.