Ubuntu 22.04 and Gnome. My bank website auto-logs out after 3 or 4 minutes of inactivity. Any way to prevent this? I did a google search and didn’t find anything helpful. I use Firefox.
You’d need to fake activity and as the session is held in the browser it needs to be done in the browser.
You’d want a browser Extension (or what Firefox calls an Add-On) that’ll auto-refresh a page it knows is a logged in banking page on a timeout.
At a quick guess, either of these might do it:
- Tab Auto Refresh – Get this Extension for 🦊 Firefox (en-US)
- Tab Reloader (page auto refresh) – Get this Extension for 🦊 Firefox (en-US)
^ note: I haven’t vetted these add-ons or their authors, they just have the mose users.
Make your own browser extension that’ll perform the refresh and I can throw you some code. This is surprisingly easy on Chromium but Firefox requires extensions be OK’ed by Mozilla meaning a lot of extra steps.
xdotool to hit refresh on browsers with the window title that matches your logged in session.
Just curious. Why would you want/need to do this?
Auto-logout is a security measure to help people if they forget to logout before leaving the computer. Your bank just has a strict version of this, where it’s only a couple of minutes. Maybe they don’t think people stare at the same screen without even scrolling for 3-4 minutes at a time?
I’m curious to know what the use-case is that requires a bypass to this security measure.
Any competent security group will have an additional security control in place to watch for excessively long login sessions.
This disproportional impacts troublemakers like myself who don’t like to be told how long we can be logged in.
I’m forced to use an old webmail client for work so I use something like this to force an email check every minute instead of every 5 mins.
I don’t use one for banking but i’d imagine there’s probably scenarios where an account might be needed as a constant reference. Tax season, chatting with a customer, awaiting a transfer, ect.
There’s also the NIST way of looking at it which is if you make security too cumbersome, people will downgrade their personal security to compensate. Most people probably don’t need banking open for more than a few minutes but for the people that do it’s the perfect recipe for bad habits and a page refresher is least worst.
Understood, but email, usually, does not need the security that a financial application needs.
I rarely see the session timeout warning when logged into my banks site. FMMV
Personally, I understand the rationale of the security measure and do not have a problem with it, but for me too the time-out is too short. ( Of course I cannot say if the OP has the same issue, but he hasn’t responded yet, I’m just offering a use-case to answer your and @Mr_McBride 's question).
I keep track of our budget in a spreadsheet and write down all the transactions from my bank website. There isn’t an import or export option, nor would I want to connect anything to my bank account for automation. In any case, this takes time.
Scrolling along the transactions is not recorded as an activity by the bank site. After a few minutes I get a 10 second pop-up asking if I want to extend the session. I can only do this once. After the second time-out I’m simply logged-out. The only way to get around it is to actively use buttons and navigation through the bank site, or refresh. However, this means whenever I refresh or I return to the transaction list, I’m back at the top of the list so I have to search for the last transaction I was working on.
The result: I’m always under time-pressure to enter all transactions and reconcile the accounts. And oh dear, oh dear, let’s hope I don’t make a typo in the amounts and have to check every entry again…
To the OP: sorry , I don’t have a solution for your situation and it is (fortunately/unfortunately) the normal behaviour for such websites. I would expect it has little to do with the operating system or browser you use.
OP here. Hi All, Thanks for the great replies. Sorry for the delay. I’m digesting them and will respond more soonest. Cheers!
This makes sense as a usecase. My bank does provide an “export to csv” feature to save time, so they can have the auto-logout pretty strict.
I’ve never had to use this for a bank site, but it has worked for preventing other site timeouts (also my bank has some function where a page refresh requires me to login again).
My solution was using a macro program that records/replays mouse actions, so I record myself clicking on a different link (within the same site to maintain the login…example from account summary > account security > back to account summary) with a 1-2min. timer between replays.
For a bank it’s possible this could trigger some kind of security response if they keep an eye on such actions but that’s just a guess on my part.
@SaulPanzer I like this one. A great idea. What macro program do you use?
I can’t remember the program I used to use for it, not even sure it still exists tbh.
Currently I just use scripts I write that use xdotool, when I need to run it I have a little terminal window that runs ./nameofscript.sh. The script then loops the clicks until I ctrl-c the script.
(after making it executable with chmod +x nameofscript.sh)
An example would be creating a quick .sh file containing:
for (( ; ; )) do xdotool mousemove 1116 174 click 1 sleep 20s xdotool mousemove 870 172 click 1 sleep 20s done
So the mouse moves to the first X,Y position and left clicks, waits 20s, moves to the second X,Y position and left clicks, waits 20s and repeats…until the loop is stopped with ctrl-c.
The sleep time can be changed to however many seconds needed, and the X,Y positions are screen coordinates which you can also get xdotool.
Put the curser over the spot you’d want to click and run “xdotool getmouselocation” to get the X,Y…repeat for a second location to get that X,Y and put them both in the script.
It works but isn’t flexible so you’d need the window it’s clicking to stay in the right position and the obvious downside that the mouse is going to be clicking those locations if you have other things open over that bank page (which would happen with any macro program aswell I believe).
10 seconds? Maybe it’s time to move to another financial institution that respects it’s customers. Good luck finding one, though.
I have the same use case as you but fortunately the time-out is less strict
Opening links in a new tab would keep your list intact and work as a time-out killer no ?
That’s not a bad idea. I’ll have to try that next time, thanks.
I wonder if this would work if I had the bank screen and the xdortool macro running on a 2nd monitor? I’ll have to experiment. Do you think this would work?
With the 2nd monitor I could switch to other screens on the main monitor while my bank site stays open and logged in.
I’m not on my Linux machine atm so I can’t verify but I believe you’d just use the “–screen” flag, so it might be something like “mousemove --screen 2 X Y click 1”(not sure if it uses 0,1 or 1,2 to identify screens…easy to test).
If like me you’re used to just typing into a work window without looking, you’d need to be attentive because the mouse clicks would’ve moved focus to the banking screen instead of the one you wanted to type into.
Alternatively just make the script a bit better for your purpose like:
for (( ; ; )) do # click on a 2nd screen bank window link. xdotool mousemove --screen 2 X Y click 1 # instantly move back to 1st screen and click on main work window to make active again. xdotool mousemove --screen 1 X Y click 1 # Set wait time before making next clicks. sleep 20s # click on another 2nd screen bank window link to keep session alive. xdotool mousemove --screen 2 X Y click 1 # instantly move back to 1st screen and click on main work window to make active again. xdotool mousemove --screen 1 X Y click 1 # Set wait time before making next clicks. sleep 20s # Finish script and repeat from the beginning. done
Again, just an example…can’t test this on my machine right now.
I’m not a coder but this looks reasonably straightforward. When I get some free time I’ll look at it more closely. Thanks.
Would be great if there was an easy to use app that could do this.
No problem, hope you get a solution.
There are certainly GUI apps out there to do this kind of automation, when I first needed automated clicks I was using one but it was a long time ago so I don’t remember what I used.
Windows has a lot of GUI ones so you might find something there and get it running with WINE depending on whether you use X or Wayland (my understanding is that Wayland is harder to get them working on).