Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-16-2005, 03:28 AM   #1
Registered: Sep 2004
Distribution: Debian 4.0, Ubuntu 6.10, Ubuntu Server 6.06
Posts: 134

Rep: Reputation: 15
Fluxbox: Change languages / keyboard layout?

Under KDE, I had a nice little icon in the taskbar that I could click in order to change languages (from English to Russian). Is there an easy way to do this under fluxbox?

So far, I love fluxbox, but since I need to type in two languages, it's not incredibly useful yet. There's nothing I can find about this in either the faq or other documentation.

Any ideas are appreciated,
Old 12-16-2005, 01:50 PM   #2
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
System apps like gKrellM have plugins such as xkb which allows you to switch between different keyboard maps, but you might not want all the functionality of gKrellM (worth looking at though!).

You may well find something on that will run in the corner of your fluxbox desktop and allow you do what you wish, but since I only need the one language I've never tried it.
Old 12-16-2005, 07:40 PM   #3
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Using ~/.fluxbox/keys seems like an easy way to build something decent:
Mod4 k e :Exec setxkbmap $ENGLISH
Mod4 k r :Exec setxkbmap $RUSSIAN
for, say, ENGLISH=us and RUSSIAN=xyzzy (or plugh, or an actual name of a russian keyboard layout).

However, you probably need to switch X input method, which I don't know how to do (well, I do know how for uim/skk, but that's for japanese).

わたし わ ひほんご お わからない ^_^

hth --Jonas
1 members found this post helpful.
Old 09-25-2006, 02:43 PM   #4
LQ Newbie
Registered: Sep 2006
Posts: 1

Rep: Reputation: 1
Try use this little script

I create little script to fix problem for switching araound preffered keyboard layouts.
You can map in fluxbox keys file this script:
Shift Control k :execcommand xkbSwitch

1) Copy this script into folder which you have in your $PATH.
2) Create hidden folder ~/.xkbSwitch
3) Create file ~/.xkbSwitch/xkb_layouts and write your preffered layouts (e.g us, de, sk, ...) into file, every layout at new line.

After restart your fluxbox, you can use CTRL+SHIFT+k for araound changing your layouts or execute command xkbSwitch for it.

xkbSwitch script:



if [ ! -r $LAYOUTS_FILE ]; then
echo 'File $LAYOUTS does not exist!'
exit 0
if [ ! -r $INDEX_FILE ]; then
echo '0' > $INDEX_FILE
read line <$INDEX_FILE
let "INDEX=$line+1"
while read line
let "INNER_INDEX +=1"

if [ $INDEX -ge $INNER_INDEX ]; then
#echo ${LAYOUTS[$INDEX]}
setxkbmap -layout ${LAYOUTS[$INDEX]}
#//// end of script
I'm sorry, but spaces in script are not visible in this reply
When you have any problems with script email me: komornik AT linux DOT sk

I hope that I help you.
1 members found this post helpful.


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
XFCE: how to change the keyboard layout? athanatos Slackware 18 09-17-2008 02:37 AM
keyboard layout [fluxbox 0.9*] solferino Linux - Newbie 2 12-16-2005 07:41 PM
choosing default keyboard layout in KDE or how to switch languages correctly sensovision Linux - General 3 05-23-2004 05:56 PM
How do i change the keyboard layout? ArmedCoder Linux - Hardware 0 11-20-2003 07:25 PM
keyboard layout in fluxbox ceedeedoos Linux - Newbie 2 09-05-2003 05:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 PM.

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