import sys
import os
if __name__ == "__main__":
file = sys.argv[1]
print "Uploading file %s...." % file
cmd = "gpsbabel -t -i gpx -f %s -x simplify,count=500 -x track,title='Active Log' -o garmin -F /dev/ttyUSB0" % file
print cmd + "\n"
os.system(cmd)
print "Done!\n"
Just download a gpx file from from the internet, run the script, and you're of to go.
ben@pc:~/gpsfiles$ ~/bin/gpsupload Cycling.gpx
Happy riding!