Answers:
首先安装自动切割器(sudo apt-get install autocutsel
)
然后打开您的/home/pi/.vnc/xstartup(nano /home/pi/.vnc/xstartup
)并按如下所示放置autocutsel -fork
:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
autocutsel -fork
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
然后它将在重新启动vnc服务器后工作
要停止VNC服务器:
vncserver –kill :1 (pick your display)
要启动VNC服务器:
vncserver :1 –geometry 1024x600 –depth 24
autocutsel -fork
为了确保复制/粘贴正常工作,我必须确保我的自动剪纸器首先出现在xstartup中
# Makes copy/past work - must come before RANDR 'fix'
#vncconfig -iconic &
autocutsel -s CLIPBOARD -fork
autocutsel -s PRIMARY -fork
# Get's rid of RANDR missing errors
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession