Yes. The first diesel engine ran on coal. Most engines run on diesel #2, which is the same as heating oil. A diesel will run just fine on salad oil, except salad oil congeals when the temperature drops.
Gas engines only use volatile petroleum distillates. Gasoline will explode, diesel fuel won't.