--- startx 2024-10-18 18:58:17.397362336 +0200 +++ startx.new 2024-10-18 19:42:07.031549883 +0200 @@ -204,10 +204,24 @@ 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=$?