I have read in a number of threads asking what is the best surface to game on so the ships do not move. I went through this as well using Marine vinyl and the GF9 mats.
I finally found the solution while solving another problem. I play wings of Glory and it has similar pegs that X-Wing does. A problem is the pegs tend to come apart when you pick up the model. This happens in x-wing as well.
I now use a product called hob-e-tac. It is a glue that dries clear and remains tacky. Imagine the stuff on the back of credit cards when you receive them which is similar. I use this for all my Wings of Glory pegs, so when I started playing X-wing last year I did the same.
When I use it with X-wing I place a very small amount of hob-e-tac on the male end of the pegs as well as coat the hole in the base where the peg gois in. Use a small paint brush and literally lightly paint the area you want to apply. Keep in mind less is better as it has amazing stickiness. I have not had a peg come out accidentally yet and you can easily disassemble when done.
As for the bases sliding on the gaming surafce a small amount of hob-e-tack applied to the four corners of the bottom of the base completely solves the problem.
The nice thing is it can easily be removed if at some point in the future you do not want it anymore. It is cheap so it can be reapplied as needed. The key is to use a very small amount as it goes a long way.
A 2oz bottle cost about $6 and will last you forever.

HTH,