Peter Pearman
unread,Apr 1, 2023, 9:39:53 AMApr 1Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TigerVNC User Discussion/Support
Hello All,
I am on a MacPro running Monterey 12.6.3. My vnc client is the native one accessed through Finder=>Go=>Connect to Server. My local machine has a German (Switzerland) keyboard and the the language is set to CH-DE.
All keys work as expected locally on the local Mac. But when connected to an Ubuntu workstation via vnc, the Alt key has very limited functionality, as to ctrl and cmd.
I am using Xvnc from TigerVNC 1.12.0 on Ubuntu 22.04. I access this through a tunnel to the server as 5903.127.0.0.1:5903. Alt-3 produces # and linefeed, and Alt-7 and Alt-/ produce nothing, instead of | and \, respectively. Cmd-C and other Cmd-key combinations also do not work. This behavior is reproduced in Libreoffice and Rstudio.
I start a desktop on the remote Ubuntu workstation with
~$ tigervncserver -xstartup startxfce4 -geometry 1920x1080 -localhost yes :3
the contents of ~/.vnc/xstartup are:
.vnc$ cat xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-terminal-emulator -geometry 80x24+10+10 &
x-window-manager &
#gnome-panel &
#gnome-settings-daemon &
#metacity &
#nautilus &
xrdb $HOME/.XRESOURCES
startxfce4 &
On the Ubuntu machine, the file ~/.XRESOURCES is empty.
In the Settings->Keyboard window in Xfce4,
Keyboard model is ‘Macintosh’, which is what is on the MacPro
'Change layout' and 'Compose key' options are both set to ‘-‘
Keyboard layout is ‘German (Switzerland)’. (I have also tried the other Swiss-German keyboard options, but still no working Alt key).
I reviewed the logging of keyboard events with
~$ dev -event keyboard
A single quick press and release of the Alt key appears to produce two Keypress events and two Keyrelease events:
KeyPress event, serial 28, synthetic NO, window 0x3600001,
root 0x519, subw 0x0, time 4835427, (-189,72), root:(1412,477),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 28, synthetic NO, window 0x3600001,
root 0x519, subw 0x0, time 4835427, (-189,72), root:(1412,477),
state 0x1, keycode 64 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3600001,
root 0x519, subw 0x0, time 4835427, (-189,72), root:(1412,477),
state 0x9, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3600001,
root 0x519, subw 0x0, time 4835609, (-189,72), root:(1412,477),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
At the Ubuntu workstation, the physical keyboard is a Spanish PC keyboard, and all keys work as expected. At the workstation:
$ localectl
System Locale: LANG=en_US.UTF-8
LC_NUMERIC=es_ES.UTF-8
LC_TIME=es_ES.UTF-8
LC_MONETARY=es_ES.UTF-8
LC_PAPER=es_ES.UTF-8
LC_NAME=es_ES.UTF-8
LC_ADDRESS=es_ES.UTF-8
LC_TELEPHONE=es_ES.UTF-8
LC_MEASUREMENT=es_ES.UTF-8
LC_IDENTIFICATION=es_ES.UTF-8
VC Keymap: n/a
X11 Layout: es
X11 Model: pc105
It appears that changing the keyboard layout on Xfce during a tigervnc connection doesn’t update the settings of the accessed Xfce4 desktop. How should I go about getting a functional Alt key when using a vnc connection to this Ubuntu workstation? I don’t want to change the Ubuntu machine’s keyboard definition permanently because the computer needs to be usable as a workstation, and doesn’t have a Mac keyboard.
Thanks in advance!
Peter