Bug 355602 - Autostart script with custom XKB layout is erased when logging in
Summary: Autostart script with custom XKB layout is erased when logging in
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_autostart (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 20:58 UTC by Joel
Modified: 2016-09-27 10:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel 2015-11-19 20:58:22 UTC
For many years now, I have a custom xkb layout that swaps a few keys. At the startup of KDE, a script applies this custom layout:

% cat xkb.sh
#!/bin/sh

xkbcomp -w 0 -R/usr/share/X11/xkb/ ${HOME}/etc/xkb/layout-${HOST_KEYBOARD} ${DISPLAY}

Recently, this custom layout is regularly lost. It doesn't even seem to necessarily follow any particular event. For example this morning, I had to launch my script twice, once after my laptop came out of sleep and another time because the layout had been lost while I was working on it (but not after any particular event).

I posted this bug on bugs.freedesktop.org at first (https://bugs.freedesktop.org/show_bug.cgi?id=93025) but was redirected here.

Reproducible: Always

Steps to Reproduce:
1. Setup a custom layout with xkbcomp
2. Wait a bit and do stuff
3. The custom layout was reset and replaced by the regular layout
Comment 1 Joel 2016-01-25 22:29:28 UTC
I forgot to add in the bug description that my custom xkb layout is installed through an autostart script. I played a bit more with it and found that the script is executed but is quickly overridden when Plasma starts.

Basically, I created a script that performs the xkb modification and also touches a file in my home. After logging into Plasma, the file is created in my home but the xkb modification is not effective. If I relaunch the script by itself, I get my custom xkb layout.

My guess is that my custom layout run by the autostart script is quickly erased by a another layout configuration from Plasma.
Comment 2 David Edmundson 2016-09-27 10:09:37 UTC
>My guess is that my custom layout run by the autostart script is quickly erased by a another layout configuration from Plasma.

Correct. A background daemon that makes the UI follow the user's settings.

We can't simultaneously have tools that set keyboard layouts for users and sometimes not set the keyboard layout. 

You should be able to disable the keyboard layout daemon with 
system settings -> startup and shutdown -> background services -> keyboard.