From 8469075fd6dcdc92fe43aa39f8b13eba6c0c107f Mon Sep 17 00:00:00 2001 From: Someone Date: Wed, 23 Dec 2015 21:07:36 +0100 Subject: [PATCH] run a vm in a new X session + synergy + kbindkeys --- runvm.sh | 6 ++++++ runvm.xbindkeysrc.template | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 runvm.sh create mode 100644 runvm.xbindkeysrc.template diff --git a/runvm.sh b/runvm.sh new file mode 100755 index 0000000..e5b2a2e --- /dev/null +++ b/runvm.sh @@ -0,0 +1,6 @@ +xhost +local: +sed -e 's/#VMNAME#/'$1'/g' ~/s/runvm.xbindkeysrc.template > ~/.xbindkeysrc.template.$1 +xbindkeys -f ~/.xbindkeysrc.template.$1 +/usr/bin/synergyc -f --debug ERROR --name fujivm 10.11.0.1:24800 & +VirtualBox --startvm $1 --fullscreen +rm ~/.xbindkeysrc.template.$1 diff --git a/runvm.xbindkeysrc.template b/runvm.xbindkeysrc.template new file mode 100644 index 0000000..003c5dc --- /dev/null +++ b/runvm.xbindkeysrc.template @@ -0,0 +1,44 @@ +# For the benefit of emacs users: -*- shell-script -*- +########################### +# xbindkeys configuration # +########################### +# +# Version: 1.8.6 +# +# If you edit this file, do not forget to uncomment any lines +# that you change. +# The pound(#) symbol may be used anywhere for comments. +# +# To specify a key, you can use 'xbindkeys --key' or +# 'xbindkeys --multikey' and put one of the two lines in this file. +# +# The format of a command line is: +# "command to start" +# associated key +# +# +# A list of keys is in /usr/include/X11/keysym.h and in +# /usr/include/X11/keysymdef.h +# The XK_ is not needed. +# +# List of modifier: +# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock), +# Mod3 (CapsLock), Mod4, Mod5 (Scroll). +# + +# The release modifier is not a standard X modifier, but you can +# use it if you want to catch release events instead of press events + +# By defaults, xbindkeys does not pay attention with the modifiers +# NumLock, CapsLock and ScrollLock. +# Uncomment the lines above if you want to pay attention to them. + +#keystate_numlock = enable +#keystate_capslock = enable +#keystate_scrolllock= enable + +# Examples of commands: + +"VBoxManage controlvm #VMNAME# keyboardputscancode 1d 38 53 d3 b8 9d" + Control+Alt + Delete + -- 2.43.0