I have a Raspberry Pi 3 using Raspbian with a Chromium browser set to boot and display a web page of a live report, with Chromium refreshing every 2 minutes in order to keep live updated data displayed on the screen. Pretty much a kiosk to display a live report to a workplace.

Unfortunately, every time the Pi boots, I need to log in with the user details in order to see the report (it's IBM Cognos).

I can't get Chromium to auto log-in, so the next thing I can think of is to have a keyboard macro execute at boot, which would be something like

Wait 10 seconds 
Wait 2 seconds

That would be sufficient to log in. Is there an easy way to do this?

  • sudo apt-get install xautomation Mar 21, 2018 at 20:12
  • sleep 10 && xte 'key Return' -x:0 Mar 21, 2018 at 20:13
  • sleep 2 && xte 'key Tab' -x:0 Mar 21, 2018 at 20:14
  • May be easier to put the xautomation commanda in a start.sh script Mar 21, 2018 at 20:15

1 Answer 1


Install xautomation. Add kiosk.sh to the autostart file and have it launch chromium-browser to a specific page, login and go full screen. Examples of key pushes are included.

#leafpad kiosk.sh                                                            
#Adjust the URL

chromium-browser --disable-restore-session-state http://xyz.com -x:0 &
sleep 15 && xte 'key Tab' 'key Tab' 'key Tab' 'key Enter' -x:0

#reset zoom
sleep 10 && xte 'key F11''keydown Control_L''key 0''keyup Control_L' -x:0    

# zoom  in
#sleep 5 && xte 'keydown Control_L' 'key equal' 'keyup Control_L' -x:0
# zoom out
#sleep 5 && xte 'keydown Control_L' 'key minus' 'key minus' 'key minus' 'key$
# reset zoom
#sleep 5 && xte 'keydown Control_L' 'key 0' 'keyup Control_L' -x:0
  • Sorry mate, I am very green with unix so I might need a bit more of a fleshed out response. Do I put that script in ~/.config/lxsession/LXDE-pi/autostart?? I will paste the current startup command and please let me know where I should put your commands. lxpanel --profile LXDE-pi pcmanfm --desktop --profile LXDE-pi xscreensaver -no-splash xset s off xset -dpms xset s no blank usr/bin/chromium-browser --kiosk --disable-session-crashed-bubble --disable-infobars <html site> The session crashed bubble also isn't disabled, so that's not working either. @Andy thanks mate
    – user83701
    Apr 12, 2018 at 0:01
  • Add a link in the autostart file the points to the .sh file. Apr 12, 2018 at 12:25
  • Make the script first. Make the script executable. Run the script and test it does what you require. Add a link to the script in the autostart file. Apr 12, 2018 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.