Hi Tom,
If you can do the compilation on the desktop, or on another PC, uploading the binaries is straightforward with avrdude. eg. to upload to an Uno:
$ avrdude -C /usr/share/arduino/hardware/tools/avrdude.conf -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -D -U flash:w:$HOME/arduino/sketch.cpp.hex:i
The USB device name may be different under different linux distributions. Just look in /dev to see what device appears when you plug the Arduino in.
You may need to give yourself permission to access the serial devices, eg:
$ sudo usermod -a -G tty tim
$ sudo usermod -a -G dialout tim