This is my personal preferences can change:
1. Run Synergy server on linux
2. Run synergyc client on mac
3. Edit .synergy.conf on your home directory
right = linux desktop
left = mac client
4. On you mac terminal i do this
alias command="killall -c ssh; ssh -nf -L 24800:localhost:24800 -L 5917:localhost:5901 -L 5918:localhost:5902 linuxbox -- 'sleep 999999999'"
There could be a better method here
5. For connecting the macbook to another monitor use this
mini dvi to vga adapter
You might have to restart your mac book here.
Vola you are done.