3

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? – Curt J. Sampson 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. – Curt J. Sampson Jun 1 '17 at 6:15
1

xdotool mousemove

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

#!/usr/bin/env bash

sleep_period=60s 

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}
    done
   sleep ${sleep_period}
done

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

1

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'
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'
pygame.init()
scr_size = 2, 2
pygame.display.set_mode(scr_size)
pygame.mouse.set_pos(1, 1)
pygame.quit()
0

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.