LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-16-2005, 02:28 AM   #1
BaltikaTroika
Member
 
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,
Baltika
 
Old 12-16-2005, 12:50 PM   #2
fouldsy
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 http://dockapps.org/ 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, 06:40 PM   #3
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Using ~/.fluxbox/keys seems like an easy way to build something decent:
Code:
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
 
Old 09-25-2006, 01:43 PM   #4
komofei
LQ Newbie
 
Registered: Sep 2006
Posts: 1

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

#!/bin/sh

LAYOUTS_FILE=~/.xkbSwitch/xkb_layouts
INDEX_FILE=~/.xkbSwitch/index

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

if [ $INDEX -ge $INNER_INDEX ]; then
let "INDEX -=$INNER_INDEX"
fi
#echo ${LAYOUTS[$INDEX]}
echo $INDEX >$INDEX_FILE
setxkbmap -layout ${LAYOUTS[$INDEX]}
fi
#//// 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.
 
  


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


All times are GMT -5. The time now is 05:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration