View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007463||Kali Linux||[All Projects] Feature Requests||public||2021-11-30 06:35||2021-11-30 23:14|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0007463: Automation Script for Keyboard settings|
please deliver a small config script with kali e.g. /bin/setlang $lang to make it easier to persist a custom language setting.
It's annoying to play half an hour with the undocumented part of Kali to get it working!
isroot=$(id | grep "root");
if [ -z "$isroot" ]; then
echo "You're not root..";
if [ -z "$1" ]; then
echo "[usage]: $0 <lang>";
# persist for general mapping (doesn't really work!)
setxkbmap -layout "$1"
localectl --no-convert set-x11-keymap "$1"
#persist for login screen
echo '@reboot setxkbmap -layout "$1" \
@reboot localectl --no-convert set-x11-keymap "$1"' >> /etc/crontab
# fixes the defaults
echo "" > /etc/default/locale
echo "LANG=$1.UTF-8" >> /etc/default/locale
echo "LC_ALL=$1.UTF-8" >> /etc/default/locale
echo "Done with setting the lang to $1";
|Steps To Reproduce||login mask should provide the right language settings (keyboard mapping) if not it needs to be adjusted..|
like German nodeadkeys: z instead of y.. (etc)
||Script is untested !!! Written out of mind|
Have you tried defining your keyboard layout in "/etc/lightdm/lightdm.conf"?
Adding the following in the "[Seat:*]" section will do the trick:
not tried, like in the other report.
it's basically the same code but after login or when the lightdm (greeter) starts?
Should work like @reboot
Thanks for the contribution, if you could set it with a sed script (overwriting the defaults inside the conf by using /bin/setlang), would be fine.
... /bin/setlang <code> would be easier than running 20 commands and adjusting 20 popups :D
||and it should be possible to make a dir inside the cronjobs dir.. no or only one line needs to be added to crontab... which makes things easier.|