--- startx 2019-01-23 10:43:37.695615650 +0100 +++ startx.new 2019-01-23 10:48:57.318111308 +0100 @@ -215,10 +215,23 @@ done fi +if [ -f $HOME/.xinitrc ] && ! grep -q setxkbmap $HOME/.xinitrc; then + cd $HOME + if grep -q mate-session .xinitrc; then + sed '/exec/i \ +/usr/bin/setxkbmap' .xinitrc > bof + mv bof .xinitrc + else + sed '/DESKTOP_SESSION/i \ +/usr/bin/setxkbmap' .xinitrc > bof + mv bof .xinitrc + fi + cd - +fi +mytmp="/tmp/$(id -nu)" +mkdir -p $mytmp - - -xinit "$client" $clientargs -- "$server" $display $serverargs +xinit "$client" $clientargs -- "$server" $display $serverargs 1>$mytmp/startx.out 2>$mytmp/startx.err retval=$?