summaryrefslogtreecommitdiffstats
path: root/system/spice-vdagent/files
diff options
context:
space:
mode:
author Matteo Bernardini <ponce@slackbuilds.org>2012-11-20 11:37:38 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commit6ff9ab871cbe8a8090be0b9d0ed06bcf6fc13a43 (patch)
treeaa02312c8b57c9a9ac9fa64ed6dfc0ab4ab6bc98 /system/spice-vdagent/files
parent80182e069db1625d41f42d5211592949a31d1fc6 (diff)
downloadslackbuilds-6ff9ab871cbe8a8090be0b9d0ed06bcf6fc13a43.tar.gz
slackbuilds-6ff9ab871cbe8a8090be0b9d0ed06bcf6fc13a43.tar.xz
system/spice-vdagent: Added (spice agent for Linux vms).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/spice-vdagent/files')
-rw-r--r--system/spice-vdagent/files/06-spice-vdagent.conf37
-rw-r--r--system/spice-vdagent/files/rc.spice-vdagent64
2 files changed, 101 insertions, 0 deletions
diff --git a/system/spice-vdagent/files/06-spice-vdagent.conf b/system/spice-vdagent/files/06-spice-vdagent.conf
new file mode 100644
index 0000000000..f74be0db09
--- /dev/null
+++ b/system/spice-vdagent/files/06-spice-vdagent.conf
@@ -0,0 +1,37 @@
+Section "ServerLayout"
+ Identifier "Default Layout"
+ Screen 0 "Screen0" 0 0
+ InputDevice "Keyboard0" "CoreKeyboard"
+ InputDevice "Mouse" "CorePointer"
+ InputDevice "Tablet" "SendCoreEvents"
+EndSection
+
+Section "InputDevice"
+ Identifier "Keyboard0"
+ Driver "kbd"
+ Option "XkbModel" "pc105"
+ Option "XkbLayout" "us"
+EndSection
+
+Section "InputDevice"
+ Identifier "Mouse"
+ Driver "mouse"
+ Option "Device" "/dev/input/mice"
+ #Option "Emulate3Buttons" "yes"
+EndSection
+
+Section "InputDevice"
+ Identifier "Tablet"
+ Driver "evdev"
+ Option "Device" "/dev/input/event3"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "XSPICE"
+ DefaultDepth 24
+ SubSection "Display"
+ Viewport 0 0
+ Depth 24
+ EndSubSection
+EndSection
diff --git a/system/spice-vdagent/files/rc.spice-vdagent b/system/spice-vdagent/files/rc.spice-vdagent
new file mode 100644
index 0000000000..9c3ff19cc8
--- /dev/null
+++ b/system/spice-vdagent/files/rc.spice-vdagent
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# spice-vdagentd Agent daemon for Spice guests
+#
+# Red Hat specific script slightly adapted for the Slackware init system
+# by Matteo Bernardini <ponce@slackbuilds.org>
+#
+# Description: Together with a per X-session agent process the spice agent
+# daemon enhances the spice guest user experience with client
+# mouse mode, guest <-> client copy and paste support and more.
+
+exec="/usr/sbin/spice-vdagentd"
+prog="spice-vdagentd"
+port="/dev/virtio-ports/com.redhat.spice.0"
+pid="/var/run/spice-vdagentd/spice-vdagentd.pid"
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ /sbin/modprobe uinput > /dev/null 2>&1
+ # In case the previous running vdagentd crashed
+ /usr/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock
+ /usr/bin/echo "Starting $prog: "
+ $exec -s $port
+ retval=$?
+ /usr/bin/echo
+ [ $retval -eq 0 ] && echo "$(pidof $prog)" > $pid && /usr/bin/touch $lockfile
+ return $retval
+}
+
+stop() {
+ if [ "$(pidof $prog)" ]; then
+ /usr/bin/echo "Stopping $prog: "
+ /bin/kill $pid
+ else
+ /usr/bin/echo "$prog not running"
+ return 1
+ fi
+ retval=$?
+ /usr/bin/echo
+ [ $retval -eq 0 ] && rm -f $lockfile $pid
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ $1
+ ;;
+ stop)
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ *)
+ /usr/bin/echo $"Usage: $0 {start|stop|restart}"
+ exit 2
+esac
+exit $?