SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-02-18 11:29:50

sgk
New Member
Registered: 2009-02-18
Posts: 2

Keyboard switching in Openbox (greek and english) - Crunchbang Linux

I had a problem activating the Keyboard switching in my Eee PC (crunchee linux -8.10.2-). No matter what I did (changes in the xorg.conf, etc) nothing seemed to work. So, here is the solution.

1) To see what keyboard layouts are installed and what key combination to use run
$ xprop -root | grep XKB

2) Install fbxkb
$ sudo apt-get install fbxkb
Go to /usr/share/fbxkb/images and rename zz.png to old_zz.png. Then rename us.png to zz.png. This way you are going to have the american flag shown on the keyboard switching applet when you have chosen US as default locale.

3) run
$ sudo dpkg-reconfigure console-setup
and setup the keyboard (choose pc 105) and the - us,gr- for the keyboard options. Also type - extended - for the XkbVariant to enable the typing of EURO sign. Also choose lctrl_lshft for key combination to switch keyboards.
For some strange reason all changes in /etc/X11/xorg.conf have no effect before you run at least once the dpkg-reconfigure and set the proper values. After that the xorg.conf file can be used to set values for the keyboard to override the default values.

4) To override all the above and set your own (not limited by the reconfigure program) choices edit the /etc/X11/xorg.conf file and include the following

Section "InputDevice"
Identifier  "keyboard"
Driver      "kbd"
Option      "CoreKeyboard"
Option      "XkbRules" "xorg"
Option      "XkbLayout" "us,gr"   
Option      "XkbVariant" ",extended"
Option      "XkbOptions" "grp:shifts_toggle,lv3:ralt_switch"
EndSection

This will allow you to switch keyboards by pressing left and right shifts simultaneously. And the little applet will change flags. You can also switch keyboards by clicking on the fbxkb applet.

Offline

Be excellent to each other!

#2 2009-02-20 10:59:28

bobobex
The Better Half
From: Lincoln, UK
Registered: 2008-11-26
Posts: 1,211

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

Thanks for posting this fix smile


Politeness, Respect, Trust, Humility - forum etiquette I abide by!
twitter

#! forum moderator

Online

#3 2009-02-20 13:14:54

corenominal
WRONG
From: Lincoln, UK
Registered: 2008-11-20
Posts: 5,037
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

Hello sgk smile

Thank you for sharing your solution. This is something I have been looking into myself and I am trying to include for the next LiveCD. I have come up with a slightly different solution which does not require any editing of xorg.conf, but the end result is the same. Interestingly, I have packaged a patched version of fbxkb which should fix step 2 of your solution, if you are interested in testing, it can be found at:

32bit: http://crunchbang.net/packages-8.10.tes … 2_i386.deb
64bit: http://crunchbang.net/packages-8.10.tes … _amd64.deb

P.S. Welcome to the forums! smile

Offline

#4 2009-10-31 19:33:24

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

sgk wrote:

...3) run
$ sudo dpkg-reconfigure console-setup
and setup the keyboard (choose pc 105) and the - us,gr- for the keyboard options. Also type - extended - for the XkbVariant to enable the typing of EURO sign. Also choose lctrl_lshft for key combination to switch keyboards.
..

after the keyboard choice I didn't see the other options at all (2 languages, extended).
It was all about the console, so I'm stuck here hmm

edit: I do now have an icon "be" (Belgium)

bxkb 0.6
X11 Keyboard switcher

below, next to the network connection thing. 
Still stuck though neutral

Last edited by catch22 (2009-10-31 19:41:08)


#!+mocp=music in my ears

Offline

#5 2009-10-31 20:28:22

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

don't understand, fbxkb is not loaded at all? Open up your autostart.sh and check if "(sleep 1s && fbxkb) &" line is commented out.


.::Blood just looks the same when you open the veins::.

Offline

#6 2009-10-31 20:47:03

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

VILLA21 wrote:

don't understand, fbxkb is not loaded at all? Open up your autostart.sh and check if "(sleep 1s && fbxkb) &" line is commented out.

I'm sure I saw a folder called fbxkb (before installing that .deb) but don't recall where...
"Locate" nor "find" in terminal give me anything useful, and "find files" in pcmanfm has never found anything so far. Where is it located? edit: found autostart.sh in openbox two seeconds later (by accident) but don't see anything concerning "sleep" or "fbxkb"

Last edited by catch22 (2009-10-31 20:50:59)


#!+mocp=music in my ears

Offline

#7 2009-10-31 21:18:31

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

Here's the first 20 lines of my autostart.sh:

# Run the system-wide support stuff
#. $GLOBALAUTOSTART

# Programs to launch at startup
# =============================

# Start session manager
lxsession &

# Start Bluetooth applet
#bluetooth-applet &

# Enable power management
gnome-power-manager &

# Set-up keyboard maps and sytem tray switcher
# tip - quickly toggle between keyboard maps by holding both shift keys!
#setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll gb,us,de,fr &
(sleep 1s && fbxkb) &
# ^^ note: if using the LiveCD, you can also change to a different

.::Blood just looks the same when you open the veins::.

Offline

#8 2009-10-31 21:28:51

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

VILLA21 wrote:

Here's the first 20 lines of my autostart.sh:

# Run the system-wide support stuff
#. $GLOBALAUTOSTART

# Programs to launch at startup
# =============================

# Start session manager
lxsession &

# Start Bluetooth applet
#bluetooth-applet &

# Enable power management
gnome-power-manager &

# Set-up keyboard maps and sytem tray switcher
# tip - quickly toggle between keyboard maps by holding both shift keys!
#setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll gb,us,de,fr &
(sleep 1s && fbxkb) &
# ^^ note: if using the LiveCD, you can also change to a different

here's mine; it looks completely different:

# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# Set a background color
BG=""
if which hsetroot >/dev/null; then
    BG=hsetroot
else
    if which esetroot >/dev/null; then
    BG=esetroot
    else
    if which xsetroot >/dev/null; then
        BG=xsetroot
    fi
    fi
fi
test -z $BG || $BG -solid "#303030"

# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
       eval `dbus-launch --sh-syntax --exit-with-session`
fi

# Make GTK apps look and behave how they were set up in the gnome config tools
if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
  /usr/libexec/gnome-settings-daemon &
elif which gnome-settings-daemon >/dev/null; then
  gnome-settings-daemon &
# Make GTK apps look and behave how they were set up in the XFCE config tools
elif which xfce-mcs-manager >/dev/null; then
  xfce-mcs-manager n &
fi

# Preload stuff for KDE apps
if which start_kdeinit >/dev/null; then
  LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi

# Run XDG autostart things.  By default don't run anything desktop-specific
# See xdg-autostart --help more info
DESKTOP_ENV=""
if which /usr/lib/openbox/xdg-autostart >/dev/null; then
  /usr/lib/openbox/xdg-autostart $DESKTOP_ENV
fi

it's located in /etc/X11/openbox


#!+mocp=music in my ears

Offline

#9 2009-10-31 21:37:11

omns
#! wanderer
From: ~/
Registered: 2008-11-25
Posts: 5,131

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

catch22 wrote:

here's mine; it looks completely different:

it's located in /etc/X11/openbox

Well it would. The autostart.sh being shown and discussed by others here is a user specific file, whilst this is one a system wide configuration.

Offline

#10 2009-10-31 21:40:34

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

omns wrote:
catch22 wrote:

here's mine; it looks completely different:

it's located in /etc/X11/openbox

Well it would. The autostart.sh being shown by others here is a user specific file, whilst this is one a system wide configuration.

but

VILLA21 wrote: ... Open up your autostart.sh and check if "(sleep 1s && fbxkb) &" line is commented out.

...? (where's that question mark smiley?)


#!+mocp=music in my ears

Offline

#11 2009-10-31 21:42:18

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

So add it after the # Enable power management line like in mine. So, what's the output of xprop -root | grep XKB? Also have a look at faq of fbxkb site:
http://fbxkb.sourceforge.net/faq.html

ps:aha, you're a musician! a belgian who knows about Smyrneika and Rebetika! smile The four "R"s in music, Roots-Rock-Reggae-Rebetiko smile
Cheers!


.::Blood just looks the same when you open the veins::.

Offline

#12 2009-10-31 21:54:27

omns
#! wanderer
From: ~/
Registered: 2008-11-25
Posts: 5,131

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

erm, so let's just clarify then, autostart.sh for a user is located at ~/.config/openbox/autostart.sh

Offline

#13 2009-10-31 21:56:37

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

VILLA21 wrote:

So add it after the # Enable power management line like in mine. So, what's the output of xprop -root | grep XKB? Also have a look at faq of fbxkb site:
http://fbxkb.sourceforge.net/faq.html

ps:aha, you're a musician! a belgian who knows about Smyrneika and Rebetika! smile The four "R"s in music, Roots-Rock-Reggae-Rebetiko smile
Cheers!

you forgot Retsina-makes-you-get-up-and-dance-zebeikiko  wink
I'm confused (not an unusual state for me ;-))

add it

you mean:

sleep 1s && fbxkb

?

after the # Enable power management line like in mine

but I don't see "enable power management" in mine, only in yours.

ludo@ludo-desktop:~$ xprop -root | grep XKB
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "be", "", "lv3:ralt_switch"

I'll check that URL now


#!+mocp=music in my ears

Offline

#14 2009-10-31 21:58:49

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

omns wrote:

erm, so let's just clarify then, autostart.sh for a user is located at ~/.config/openbox/autostart.sh

yeah, i'm talking about this one, or simply rightclick->Preferences->Openbox Config->Edit autostart.sh


.::Blood just looks the same when you open the veins::.

Offline

#15 2009-10-31 22:00:57

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

omns wrote:

erm, so let's just clarify then, autostart.sh for a user is located at ~/.config/openbox/autostart.sh

aha, completely different story (I was in X11 somewhere) lol
I'll re-read the whole thread and see if I can catch up smile


#!+mocp=music in my ears

Offline

#16 2009-10-31 22:03:44

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

ludo@ludo-desktop:~$ xprop -root | grep XKB
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "be", "", "lv3:ralt_switch"

means that only the "be" keyboard locale is installed then. Actually what i did was just the 3rd step of the 1st post:
sudo dpkg-reconfigure console-setup
then be careful to choose the locales you're interested to, ie us,be,gr

Last edited by VILLA21 (2009-10-31 22:04:18)


.::Blood just looks the same when you open the veins::.

Offline

#17 2009-10-31 22:26:18

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

ok, so I commented out (take away #) (sleep 1s && fbxkb) &
and rebooted. Now I see "US" at the bottom of my screen (fbxkb 0.6
X11 Keyboard switcher) but luckily I'm still in azerty hmm

VILLA21 wrote:

ludo@ludo-desktop:~$ xprop -root | grep XKB
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "be", "", "lv3:ralt_switch"

means that only the "be" keyboard locale is installed then. Actually what i did was just the 3rd step of the 1st post:
sudo dpkg-reconfigure console-setup
then be careful to choose the locales you're interested to, ie us,be,gr

ok, so I repeated that step again, and I still don't see any option during that process to choose languages at all.
The final output was this: 

ludo@ludo-desktop:~$ sudo dpkg-reconfigure console-setup
[sudo] password for ludo: 
 * Saving console font and keymap for next boot...                       [ OK ] 
update-initramfs: Generating /boot/initrd.img-2.6.28-13-generic
ludo@ludo-desktop:~$ 

εδιτ. aha!!! I took this from the URL you sent before:

ludo@ludo-desktop:~$ setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr
ludo@ludo-desktop:~$ ;ςερτυ

and as you can see I can switch now smile μια χαρα! cool
thanks so much for your patience smile

Last edited by catch22 (2009-10-31 22:33:28)


#!+mocp=music in my ears

Offline

#18 2009-10-31 22:37:14

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

εντάξει, θα χαρώ να σε δω στην Ελλάδα να παίζεις blues...και ρεμπέτικα!
See you smile


.::Blood just looks the same when you open the veins::.

Offline

#19 2009-10-31 22:43:03

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

VILLA21 wrote:

εντάξει, θα χαρώ να σε δω στην Ελλάδα να παίζεις blues...και ρεμπέτικα!
See you smile

I always carry my instrument with me cool παίζω τα φισαρμονικα λιπον... wink

Last edited by catch22 (2009-10-31 22:43:23)


#!+mocp=music in my ears

Offline

#20 2009-10-31 22:48:38

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

catch22 wrote:
VILLA21 wrote:

εντάξει, θα χαρώ να σε δω στην Ελλάδα να παίζεις blues...και ρεμπέτικα!
See you smile

I always carry my instrument with me cool παίζω τα φισαρμονικα λιπον... wink

χαχα, οκ, last post, we're already offtopic, get the English - Greek Spelling dictionary addon for firefox:
https://addons.mozilla.org/el/firefox/addon/3451


.::Blood just looks the same when you open the veins::.

Offline

#21 2009-11-01 10:01:40

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

catch22 wrote:

... aha!!! I took this from the URL you sent before:

ludo@ludo-desktop:~$ setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr
ludo@ludo-desktop:~$ ;ςερτυ

and as you can see I can switch now smile μια χαρα! cool
thanks so much for your patience smile

...but this morning I turn on the pc and see US (instead of BE or GR) at the bottom of the screen... when I type I'm still in azerty though. The possible switch (shift left+shift right) doesn't work anymore roll
I see there's another possible fix suggested here this morning:
http://crunchbanglinux.org/forums/post/43624/#p43624
which I'll try (afraid it'll give syntax errors again though)
now, some strong wake up coffee first cool
εδιτ:after the crash I had this morning (yes, I feel like I'm holding 2 threads hostage here)
http://crunchbanglinux.org/forums/post/43632/#p43632 (message 12) and the recovery (so glad I could fix it) I tried this again:

ludo@ludo-desktop:~$ setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr

and low and behold, it works again. Now if there'd be a way to make it permanent?

Last edited by catch22 (2009-11-01 12:50:38)


#!+mocp=music in my ears

Offline

#22 2009-11-01 16:42:00

VILLA21
Member
From: Greece
Registered: 2009-09-16
Posts: 44
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

catch22 wrote:
catch22 wrote:

... aha!!! I took this from the URL you sent before:

ludo@ludo-desktop:~$ setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr
ludo@ludo-desktop:~$ ;ςερτυ

and as you can see I can switch now smile μια χαρα! cool
thanks so much for your patience smile

...but this morning I turn on the pc and see US (instead of BE or GR) at the bottom of the screen... when I type I'm still in azerty though. The possible switch (shift left+shift right) doesn't work anymore roll
I see there's another possible fix suggested here this morning:
http://crunchbanglinux.org/forums/post/43624/#p43624
which I'll try (afraid it'll give syntax errors again though)
now, some strong wake up coffee first cool
εδιτ:after the crash I had this morning (yes, I feel like I'm holding 2 threads hostage here)
http://crunchbanglinux.org/forums/post/43632/#p43632 (message 12) and the recovery (so glad I could fix it) I tried this again:

ludo@ludo-desktop:~$ setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr

and low and behold, it works again. Now if there'd be a way to make it permanent?

So, add this line to your autostart.sh, if exists uncomment it out

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr &

ie:

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr &
(sleep 1s && fbxkb) &


.::Blood just looks the same when you open the veins::.

Offline

#23 2009-11-02 19:40:05

catch22
#! Junkie
From: Belgium, Europe
Registered: 2009-10-16
Posts: 470
Website

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

VILLA21 wrote:

...So, add this line to your autostart.sh, if exists uncomment it out

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr &

ie:

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll be,gr &
(sleep 1s && fbxkb) &

ευχαριστώ! uncommenting both lines did the trick smile


#!+mocp=music in my ears

Offline

#24 2009-11-11 11:53:09

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

Hello! (γεια σας Έλληνες και φιλέλληνες big_smile)

I'm having a little problem with fbxkb. Obviously I can change the keyboard language by pressing alt+shift but the icon on tray is stacked to US no matter what, and I think that normally if I click on it the language should change, but it doesn't.

If I kill it and run it again it works as it should.

Searching to google about that problem I had found in a forum that I don't remember (sorry), that if fbxkb is starting before something else about desktop, it will stack. So I guess that if I sleep it for some time (currently for 10sec) it will load unstucked. unfortunately that doesn't work.

do you have any ideas about that problem?

I'm using: #!: 9.04.01 , kernel: 2.6.28.16-generic, fbxkb: 0.6


EDIT I haven't removed the comment on setxkbmap...

Last edited by slapfish (2009-12-10 20:54:20)

Offline

Help fund CrunchBang, donate to the project!

#25 2010-06-26 17:01:52

AndreAPL
Member
Registered: 2010-04-05
Posts: 18

Re: Keyboard switching in Openbox (greek and english) - Crunchbang Linux

For future reference,

all it takes is to edit /etc/default/keyboard smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo