Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-02-19 16:10:58

nickman
Member
Registered: 2012-02-19
Posts: 3

Disappearing keyboard layouts

Hi there

I have this problem with the xfce4-xkb-plugin, that on random occassions it drops/looses the keyboard layouts other than the default one.

Sometimes this happens when I directly click on the button, or just change between the windows, or use the shortcut. I'd prefer the 'per window' option, yet I tried all the 'manage layouts' still no success and the layouts disappear.

On my previous installation I had the same problem like this guy had - the plugin completely gone: http://forum.xfce.org/viewtopic.php?id=5998

Now I'm using 0.5.4.3 and so far the plugin has never gone completely but the above problem of loosing the layouts still exist.

I'm using Debian Wheezy (2012.01.27.), 3.1.0-1-486 kernel, Xfce 4.8.0.3

Any suggestions are welcomed and let me know if you need some logs.

nm

Offline

#2 2012-02-25 16:33:25

nickman
Member
Registered: 2012-02-19
Posts: 3

Re: Disappearing keyboard layouts

It looks like either I'm the only one in the world who uses multiple keyboard layouts in XFCE, or the only one who has this problem. smile

Offline

#3 2012-02-25 19:10:26

cipricus
Member
Registered: 2012-02-25
Posts: 7

Re: Disappearing keyboard layouts

You are not the only one having this problem, far from that, this plug-in is very well known for this issue. It is said that it has no ability of keeping the settings when you change the session. But in my case a certain set of layouts (that I would like to change) was invariably loaded when I logged out/in, no matter whether I had saved my session or not.
I use Xubuntu myself but the problem may be similar to yours: you say some layouts disappear. Are they always the same that disappear?  I have one that reappears after I delete it and then log out and in. That is, a certain saved session was invariably loaded (but regarding only this plugin) no matter what session I chose. Is like I involuntarily have succeeded in saving a certain layouts set, but the wrong one.

I found  two files involved in this:
/home/user/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
and
/home/user/.config/xfce4/panel/xkb-plugin-43.rc

I have seen that the second has the options that are created when you change settings but are not saved on session logout
The first has the settings that are saved between sessions and that I needed to change. I found that after changing these settings my layouts and my toggle buttons are saved when I restart session.

Maybe you have errors in these files? They should look like this:
the second one:

display_type=1
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ro,fr
variants=,std,
toggle_option=grp:alt_shift_toggle
compose_key_position=

and the first:
<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="us,fr,ro"/>
    <property name="XkbVariant" type="string" value=",std"/>
  </property>
</channel>

Last edited by cipricus (2012-02-26 01:59:54)

Offline

#4 2012-02-25 20:44:20

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Disappearing keyboard layouts

I don't use it nor do I have more than one keyboard layout enabled, but a quick search in Debian's repository returned a few apps for that:
gxneur, xxkb, fbxkb, xkbind

Offline

#5 2012-02-26 22:09:36

nickman
Member
Registered: 2012-02-19
Posts: 3

Re: Disappearing keyboard layouts

Hello cipricus and secipolla thanks for the help.

I checked the files mentioned and updated my keyboards.xml as the Xkb properties were missing. My xkb-plugin-16.rc was correctly created when I added the plugin to the panel. The difference seems now is that the layouts don't disappear but they randomly default back to US.

What happens is for example:
- I have an Iceweasel window with US
- I change to a gedit window and set "latam" Spanish with deadtilde
- I change back to the Iceweasel window, actually don't do anything than browsing: opening/closing new tabs, I don't even type into the window
- after random amount of time I change back to gedit and it's US, not LATAM anymore

Later I realized that the latam with deadtilde looks to be buggy, as if I click on this, XFCE drops a "Plugin "Keyboard Layouts" unexpectedly left the panel, do you want to restart it?" message. Google gives some recent relevant results but since I have different version, the patch doesn't help: https://bugs.launchpad.net/ubuntu/+sour … bug/899290

As a workaround for this if I use the "es" layout and not "latam" at least the plugin doesn't crash.

But the random defaulting to US still happens regardless to if I use the manage layout is per-window or per-application, etc.

The ~/.xsession-errors doesn't say anything, any other idea to look around at least for logs?

Offline

#6 2012-02-27 17:36:36

cipricus
Member
Registered: 2012-02-25
Posts: 7

Re: Disappearing keyboard layouts

This plugin is buggy, no doubt about that. But I think this "bug" is different from the one to which I found a workaround. I'm out of my league already - I just found an empiric answer and shared it here. But yes, I noticed that the layout gets back to us when I use different apps as you described. No answer yet.

Offline

#7 2012-04-26 02:39:56

ipolevoy
Member
Registered: 2012-04-26
Posts: 1

Re: Disappearing keyboard layouts

I had the same problem, and have found a quick workaround. If you execute this command:
setxkbmap -print

you will get a list of installed layouts. I have installed two:
us
and
ru(phonetic)

Setting a layout is easy:
setxkbmap us
or
setxkbmap "ru(phonetic)"

Now, I still use the xfce4-xkb-plugin, but only as an indicator. After I figured this out, I created two scripts and wired then to keyboard shortcuts.
I hope this is helpful to someone
cheers

Offline

#8 2013-06-02 04:33:54

Rayonant
Member
Registered: 2013-01-10
Posts: 49

Re: Disappearing keyboard layouts

cipricus wrote:

You are not the only one having this problem, far from that, this plug-in is very well known for this issue. It is said that it has no ability of keeping the settings when you change the session. But in my case a certain set of layouts (that I would like to change) was invariably loaded when I logged out/in, no matter whether I had saved my session or not.
I use Xubuntu myself but the problem may be similar to yours: you say some layouts disappear. Are they always the same that disappear?  I have one that reappears after I delete it and then log out and in. That is, a certain saved session was invariably loaded (but regarding only this plugin) no matter what session I chose. Is like I involuntarily have succeeded in saving a certain layouts set, but the wrong one.

I found  two files involved in this:
/home/user/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
and
/home/user/.config/xfce4/panel/xkb-plugin-43.rc

I have seen that the second has the options that are created when you change settings but are not saved on session logout
The first has the settings that are saved between sessions and that I needed to change. I found that after changing these settings my layouts and my toggle buttons are saved when I restart session.

Maybe you have errors in these files? They should look like this:
the second one:

display_type=1
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ro,fr
variants=,std,
toggle_option=grp:alt_shift_toggle
compose_key_position=

and the first:
<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="us,fr,ro"/>
    <property name="XkbVariant" type="string" value=",std"/>
  </property>
</channel>

¡Thanks a lot Cirpicus! your solution worked for me, I edited my /home/user/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml to match the one you showed and the problem was solved.

Offline

#9 2013-07-07 23:34:19

digitsm
Member
From: Tehran/Iran
Registered: 2013-07-07
Posts: 1

Re: Disappearing keyboard layouts

cipricus wrote:

You are not the only one having this problem, far from that, this plug-in is very well known for this issue. It is said that it has no ability of keeping the settings when you change the session. But in my case a certain set of layouts (that I would like to change) was invariably loaded when I logged out/in, no matter whether I had saved my session or not.
I use Xubuntu myself but the problem may be similar to yours: you say some layouts disappear. Are they always the same that disappear?  I have one that reappears after I delete it and then log out and in. That is, a certain saved session was invariably loaded (but regarding only this plugin) no matter what session I chose. Is like I involuntarily have succeeded in saving a certain layouts set, but the wrong one.

I found  two files involved in this:
/home/user/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
and
/home/user/.config/xfce4/panel/xkb-plugin-43.rc

I have seen that the second has the options that are created when you change settings but are not saved on session logout
The first has the settings that are saved between sessions and that I needed to change. I found that after changing these settings my layouts and my toggle buttons are saved when I restart session.

Maybe you have errors in these files? They should look like this:
the second one:

display_type=1
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ro,fr
variants=,std,
toggle_option=grp:alt_shift_toggle
compose_key_position=

and the first:
<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="us,fr,ro"/>
    <property name="XkbVariant" type="string" value=",std"/>
  </property>
</channel>

This solution worked for me. I use xfce4-xkb-plugin v0.5.4.3-1+b1 from Linux Mint Debian Edtion (similar to Debian) repo. My xfce version is also 4.8.0.3. Don't know whether XKB developers fixed this bug, but if not they should consider this solution.

Offline

#10 2013-07-08 01:07:17

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: Disappearing keyboard layouts

digitsm wrote:

I use xfce4-xkb-plugin v0.5.4.3-1+b1 from Linux Mint Debian Edtion (similar to Debian) repo. My xfce version is also 4.8.0.3. Don't know whether XKB developers fixed this bug, but if not they should consider this solution.

I'm running Mint 14 Xfce (not Debian-based... or not directly Debian-based, I guess would be the correct way to phrase that). It includes the current(?) version of Xfce, 4.10. I just noticed my Update Manager was showing an update available. I checked and it's wanting to update my xfce4-xkb-plugin from 0.5.4.3-1ubuntu3 to 1:0.7.0-0ubuntu1~ppa0.12.10.1. That's quite a mouthful - but at least no one felt the need to add some goofy name to it like Halfwit Human, Francine, or Emphysemic like they seem to be doing with distros these days.

It may have fixed this bug. I don't know. Mint's Update Manager has a "tab" on each and every update called "Changelog," but the vast majority of them - including this particular update - only state "No changelog available" and I've never quite figured out who to blame.

In any event, it probably fixes something and/or else adds something. I looked on the webpage

http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin

for clues, but it is currently showing 0.5.4.3 as, err, Current.

I assume from the inclusion of "ppa" in the version designation that it's coming from either the Xfce 4.10 or the Xfce 4.12 PPA that I have added to my sources list. Does anyone know if it addresses the issue that is being discussed in this thread? (And/or what, exactly, this new version is for, what bugs are fixed, what new features are added?)

And it's off-topic, but does anyone have a list of addresses of people that are in charge of placing new versions of things into the various update-channels without including a simple text changelog to go with them? Actual physical addresses would be better, because I feel this is something important enough to mail - not email - my complaints. (Thanks!) It's not Xfce's fault. Or, at least, it's not just Xfce components. And it's not just things that I receive via PPA, either. Is this a Mint issue, or does everyone see updates in their update manager app with no corresponding changelog?

Regards,
MDM

EDIT: I'm going to go ahead and accept the updated plugin. Since I don't use it... Is there a really simple way that I can test it on my system to see if it has corrected the issue that you folks are having?

Last edited by MountainDewManiac (2013-07-08 01:17:09)


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#11 2013-07-08 01:41:56

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: Disappearing keyboard layouts

I just found out about the new version of xfce4-xkb-plugin:

http://mail.xfce.org/pipermail/xfce-announce/2013-May/000272.html
An Xfce Mailing List wrote:

Release notes for 0.7.0
=======================
[Please note that this is a development release.]

This is a development release for xfce4-xkb-plugin; it requires
xfce4-settings 4.11 or later.

2013-05-20 17:29
    * New version 0.7.0 - to be used with xfce4-settings 4.11 or later;
      do *not* use this version with XFCE 4.8 or 4.10, it won't work!
    * This is a fairly major rework - keyboard layouts are now
configured
      through xfce4-keyboard-settings and managed by xfsettingsd;
      xkb-plugin only manages per window/application layout prefs
      and just acts as a layout indicator otherwise
    * Many crashes/leaks fixed
    * More descriptive layout/variant names in tooltips/popup menus
    * xfce 4.10 panel compatibility
    * Text labels are scaled to the size of text area
    * Kazakh flag added
    * Panel 4.10 compatibility
    * Layout configs should no longer be lost (this is really handled
      by the code moved to xfce4-settings though)
    * XKB settings not managed by XFCE should no longer be overwritten
      (again, this is really handled by xfce4-settings now)
    * New dependency on garcon (used to launch xfce4-keyboard-settings)

NOTE: If you are using Xfce 4.10 and have the Xfce 4.10 and 4.12 PPAs enabled in your sources list (assuming your distro supports PPAs), then you should currently have xfce4-settings 4.11, so you are covered if you want to accept this update. Otherwise, take special note of the requirement.

Handy things, Xfce mailing lists. I think I'll subscribe to at least one of them (there are several).

Regards,
MDM

Last edited by MountainDewManiac (2013-07-08 01:44:04)


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#12 2013-09-03 12:50:52

peter.vojtek
Member
Registered: 2013-09-03
Posts: 1

Re: Disappearing keyboard layouts

ipolevoy's note un using setxkbmap was helpful to me.

I face this issue with xubuntu 12.04.3, xfce 4.8.0.3.

I hotfixed it following way (I need to switch between two keyboard layouts, 'sk' and 'us').
I created following shell script (named switch_us_sk_keyboard_layout.sh):

( setxkbmap -print | grep sk  ) && setxkbmap us || setxkbmap sk

and in Application Menu > Settings > Keyboard > Application Shorcuts
created new shortcut: when SHIFT+ALT is pressed, switch_us_sk_keyboard_layout.sh is called.

and the xfce4-xkb-plugin serves as indicator only.

Offline

#13 2014-01-07 15:10:16

juandresen
Member
Registered: 2014-01-07
Posts: 1

Re: Disappearing keyboard layouts

I had the same problem of xfce4-xkb-plugin crashing (Plugin "Keyboard Layouts" unexpectedly left the panel, do you want to restart it?) when trying to change the keyboard layout to latam (latin american layout). The problem is that the latam layout does not have any flag attached to it making the plugin to crash when trying to retrive the flag image. In gentoo the flag svg images are located in /usr/share/xfce4/xkb/flags you can just create as root a symlink to any convenient flag, for example the mexican flag

/usr/share/xfce4/xkb/flags $ sudo ln -s mx.svg latam.svg

this solved the crashing problem. I hope this helps.

Offline

#14 2014-02-19 13:57:26

wildanimal
Member
Registered: 2014-02-19
Posts: 1

Re: Disappearing keyboard layouts

I've been having the same problem as well on Debian 7.4 with Xfce 4.8. The keyboard layouts just default to us and the switch key is undefined.
I spent some time looking around at which files influence the plugin and managed to figure out this quick and dirty fix:

Find the file responsible for keyboard layouts:

/home/{user}/.config/xfce4/panel/xkb-plugin-10.rc (for me at least)

Make sure the keyboard layouts are set the way you want them and add the immutable (i) flag to the file as root:

sudo chattr +i xkb-plugin-10.rc

This prevents the file from being changed / deleted by anyone (even root). It seems the plugin resets this rc file at random, sometimes during login/logout, but also sometimes during an active session. Of course if you want to change the keyboard layouts, you'll have to remove the immutable flag to make any changes but at least it compensates for the plugin's buggy behavior.

Offline

#15 2014-08-16 08:58:55

Red Baron
Member
Registered: 2014-08-01
Posts: 1

Re: Disappearing keyboard layouts

My problem is even weirder on the latest Debian 7 Wheezy 64bit. I have 3 layouts and planning on adding a fourth: German, Bulgarian (traditional phonetic) and English (GB). The third one is there just so that I can type "<" and ">" since the German layout for these two keys returns a Cyrillic character (how weird is that?). But let's forget this and conentrate on the issue discussed here. Sometimes when I start my session everything is as I left it - three layouts, settings are okay. But quite often following happens:

- English (GB) disappears
- Bulgarian (traditional phonetic) becomes Bulgarian (new phonetic) (needless to say this change makes typing a nightmare)
- Shortcut for changing layouts (Left Ctrl + Left Shift) gets set to the defaul which is no shortcut at all

I get a more or less random combination of the listed above. On top of all that most of my desktop hotkeys (haven't change a thing and going with the defaults) DO NOT work at all in almost all applications (best job does Iceweasel where it seems that all hotkeys are working).

I find changing the file to immutable to be a possible solution however this is by no chance a "normal" solution. This behaviour that - as I can see - many people experience is obviously a serious bug. I say serious because this is an application for configuring your keyboard layouts and it doesn't do that properly at all.

Offline

Board footer

Powered by FluxBB