Cook the spaghetti according to package directions. Drain and set aside.
Heat the olive oil on a large skillet. Saute the onions and garlic until fragrant and the onions are transparent. Add in the tuna and break into chunks. Cook for around 3 minutes.
Stir in the spaghetti and cook for another minute or two. If you think the pasta is too dry, add in some more oil. Stir in the pesto, and mix until the pasta is coated. Add in the oregano and cook for another minute.
Remove from heat and serve immediately sprinkled with grated Parmesan cheese.