gui: handle legacy keymap setting /qubes-keyboard
This commit is contained in:
parent
c332de9653
commit
dbacd07b43
@ -21,6 +21,8 @@
|
||||
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import subprocess
|
||||
|
||||
import qubes.config
|
||||
import qubes.ext
|
||||
|
||||
@ -79,6 +81,16 @@ class GUI(qubes.ext.Extension):
|
||||
if kbd_layout:
|
||||
vm.untrusted_qdb.write('/keyboard-layout', kbd_layout)
|
||||
|
||||
# Legacy value for setting keyboard layout
|
||||
try:
|
||||
xkb_keymap = subprocess.run(['/usr/bin/setxkbmap', '-print'],
|
||||
stdout=subprocess.PIPE)
|
||||
if xkb_keymap.stdout:
|
||||
vm.untrusted_qdb.write('/qubes-keyboard', xkb_keymap.stdout)
|
||||
except FileNotFoundError:
|
||||
# Prevent any reason for 'setxkbmap' being not present
|
||||
pass
|
||||
|
||||
# Set GuiVM prefix
|
||||
guivm_windows_prefix = vm.features.get('guivm-windows-prefix', 'GuiVM')
|
||||
if vm.features.get('service.guivm-gui-agent', None):
|
||||
|
Loading…
Reference in New Issue
Block a user