You are not logged in.

#1 2022-12-17 23:04:14

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Can't switch keyboard to Korean [solved]

I've been trying to setup my keyboard to use korean. So far I haven't had any luck. I've tried using https://wiki.archlinux.org/title/Localization/Korean and https://wiki.archlinux.org/title/Fcitx5, bit I haven't made any process. Some help would be much appreciated.

Last edited by jbreese321 (2022-12-23 19:36:38)

Offline

#2 2022-12-18 01:47:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

Please explain exactly what you did and what results you got i.e. provide the commands you executed and the output you got.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-12-18 09:16:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,411

Re: Can't switch keyboard to Korean [solved]

Also explain the context (console, X11, some wayland compositor) and nature of the problem.
fcitx is an IM to allow input of (eg.) Hangul (eg. using Hanja)
That's not the same as configuring a kr104/106 keyboard layout and all of that is unrelated to possible font issues (because you lack some font covering the cjk utf8 space)

Offline

#4 2022-12-18 14:37:28

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

Sorry. I installed adobe-source-han-sans-kr-fonts and enabled ko_KR.UTF-8. Next I tried "using the right alt key to switch input methods. I tried using a .xprofile,.xinitrc,and creating a script to run a startup, but none of these worked and I got an error of xmodmap:  unable to open display '' . I tried switching keyboard layouts via Gnome Keyboard, but the keyboard is only showing english keys. Next I tried installing nabi and fcitx because I had no idea what to do next, but got no where. I am using X11 and gnome and I am trying to write korean text to libreoffice; I don't need the ability to write korean text in a terminal console.

Offline

#5 2022-12-18 14:56:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,411

Re: Can't switch keyboard to Korean [solved]

got an error of xmodmap:  unable to open display '' . I tried switching keyboard layouts via Gnome Keyboard

Gnome defaults to wayland and "xmodmap:  unable to open display" means there was no X11 server around when you issued that.

loginctl session-status | curl -F 'file=@-' 0x0.st

tried using a .xprofile,.xinitrc,and creating a script to run a startup

How do you start the session?
Most DMs won't include xinitrc, xprofile should be, though and "a script to run a startup" is underspecified (xdg autostart script?)
In which context did you get the xmodmap error?

What is the output of

setxkbmap -print -query

Offline

#6 2022-12-18 15:35:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

jbreese321 wrote:

I tried using a .xprofile,.xinitrc,and creating a script to run a startup,

How? What did you put in the files? What was the content of the script?

jbreese321 wrote:

I tried switching keyboard layouts via Gnome Keyboard, but the keyboard is only showing english keys.

Is libgnomekbd installed? (Although I'm not sure this provides the layouts. Probably just the interface.)

Last edited by cfr (2022-12-18 15:36:26)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2022-12-18 16:20:06

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

http://0x0.st/o5iL.txt

I thought I switched my display to x11. I'm using gdb btw. When I mentioned that I ran a script during startup I was referring to xdg autostart script and I launched the program via gnome-session. I got the error when I signed in as root after I added 

xmodmap -e 'remove mod1 = Alt_R'
xmodmap -e 'keycode 108 = Hangul'
xmodmap -e 'remove control = Control_R'
xmodmap -e 'keycode 105 = Hangul_Hanja'

to my profile.

The output of setxbmap is 

 
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+kr:2+us:3+inet(evdev)+level3(ralt_switch)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
rules:      evdev
model:      pc105
layout:     us,kr,us
variant:    ,,
options:    lv3:ralt_switch

I put the following in the .xinitrc, .xinitc, and xdg autostart

xmodmap -e 'remove mod1 = Alt_R'
xmodmap -e 'keycode 108 = Hangul'
xmodmap -e 'remove control = Control_R'
xmodmap -e 'keycode 105 = Hangul_Hanja'

libgnomekbd is installed

Offline

#8 2022-12-18 16:20:41

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

* /etc/profile

Offline

#9 2022-12-18 16:50:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,411

Re: Can't switch keyboard to Korean [solved]

* /etc/profile

You can edit your posts to mend them.

xmodmap has no business in your ~/.profile and even less in /etc/profile

I'm using gdb btw

GDM - and it will not source your ".xinitrc", there's nothing such as ".xinitc", though the autostart script should™ have applied.

xmodmap -pk | curl -F 'file=@-' 0x0.st

The output of setxbmap is

So you've configured three layouts: us, kr and then us again, but no shortcut to toggle the group.

grep 'grp:' /usr/share/X11/xkb/rules/base.lst

(Don't post that, it's the list of available layout toggles)

Offline

#10 2022-12-18 17:00:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

Don't add those commands to /etc/profile because that gets sourced even when you're not using X. root doesn't have an X session so there's no DISPLAY and you get that error. You want them to run only, probably, for your normal user and only when you're in a graphical session. ~/.xprofile or something would be a better place.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2022-12-18 22:57:49

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

I guess I'm a bit confused on how to move forward from here? I tried putting the xmod commands into  ~/.xprofile , but I was unable to type Korean after that.

Something that I think is worth mentioning  is that when I set my keyboard to Korean and look at the load-out, it's still showing English characters

https://bpa.st/3P2BG

Offline

#12 2022-12-18 23:12:08

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

Offline

#13 2022-12-18 23:15:54

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

Sorry, but I'm not familiar with the term 'load-out' and I'm not sure what the paste you linked is supposed to show me.

Changing your keyboard to Korean won't change the output of programmes or the language in which messages etc. are displayed. The keyboard configuration doesn't affect the output, but only the way your input is translated. So if you want, say, gnome to display messages in Korean, changing the keyboard setting won't achieve that.

But, as I say, I'm not sure what I'm looking at, so the above comment may be entirely irrelevant.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2022-12-19 00:36:38

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

I wasn't trying to change the output of programs or languages in which messages are displayed. What i'm trying to accomplish is to take notes in Korean with LibreOffice.

When I was looking at the input source for Korean; I noticed that when I select Korean, it shows English letters. 

I'm not sure if that is relevant or not; I just wanted to point that out.

I would also like the ability to switch from Korean to English which is listed under the Localization/Korean wiki page.

I hope that clears some things up.

Offline

#15 2022-12-19 00:41:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

seth wrote:

So you've configured three layouts: us, kr and then us again, but no shortcut to toggle the group.

grep 'grp:' /usr/share/X11/xkb/rules/base.lst

(Don't post that, it's the list of available layout toggles)

Did you configure a toggle so you can switch between the layouts?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2022-12-19 01:05:30

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

Thanks for being so patient with me.

Yes I added the xmodmap commands  to my .xprofile

Offline

#17 2022-12-19 02:06:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

But did you configure a way to switch between layouts? What is the output of setxbmap now? The output should show you've configure one of the available layout toggles listed when you executed the grep command seth gave you above. I think this will show up in the list of options with the grp: prefix. so rather than just having

options:    lv3:ralt_switch

you should see an additional option in the list corresponding to the value of grp: you've configured. That should let you switch to Korean and the second US layout from the first US layout.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#18 2022-12-19 04:46:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,411

Re: Can't switch keyboard to Korean [solved]

setxkbmap -print -query
xmodmap -pk | curl -F 'file=@-' 0x0.st

@jbreese321, did you see that there's Korean version of the wiki article?
https://wiki.archlinux.org/title/Locali … %EC%96%B4) ?
I can't say anything about its accuracy, but it might help you out a lot.

Offline

#19 2022-12-22 21:54:06

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

I've just started learning Korean, so I wasn't able to understand the article.

Offline

#20 2022-12-22 22:01:11

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

The output of setxkbmap -print -query is

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+kr:2+us:3+inet(evdev)+level3(ralt_switch)+kr(ralt_hangul)+terminate(ctrl_alt_bksp)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
rules:      evdev
model:      pc105
layout:     us,kr,us
variant:    ,,
options:    lv3:ralt_switch,korean:ralt_hangul,terminate:ctrl_alt_bksp

Last edited by jbreese321 (2022-12-23 02:35:04)

Offline

#21 2022-12-22 22:02:09

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

Oops I posted the command result twice.

Offline

#22 2022-12-22 23:23:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

jbreese321 wrote:

Oops I posted the command result twice.

You can edit your posts, you know. wink


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#23 2022-12-23 02:33:58

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

I'll remember that for future posts.

Offline

#24 2022-12-23 02:53:05

jbreese321
Member
Registered: 2022-01-24
Posts: 50

Re: Can't switch keyboard to Korean [solved]

I fixed my issue. First I uninstalled fcitx5, then I installed ibus-hangul.

After that I edited /etc/environment

GTK_IM_MODULE=xim
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus


Then I exported the following: export OOO_FORCE_DESKTOP="gnome" to .xinitrc, .xprofile, or .xsession

Offline

#25 2022-12-23 02:58:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Can't switch keyboard to Korean [solved]

Great! Please mark your thread solved by editing your first post and modifying the subject, so people know there's a solution here.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB