source: tests/Xtestlib @ 1bce4e1

Last change on this file since 1bce4e1 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 730 bytes
Line 
1#!/bin/bash
2
3
4# Speelt een opgenomen Xnee file af via ssh
5# Met het ./Xrecord commando kun je opnemen
6#FILE=file die moet worden afgespeelt
7Xplay()
8{
9        if [ "$DESCRIPTION1" ]; then
10                echo -e "\e[1;32m### Xplay: $DESCRIPTION1\e[0m"  >&2
11                DESCRIPTION1=
12        fi     
13       
14        RET=0
15        if cat $FILE | ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -i ./id_rsa "root@$IP" "DISPLAY=:0 XAUTHORITY=/.Xauthority cnee -v  --replay"; then
16                RET=0
17                echo "XPLAY OK"
18        else
19                echo -e "\e[1;31mXPLAY FAILED!\e[0m" >&2
20                RET=1
21        fi
22               
23        return $RET
24}
25
26
27Xrecord()
28{
29        echo "Recording....press ctrl-C to end"
30        ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -i ./id_rsa "root@$IP" "DISPLAY=:0 XAUTHORITY=/.Xauthority cnee -v --record --mouse --keyboard" > $FILE
31}
Note: See TracBrowser for help on using the repository browser.