I have a 13 inch laptop running ubuntu and an iMac running OSX. I'd like to use the iMac as an external monitor for the laptop.
The laptop has VGA and HDMI, and ubuntu 14.04.
Related:
https://apple.stackexchange.com/a/87666/109005
https://superuser.com/q/540547/372305
I had the exact same problem. I got this working reliably with a combination of xpra and Xephyr. This solutions of course uses your local network, through ssh, to make an remote display.
You need xpra installed on both of your devices and Xephyr on your Ubuntu machine. There is a repo for Ubuntu, which installs Winswitch - which xpra is part of. Winswitch has quite a few cool features.
Anyway here is how I got it to work:
On your Ubuntu machine in terminal:
Where "200" is the X11 port which Xephyr connects to, and "100" is the port made available over the local network.
On your Mac in terminal:
Needless to say a this solutions is dependent on a wired network.
You can use synergy or x2x to accomplish what you want to do. Using synergy is probably easier, and you will be using a simple GUI called QUICKSYNERGY, which you can install to make it easier to use..