You are not logged in.
I am having a strange issue with setting up xfce4 on my fathers' laptop. Every time I switch the keyboard layout, the x terminal emulator start acting weird:
[jarda-wien@primator ~]$ whoami
jarda-wien
[jarda-wien@primator ~]$ echo hello
bash: echo hello: command not found
[jarda-wien@primator ~]$ ping www.google.com
bash: ping www.google.com: command not found
[jarda-wien@primator ~]$ echo $PATH
bash: echo /bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin: No such file or directory
Before switching the keyboard, everything works fine... As this doesn't happen on virtual terminal, it may be an xorg/xfce issue. What do you make of it?
Offline
ok so I've made a workaround for that... The problem seems to be not only xfce4 related as the same behavior can be seen on yakuake running on xfce4 and every other terminal emulator I have tried, as well as on openbox and all the terminals. Anyway, here's the fix:
Remove any
Option "XkbLayout" "us,cz"
Option "XkbOptions" "grp:alt_shift_toggle"
and install xbindkeys from extra.
Next edit and save the following script somewhere:
#!/bin/bash
# Put your desired layouts, space separated, between the brackets
layout=(us de cz)
# Main code, do not change, unless you know what you're doing
current=$( setxkbmap -print | grep -o 'pc+[a-zA-Z0-9_-/]*' | sed 's/pc+//' )
num=${#layout[@]}
i=0
for use in ${layout[@]} ; do
i=$[ i + 1 ]
if [[ $current = $use ]] ; then
if [[ $i -eq $num ]] ; then
setxkbmap ${layout[0]}
break
else
setxkbmap ${layout[$i]}
break
fi
fi
done
exit $?
Make the script executable and try it! It should cycle through the specified layouts. The next step is to map the script to a keyboard shortcut in .xbindkeysrc (look up how in the wiki...)
Everything works now, even after switching the layout!!!
Offline
btw before writing the workaround, I've noticed, that one-word commands work fine, but as soon as there is a space character involved on the command line, "command not found" starts to arise. I think that the space character is somehow misinterpreted after performing the switch.
Offline