Results 1 to 1 of 1

Thread: installing a firefox/seamonkey kill/restore script

  1. #1
    Join Date
    Feb 2009
    Beans
    154
    Distro
    Ubuntu Development Release

    installing a firefox/seamonkey kill/restore script

    if you have not noticed, this is my ubuntu master thesis....
    http://ubuntuforums.org/showthread.php?t=1836890
    check it out and share it with your friends =)

    alt + f2
    run
    Code:
    gnome-terminal
    then become super user to install the script system wide


    (for firefox)

    Code:
    sudo su
    Code:
    cat > /usr/bin/killfirefox << "EOF"
    ps -e | grep firefox | sed 's/\(.[0-9]*\).*/\1/' | xargs kill -n 9
    firefox &
    EOF
    chmod 555 /usr/bin/killfirefox
    exit
    and then hit enter to exit root mode.

    (for sea monkey)

    Code:
    sudo su
    Code:
    cat > /usr/bin/killseamonkey << "EOF"
    ps -e | grep seamonkey | sed 's/\(.[0-9]*\).*/\1/' | xargs kill -n 9
    seamonkey &
    EOF
    chmod 555 /usr/bin/killseamonkey
    exit
    and then hit enter to exit the sea monkey installing script

    to use these scripts when firefox / seamonkey is frozen simply

    alt + f2

    run

    Code:
    killfirefox
    or

    Code:
    killseamonkey
    and a new instance of firefox or seamonkey will load

    i find mplayer crashing heavily on my system from electric sheep, so im gonna install a mplayer kill command similar to these....

    Code:
    sudo su
    Code:
    cat > /usr/bin/killmplayer << "EOF"
    ps -e | grep mplayer | sed 's/\(.[0-9]*\).*/\1/' | xargs kill -n 9
    EOF
    chmod 555 /usr/bin/killmplayer
    exit
    command now to kill mplayer

    Code:
    killmplayer
    as you can see just replace the grep name and it will kill whatever process. change the /usr/bin name to what ever the executable file name will be, and change permissions on the new file to make it so it can run. to find process names to plug into this command run "ps aux"
    Last edited by boblizar; March 15th, 2012 at 10:22 PM.
    curiosity killed the process, but thats ok because i'm god.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •