You are not logged in.
Hello,
I'm preparing for a presentation where I will send a video from my laptop to a projector via VGA cable (that's the only common port between the two devices). It's crucial that nothing but the video appears on the external display during the presentation. Is there a way to prevent the mouse cursor from entering the second display by accident?
Thanks!
Offline
Hello and welcome.
There used to be a program called "mouse jail" that did this. There is this gentoo wiki article that talks about it and this page has a still-working link to the source. You might want to give that a try to see if it still works.
Otherwise, you could write a script using xdotool to pre-define a containment area for the mouse and constantly monitor the mouse position and if it moves out of the containment area, automatically move it back to a location inside the containment area. Something like:
#!/bin/bash
# the location to move the mouse to when its outside of the containment area
MOVETO_X_LOC=100
MOVETO_Y_LOC=100
# the dimensions of the containment area that you want the mouse cursor to stay inside of
# (must be within the containment area)
TOP_X=100
TOP_Y=100
BOT_X=300
BOT_Y=300
# the check and move routine
while true
do
CURR_MOUSE_X=$(xdotool getmouselocation | awk '{print $1}' | awk -F':' '{print $2}')
CURR_MOUSE_Y=$(xdotool getmouselocation | awk '{print $2}' | awk -F':' '{print $2}')
if [ $CURR_MOUSE_X -lt $TOP_X ] || [ $CURR_MOUSE_X -gt $BOT_X ] || [ $CURR_MOUSE_Y -lt $TOP_Y ] || [ $CURR_MOUSE_Y -gt $BOT_Y ]
then
xdotool mousemove $MOVETO_X_LOC $MOVETO_Y_LOC
fi
sleep 0.5
done
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you, I'll give it a try.
Offline
VLC hides the mouse cursor (when you are not moving it) and has a full-screen mode. I used to use it to view videos on a (CRT) television via S-video cable and do not recall being troubled by any mouse-like distractions.
Regards,
MDM
Offline
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 529.1 KiB (Peak: 530.38 KiB) ]