When you connect your Ethernet Shield to your Ubuntu PC your PC 'looks' at the Ethernet shield as if it were a router and therefore tries to connect to it as an internet source, thus it tries to get an IP and other related stuff from the Ethernet shield.
What you want is that the Ethernet shield should use the ubuntu PC as an internet/local network source. For this you must have active internet on your PC from Wifi/ USB data etc.
You will have to BRIDGE the connections of your Ethernet shield and your internet source in order to do so.
The link to accomplish Bridging networks in Ubuntu is here
When you bridge two Ethernet networks, the two networks become one single (larger) Ethernet network. Thereby making the Ethernet shield a part of the larger network (Internet in this case). You can now upload any of your sketches onto the Arduino as per your requirements and accomplish your task.