We build embedded systems based on ubuntu 14.04 in which we have implemented kiosk-mode type behavior by using a custom X session. Here is the desktop ffile defining the session:
[Desktop Entry] Encoding=UTF-8 Name=Kiosk Mode Comment=AppName Kiosk Mode Exec=/usr/share/xsessions/appNameKiosk.sh Type=Application
And here is the session script (appNameKiosk.sh);
#!/bin/bash # Undefining the QT_QPA_PLATFORMTHEME environment variable disables the appmenu-qt5 package. That package is for putting # the app menu up in the global bar rather than on the app. It has a bug and results in no menu anywhere. We want the # menu on the app anyway. export QT_QPA_PLATFORMTHEME= metacity --replace & # Set audio volume to max - user can reduce with physical knob if needed. amixer set 'Master' 100% # This sets the window decoration theme to our theme, which removes the title bar on maximized windows - hence on # our main window. gsettings set org.gnome.desktop.wm.preferences theme AppName while true; do ~/AppName/bin/AppName.sh --kioskMode result=$? if [ $result -eq 125 ]; then poweroff fi if [ $result -eq 122 ]; then reboot fi sleep 3s # Any exit code that does not specify a specific behavior, just causes the loop to restart the app. done
The net result of this is that no GUI desktop is started up. Because of that, we cannot enter non-English characters in dialogs in our application.
I can run the system in normal desktop mode and use the Text Entry configuration to configure toggling through various languages. I can then enter character for German, Hebrew, Russian etc. based on the keyboard mapping that is enabled via the special keystroke (default is 'Super-space'). However when running in kiosk mode, I just get the English characters.
My inference is that the key mapping is performed by some component that is started/installed by the normal desktop session startup (gnome-session seems to be the thing that does that).
How can I start that same component in my script?
EDIT: To clarify, the question is not how to get multiple keymaps enabled. I can use desktop mode to do that if needed. The question is how to actually switch between them once in kiosk mode. The special keystroke configured in the Text Entry settings item, has no effect in kiosk mode.