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.

Arko Elsenaar
  • 143
  • 1
  • 6

4 Answers4

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.

Hydraxan14
  • 1,876
  • 1
  • 13
  • 23
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'
Andy Anderson
  • 649
  • 1
  • 4
  • 11
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()
bstipe
  • 574
  • 4
  • 6
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

dgreene
  • 101