4

Enable FTP Keepalives in Nautilus

Posted (Updated ) in Linux

Update 2011-10-26: Added support for Ubuntu 11.04+ which uses slightly different FTP folder names

Lack of FTP keepalive functionality in Nautilus has been one of my biggest gripes in Ubuntu for a long time now. It’s infuriating attempting to open a folder only to discover the session has timed out and I need to reconnect. Well that problem is now solved!

Run the following bash script in the background each time you boot and you’re good to go:

#!/bin/bash
 
while true
do
	#10.10 and earlier
	ls ~/.gvfs/ftp* &> /dev/null
	#11.04+
	ls ~/.gvfs/FTP* &> /dev/null
	sleep 15
done

Many thanks go to the user who originally posted this script in a mailing list here.

PS. If anyone knows how to integrate this into a nautilus script I’d much appreciate it!