LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-07-2004, 06:01 AM   #1
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Rep: Reputation: 0
Unhappy Japanese input - whereis .xinitrc ?


Running Libranet 2.8.1 and KDE

I've installed the following:
* ttf-kochi-gothic
* ttf-kochi-mincho
* xfonts-intl-japanese
* xfonts-intl-japanese-big
* canna
* canna-shion
* canna-utils
* kinput2-canna
* kinput2-common
* libcanna1g
* xterm
* kterm

-=-=-=-

When I first login cannaserver is running as a service but kinput2 isn't

I think everything is installed correctly because if I follow the instructions from
[www.linuxquestions.org] and type the following into Konsole:

Code:
export XMODIFIERS="@im=kinput2"
export XINPUT="kinput2"
export LC_CTYPE="ja_JP"
export LC_TIME="ja_JP"
kinput2 -canna &
kterm &
xterm &
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
 
Old 09-07-2004, 06:30 AM   #2
Baldrick65
Member
 
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
It should be a hidden file, but if .xinitrc doesn't exist, then you can probably create it like this
Code:
touch .xinitrc
Then just put the code stuff in it. It might work.

Baldrick
 
Old 09-07-2004, 07:39 AM   #3
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
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:

LC_CTYPE=ja_JP.eucJP
XMODIFIERS="@im=kinput2"
XIM=kinput2

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.
 
Old 09-07-2004, 08:28 AM   #4
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Original Poster
Rep: Reputation: 0
How do I search for and view hidden files?

I created a file .test but Konqueror doesn't show it.

I can list a directory by doing
Code:
ls -a
What command should I run to search for .xinitrc?

When you guys say create the file in the Home directory...does that mean /home/ or /home/username/ or /root/
 
Old 09-07-2004, 12:12 PM   #5
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
home directory means
/home/{username}

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.
 
Old 09-07-2004, 10:34 PM   #6
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Original Poster
Rep: Reputation: 0
But is there a shell command that searches for hidden files?

whereis, locate, find. I've tried looking through the manuals only to be really confused.
 
Old 09-07-2004, 10:43 PM   #7
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
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.
 
Old 09-07-2004, 10:46 PM   #8
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
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.
 
Old 09-07-2004, 10:52 PM   #9
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
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.
 
Old 09-07-2004, 11:08 PM   #10
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
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.
 
Old 09-07-2004, 11:43 PM   #11
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for all the help guys.

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...
 
Old 09-08-2004, 12:00 AM   #12
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
You're almost there, I'm sure.

When you boot up normally and log in, open a terminal and give the command
locale

In the output, do you see LC_CTYPE=ja_JP.eucJP? Just to make sure the .i18n file has an effect. If the .i18n file does seem to have an effect, try

in the .i18n file
LC_CTYPE=ja_JP.UTF-8

If this doesn't help, try
LC_ALL=ja_JP.eucJP
and/or
LC_ALL=ja_JP.UTF-8
of course, keep the other lines as is.
 
Old 09-08-2004, 12:36 AM   #13
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
I put the following line:

export LC_CTYPE=ja_JP

in /etc/profile though. I'm using Redhat and Fedora.

And I change /etc/X11/xinit/xinitrc.d/xinput file:

Code:
#
# check $XIM and set a default $XIM value.
#
if [ -z "$XIM" ]; then
...
        *)
	    XIM="none"
        ;;
    esac
fi
to:

Code:
#
# check $XIM and set a default $XIM value.
#
if [ -z "$XIM" ]; then
...
        *)
	    XIM="kinput2"
        ;;
    esac
fi
I have canna and FreeWnn running on boot.

Last edited by chii-chan; 09-08-2004 at 12:37 AM.
 
Old 09-08-2004, 12:57 AM   #14
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Original Poster
Rep: Reputation: 0
results of locale with the different settings were the same.

Code:
LANG=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
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
 
Old 09-08-2004, 01:33 AM   #15
microsnot
LQ Newbie
 
Registered: Sep 2004
Distribution: Libranet
Posts: 14

Original Poster
Rep: Reputation: 0
chii-chan:

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl+Shift Unicode input gone, after installing Japanese Input Methodes polemon Linux - Newbie 1 09-20-2005 05:17 PM
Japanese input? clausawits Fedora 4 08-02-2004 06:59 AM
Japanese Input ertmann|CPH Linux - General 6 11-03-2003 07:13 PM
Japanese Input Phil Healey Linux - General 3 07-18-2003 01:10 PM
Japanese input Bernhard Linux - General 0 01-29-2002 06:33 AM


All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration