VNC blocking local display/input by turning off screen and keyboard mouse

I had been searching for a solution to this problem for ever. When i vnc to my desktop from home i don't want others to be able to control/see my desktop at all.

Solution turnedout to be simple though completely undocumented, here is the script




export DISPLAY=:0


#Turn the local display off

xrandr --output VGA1 --off


# Resize the display to something useful

xrandr --fb 1366x768


# Detach local mouse and keyboard

MOUSEID=`xinput | grep ImPS | sed -e 's/^.*id=\\([0-9]*\\).*/\\1/'`

KEYBOARDID=`xinput | grep AT | sed -e 's/^.*id=\\([0-9]*\\).*/\\1\/'`


xinput --float $MOUSEID

xinput --float $KEYBOARDID

Post new comment