I have checked the 'Hide taskbar when not in use' in the advanced settings, and I'm using unclutter to hide my mouse. Yet, when I boot my Pi, the mouse is located on top of the Raspberry icon on the task bar, that causes the toolbar not to hide.

I have also tried placing the Task bar to the bottom, but the mouse moves along with it on boot, causing the Task bar to stay visible.

  • Yes, this is all correct. What is the problem you're trying to solve, and why is it a problem?
    – cjs
    Apr 19 '17 at 22:46
  • @CurtJ.Sampson I think OP is trying to stop TaskBar from showing at boot and I am running to same issue.
    – ThN
    May 31 '17 at 14:23
  • The issue he's described he wants to fix is the starting position of the mouse pointer. The answer to this is trival: move the mouse slightly. If that doesn't work for you, your real problem is not the position of the mouse pointer, much as speed too low in reverse gear is not the real problem of someone trying to drive on a highway. He should try using a different gear, not try to make reverse gear faster. So back away from asking "how do I implement this solution" and instead describe the problem in a way that will let us offer better and easier solutions.
    – cjs
    Jun 1 '17 at 6:15

xdotool mousemove

Someone mentions moving the mouse in a bash script in this stackexchange answer using the xdotool mousemove command:

#!/usr/bin/env bash


while true; do
    until top -bn 2 -d 0.01 | sed -nrs '8p' | awk '{if($9>5){exit 1}else{exit 0}}'; do
      xdotool mousemove 0 100
      xdotool mousemove 0 50
      sleep ${sleep_period}
   sleep ${sleep_period}

You should be able to adapt it to move the mouse away from the taskbar automatically after logging in.


Also using the xautomation package to move the mouse may do what you are trying to achieve.

sudo apt-get update && sudo apt-get install xautomation

Add a line to run at autostart:

nano ~/.config/lxsession/LXDE-pi/autostart

Ctrl+x to save. Add:

xte 'mousemove 0 0'

You could use a Python script to move the mouse pointer. Use at boot cron to run the script.

#!/usr/bin/env python

import os
import pygame
os.environ['DISPLAY'] = ':0.0'
scr_size = 2, 2
pygame.mouse.set_pos(1, 1)

I know this is ancient, and it's not Pixel (I'm on stretch for RPi3b+), but this worked for me...

nano ~/.config/lxsession/LXDE-pi/autostart

Then remove the line, @point-rpi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.