You are not logged in.

#1 2008-03-04 20:00:29

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Xfce: how to add a second (input) language?

There's a keyboard layout switch for the panel, but how am I supposed to get something to switch between smile ?

Offline

#2 2008-03-04 22:54:30

veek
Member
Registered: 2006-03-10
Posts: 167

Re: Xfce: how to add a second (input) language?

I think you need to setup scim: http://wiki.archlinux.org/index.php/Scim

Offline

#3 2008-03-04 23:29:17

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

veek's suggestion looks interesting, but I understood you're question as a quite simple one. If you just want to switch between keyboard layouts in XFCE you only need to add the ones you wish to your xorg.conf file (etc/X11/xorg.conf).

This is my keyboard section:

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
        Option      "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "dell"
    Option "XkbLayout" "se, us, ru" <----- THIS IS THE IMPORTANT PART! I use se=swedish, us=US english and ru=russian
    Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll" <----- could be usefull
EndSection

XFCE will pick up these settings, and the applet will work. The last option is good if you want to switch keyboard layout the classical alt+shift way.

Offline

#4 2008-03-05 05:42:53

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

No, I certainly don't want scim smile

The xorg.conf thing is good, but first I have to make my other languages known to the system (install locales?). Then I can choose the way to switch. In certain systems there are lists of languages to be configured; one has to tick off your Swedish, Russian, etc. Then to keyboard layouts: xorg.conf, applet, whatever. Its the "install several locales" part which I'm asking about. If my wording is wrong, please correct me.

It's probably the question of what kind of i18n packages I have to acquire. I don't mean application specific packages; I mean plain input, anywhere, like what kde-i18n packages provide for.

Last edited by Llama (2008-03-05 08:30:28)

Offline

#5 2008-03-05 08:31:01

tami
Member
From: Norway, Oslo
Registered: 2007-11-10
Posts: 58
Website

Re: Xfce: how to add a second (input) language?

I think you are looking for /etc/locale.gen file. Uncomment the languages you need and run locale-gen as a root. Follow the advice of KimTjik then - for the right keyboard layouts.

Hope it helps,

tami

PS. In case of troubles check:
http://wiki.archlinux.org/index.php/Locale


"Possession means worries and luggage bags one has to drag along." Little My wink

Offline

#6 2008-03-05 18:40:44

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

I've uncommented ru_RU UTF8 and ru_RU ISO-8859-5 (they did look familiar smile ), then started locale-gen. The script reported some success, but no languages appeared in the Keyboard Layout Switcher listbox. I confess I haven't yet tried to edit xorg.conf because I do know that Xfce can manage languages bypassing xorg.conf. I prefer to manage the latter option first.

Offline

#7 2008-03-06 11:06:36

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

yes, I got my Russian by adding ru to XkbLayout. I also installed kbd-ru-keymaps, which offers ru-utf layout, but the keyboard layout switcher shows it as UNKNOWN. Now it works a bit with ru, but I want specifically ru winkeys layout (it concerns itself with the punctuation marks, mostly). How can I get it?

If there is a Wiki about all these niceties, please, refer me to it. I'm trying Arch because it's a "nuts and bolts" system; its user may have the luxury of understanding what he's doing from the ground up, without being swamped with technicalities. So far it unfolded pretty much as advertised; here it looks like voodoo again smile . Please, help not just with the layout, but with understanding, too.

PS A symptom: VLC player says on starting:

Cannot set locale to ".

In the console I also see messages about missing locales and falling back to something ("C" ?)

Last edited by Llama (2008-03-06 11:18:47)

Offline

#8 2008-03-06 15:39:24

tami
Member
From: Norway, Oslo
Registered: 2007-11-10
Posts: 58
Website

Re: Xfce: how to add a second (input) language?

I'm glad it worked for you a bit. On the other hand - I know nothing about Russian keyboards - but I found something which may be of a help (it's in Russian and my Russian is rather "rusty"...). Anyway, here's the link:
http://wiki.archlinux.org/index.php/Xor … %B8%D0%B9)

As to switching keyboard layouts - I personally do this from the command line :
setxkbmap no
setxkbmap pl

where no and pl refer to: no - Norwegian, pl - Polish, (you should use probably ru)

Post the adequate parts of your /etc/rc.conf and /etc/X11/xorg.conf here - perhaps we could spot something there.

My keyboard  section of xorg looks like this:

#Option      "CoreKeyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "no,pl"
    Option         "XkbOptions" "altwin:super_win,lv3:ralt_switch"
EndSection

where:  "XkbOptions" "altwin:super_win,lv3:ralt_switch" refers to winkey and right alt key.

Hope it helps you a bit,
tami

Last edited by tami (2008-03-06 15:41:04)


"Possession means worries and luggage bags one has to drag along." Little My wink

Offline

#9 2008-03-06 16:31:13

/devnull.nsb
Member
From: USA
Registered: 2008-03-03
Posts: 10

Re: Xfce: how to add a second (input) language?

Llama: Well I dont know what to tell you regarding the VLC error your getting. I myself get the same error, however; If you just click OK the prgram work just fine.  All my back up's of DVD's in XVID, and DivX and, all my .FLV Dl's from youtube and google video run's fine..

Offline

#10 2008-03-07 08:46:43

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

Now I'm at this point:

/etc/rc.conf:

LOCALE="en_US.utf8"
KEYMAP="us"

/etc/locale.gen:

en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8
ru_RU ISO-8859-5

/etc/X11/xorg.conf:

Option "XkbRules" "xorg"
Option "XkbLayout" "us,ru"
Option "XkbVariant" "winkeys"

It switches between us an ru, but the ru isn't actually ru winkeys. ru winkeys means that period is mapped to "/" and comma is mapped to "?". A guru advice needed smile !

Llama: Well I dont know what to tell you regarding the VLC error your getting. I myself get the same error, however; If you just click OK the prgram work just fine.

That much I figured out for myself smile ; I can tell you even more: it's because the English locale isn't generated. Uncomment en_US.UTF-8 UTF-8 in your /etc/locale.gen and run locale-gen.

Last edited by Llama (2008-03-07 08:48:18)

Offline

#11 2008-03-07 09:19:46

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

I've seen as a XkbLayout "ru(winkeys)", so I suppose you just test whether the following works or not:

Option "XkbLayout" "us,ru(winkeys)"

As far as I understand, even though not using that version since I'm used to work without it, you then don't need any "XkbVariant".

Offline

#12 2008-03-07 10:03:59

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

Thank you, KimTjik, it helped.

even though not using that version since I'm used to work without it,

How do you mean? Bypassing xorg? In other distros you may see such an option in Xfce settings.

Offline

#13 2008-03-07 10:32:57

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

Good it worked.

No, I just meant that while using Russian keyboard l stick to the plain "ru" and not the "ru(winkeys)". I don't see any reason to not use Xorg settings, since they're pretty simple and easy to use.

Offline

#14 2008-03-07 11:13:41

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Xfce: how to add a second (input) language?

ru(winkeys) is the vanilla layout in Russia, as nobody ever wanted to get frustrated at a Windows keyboard big_smile .

Offline

#15 2008-03-07 12:00:47

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

Might give it a try sometime, but I don't even use keyboards with Russian layouts. I write shorthand, but I somehow just learn where the keys are (just as I do with the US one), so I've never thought about it much.

Offline

#16 2008-09-16 00:58:21

Espina
Member
From: San Jose, Costa Rica
Registered: 2008-09-16
Posts: 5

Re: Xfce: how to add a second (input) language?

KimTjik wrote:

veek's suggestion looks interesting, but I understood you're question as a quite simple one. If you just want to switch between keyboard layouts in XFCE you only need to add the ones you wish to your xorg.conf file (etc/X11/xorg.conf).

This is my keyboard section:

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
        Option      "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "dell"
    Option "XkbLayout" "se, us, ru" <----- THIS IS THE IMPORTANT PART! I use se=swedish, us=US english and ru=russian
    Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll" <----- could be usefull
EndSection

XFCE will pick up these settings, and the applet will work. The last option is good if you want to switch keyboard layout the classical alt+shift way.

I have reached the xorg.conf file, but I can't edit it.  It says this "Can't open file to write'.

I have exactly the same problem, but I just want to switch between english (en) and spanish (es).


Can anyone help me with this problem?  Thanks!

M

Offline

#17 2008-09-16 08:45:02

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

Espina wrote:

I have reached the xorg.conf file, but I can't edit it.  It says this "Can't open file to write'.

I have exactly the same problem, but I just want to switch between english (en) and spanish (es).


Can anyone help me with this problem?  Thanks!

M

Shouldn't be a problem as long as you do it as root. Depending on you configuration you'll need to get access rights by 'su' or 'sudo'.

su -c 'nano /etc/X11/xorg.conf'

Last edited by KimTjik (2008-09-16 10:35:10)

Offline

#18 2008-09-17 04:09:24

Espina
Member
From: San Jose, Costa Rica
Registered: 2008-09-16
Posts: 5

Re: Xfce: how to add a second (input) language?

Thank you... I just use a command line a friend gave me last night:

gksudo mousepad /etc/X11/xorg.conf

With that command line I was able to open the xorg.conf file with super user privileges, so from there forward it was a piece of cake.

Thank you for everything!

Offline

#19 2008-09-17 15:57:51

Espina
Member
From: San Jose, Costa Rica
Registered: 2008-09-16
Posts: 5

Re: Xfce: how to add a second (input) language?

I only have one por question:

My keyboard configuration is for 'pc105'

But my '<' and '>' does not appear to function.  Everitime I hit it, what apears in the screen is the '|'

can you help me please?

Offline

#20 2008-09-17 16:02:00

Espina
Member
From: San Jose, Costa Rica
Registered: 2008-09-16
Posts: 5

Re: Xfce: how to add a second (input) language?

oh, and also:  I have changed from 'pc105' to 'pc101' and nothing happend; switched back again and nothing happened eiter.

Offline

#21 2008-09-17 18:59:03

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Xfce: how to add a second (input) language?

Espina have you tested without the "XkbModel" line? It could be tricky to find the exact right one, but sometimes it works perfectly well without it. On my current working station I haven't set any "XkbModel" and it works perfectly well.

Offline

#22 2008-09-19 16:13:26

Espina
Member
From: San Jose, Costa Rica
Registered: 2008-09-16
Posts: 5

Re: Xfce: how to add a second (input) language?

KimTjik wrote:

Espina have you tested without the "XkbModel" line? It could be tricky to find the exact right one, but sometimes it works perfectly well without it. On my current working station I haven't set any "XkbModel" and it works perfectly well.

No, I haven't try it, but I will as soon as I get home.

One professor at the University suggested me to try the 'pc 100, 101, 102, 103, 104' lines.  I haven't try it yet either, but could it work or it just doesn't make any sense?

Offline

#23 2010-10-14 23:11:14

joksim
Member
From: Skopje, Macedonia
Registered: 2009-01-30
Posts: 2

Re: Xfce: how to add a second (input) language?

Hello,
I'm a long time linux user but newbie at arch. I have problem with adding second input language. I'm using macedonian (MK) as my secon language and I can't get it towork. First i tried chainging xorg.conf with in the following  manner:
#-----
Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option      "XkbRules" "xorg"
    Option      "XkbModel" "pc105"
    Option         "XkbLayout" "us,mk"
    Option         "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
    Option         "XkbOptions" "ctrl:swapcaps"
EndSection
#------

but didn't work. Then I installed xxkb with the following config (~.xxkbrc)

#------
XXkb.mainwindow.enable: yes
XXkb.mainwindow.appicon: yes
XXkb.mainwindow.type: tray
XXkb.mainwindow.in_tray: yes
XXkb.mainwindow.geometry: 12x12+0+0
XXkb.mainwindow.label.enable: yes
XXkb.mainwindow.label.text.1: US
XXkb.mainwindow.label.text.2: MK
XXkb.mainwindow.label.background: #1F1F1F
XXkb.mainwindow.label.foreground: orange
XXkb.mainwindow.label.font: -misc-*-r-*-12-*

XXkb.controls.two_state: no
XXkb.group.base: 1
XXkb.group.alt: 2

XXkb.button.enable: no

XXkb.bell.enable: no

#---------

Then I created the file: /etc/X11/xorg.conf.d/keyboard.conf :

#---------
Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option          "XkbModel" "pc105"
    Option         "XkbLayout" "us,mk"
    Option         "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
    Option         "XkbOptions" "ctrl:swapcaps"
EndSection
#---------

I read somewhare that HAL can manage input language so I tried chaingint the /etc/hal/fdi/policy/10-keymap.fdi file:

#---------
    <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">us, mk</merge>
      <merge key="input.xkb.options" type="string">grp:alt_shift_toggle,grp_led:scroll</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>

#---------

I tried several other methods but none of them worked!!!!!
I'm using Archbang (Archlinux with Openbox) for my Lenovo U330 laptop.

What can I to make this work.

BTW I have menu entries with setxkbmap en and setxkbmap mk but they slow my GUI when I switch them and I want to have input language based on the application, somthing that is provided by xxkb.

Thanks in advance,
Joksim


--
Boban

Offline

#24 2010-10-15 11:01:20

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Xfce: how to add a second (input) language?

joksim, here on the Arch forums we expect you to read and respect the Forum Etiquette when posting, especially the parts about Necro-Bumping and Pasting Pictures and Code in this case.

Closing this thread, you can start a new one for your particular problem.


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB