Thursday, May 31, 2018

Gracefully Exit Firefox using shell script and xdotool,Linux Teacher Sourav,Kolkata 09748184075

sudo apt-get install xdotool

if [[ -n `pidof firefox` ]];then
  WID=`xdotool search "Mozilla Firefox" | head -1`
  xdotool windowactivate --sync $WID
  xdotool key --clearmodifiers ctrl+q
fi



Source:http://how-to.wikia.com/wiki/How_to_gracefully_kill_(close)_programs_and_processes_via_command_line

No comments:

Post a Comment