Hi Misalf
I take back my previous statement. The machine I was referring to is running Xvesa, though I do recall someone else mentioning
they saw it under Xorg.
Would something like this be possible? Maybe via ~/.X.d/ .
sudo echo "something" > /dev/input/mice
Don't know if you could get that to work. Here's something which does seem to fix it though:
#include <stdio.h>
#include <unistd.h>
#include <linux/input.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <string.h>
// Compile using:
// gcc -march=i486 -mtune=i686 -Os -s -pipe -Wall mousemove.c -o mousemove
// Run using:
// sudo mousemove `cat /proc/bus/input/devices | grep mouse | grep event | awk '{ print $3 }'`
int main(int argc, char *argv[])
{
struct input_event event, event_end;
char mouse[256]="/dev/input/";
int i;
if(argc < 2)
{
printf("Mouse event required, i.e. event3\n");
return(-1);
}
strcat(mouse, argv[1]);
int fd=open(mouse, O_RDWR);
if (fd < 0)
{
printf("Error opening mouse:%s\nCould not open %s\n", strerror(errno), mouse);
return(-1);
}
memset(&event, 0, sizeof(event));
memset(&event, 0, sizeof(event_end));
gettimeofday(&event.time, NULL);
event.type=EV_REL;
event.code=REL_X;
event.value=50;
gettimeofday(&event_end.time, NULL);
event_end.type=EV_SYN;
event_end.code=SYN_REPORT;
event_end.value=0;
for (i=0; i < 10; i++)
{
write(fd, &event, sizeof(event));// Move the mouse
write(fd, &event_end, sizeof(event_end));// Show move
usleep(50000);// wait
}
close(fd);
return 0;
}
Compile the program and place the mousemove executable in ~/.local/bin
Create a file called mousemove in ~/.X.d with the following contents:
sudo mousemove `cat /proc/bus/input/devices | grep mouse | grep event | awk '{ print $3 }'`
My scripting skills are lacking so there's probably a better way of implementing the above command.