Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: closing automatically firefox after 3 or 5 minutes of inactivity

  1. #1

    Default closing automatically firefox after 3 or 5 minutes of inactivity

    Hello, fellowship of Suse !

    Code:
    uname -ar
    Linux localhost.localdomain 5.3.18-57-default #1 SMP Wed Apr 28 10:54:41 UTC 2021 (ba3c2e9) x86_64 x86_64 x86_64 GNU/Linux
    i wish to find solutions for : closing automatically firefox after 3 or 5 minutes of inactivity of session or surfing with firefox.

    Do you know tips, or line command, or script for that ? and launch automatically at boot ?


    Thanks !

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,126

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    As you use Firefox, you use a desktop environment. But you fail to explain which one (KDE, Gnome, ........).
    Henk van Velden

  3. #3

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Quote Originally Posted by hcvv View Post
    As you use Firefox, you use a desktop environment. But you fail to explain which one (KDE, Gnome, ........).
    I use KDE and Lxde opensuse leap 15.3

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,126

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Quote Originally Posted by Clytemnestr View Post
    I use KDE and Lxde opensuse leap 15.3
    And closes Firefox in both DEs?
    Henk van Velden

  5. #5

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Whatever desktop environment...

    I mean the solution should not depend on desktop environment...

  6. #6
    Join Date
    Oct 2014
    Location
    Rotterdam
    Posts
    656

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Detecting if Firefox is idling is best and easiest done from the context of Firefox but I can not find a Extension to do that.

    You could try the last post from this page you could try on use "sudo zypper in xautoloack" instead of "sudo apt-get install xautolock"

    What is the reason you like it to shut down automatically?

  7. #7

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Quote Originally Posted by marel View Post

    What is the reason you like it to shut down automatically?
    Because i use commercial vpn, and it disconnect : disconnection occurs of vpn because : killswitch option often do not working...

  8. #8

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Quote Originally Posted by marel View Post
    "sudo zypper in xautoloack" instead of "sudo apt-get install xautolock"
    It works well : now integrated at boot in /etc/init.d/xautolock.sh

    Thanks !
    Last edited by hcvv; 24-Jul-2021 at 11:00.

  9. #9
    Join Date
    Oct 2014
    Location
    Rotterdam
    Posts
    656

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Thanks, good to hear it helped.

    I see you have another thread on this, I think the better solution is to block network access if the VPN goes down, but let's use the other thread for that.

  10. #10

    Default Re: closing automatically firefox after 3 or 5 minutes of inactivity

    Hello,

    On one machine, it works well, but : on 2 linux opensuse machine, script xautolock.sh does not work :

    Code:
    zypper install xautolock
    
    
    cat xautolock.sh 
    #!/bin/bash
    
    xautolock -notify 10 -notifier 'notify-send -i firefox "Firefox will close in 10 seconds"' -time 1 -locker "pkill firefox"
    
    ./xautolock.sh
    Couldn't connect to 
    
    xautolock -notify 10 -notifier 'notify-send -i firefox "Firefox will close in 10 seconds"' -time 10 -locker "pkill firefox"
    Couldn't connect to
    Any idea ?

Page 1 of 2 12 LastLast

Posting Permissions

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