How to close epiphany through a script with cron?
0
votes
1
answer
1562
views
I have been making scripts to open and close a specific website with a cronjob on the raspberry Pi. The opening script works perfectly. It is as follows:
#!/bin/bash
export DISPLAY=:0 && epiphany-browser http://mywebsite
sleep 30
xte "key F11" -x:0
xte "key F5" -x:0
But the one to close the browser doesn't work at all, and I can't figure out why. Is there something wrong with the script? I made it by looking at this SuperUser question .
#!/bin/bash
WID =
xdotool search "epiphany-browser" | head-1
xdotool windowactivate --sync $WID
xdotool key --clearmodifiers ctrl+q
Note: Couldn't get this code to work but the "killall" command works just fine.
Asked by angelfmf
(23 rep)
Jul 29, 2015, 11:21 AM
Last activity: Jan 20, 2018, 05:49 PM
Last activity: Jan 20, 2018, 05:49 PM