I just installed an Ubuntu 10.10 desktop on a system to do some development work. I would like to run the X server environment on my MacBook instead of keyboard hopping (the graphics system on the Ubuntu box is not so great).
Poking around on the web I uncovered the following command that I can run from a terminal in Mac OS X:
/usr/X11/bin/Xnest -geometry 1280x900 :1 & DISPLAY=:1 ssh -X -Y grog@ubuntusys gnome-session
Note I have ssh set up so authentication happens automatically.
This seems to work great -- the Ubuntu desktop appears on my Mac OS X screen! (It seems to be smart enough to start X11 if it isn't running already). However if I try to open any program, it dies out. So close.
Any suggestions appreciated.
Update: Thanks to the answer below that provides a tutorial link I learned how to do basic X forwarding. You can do this from an X terminal window on the Mac simply like this:
ssh -X -Y username@targetsystem
then you can start X applications that run on the remote system but their windows are on the Mac X server. The issue that I now have is I want to start the gnome desktop session:
gnome-session
but the problem there is that the session takes over the whole Mac desktop. You cannot resize it or move it. Worse, the top part of the windows managed by the window manager end up underneath the menu bar that Mac OS puts up there so you cannot access those controls. I think this is a problem that Xnest was intended to solve, or am I misunderstanding what it is all about?
Use Xnest or Xephyr this way on your Mac OS X:
Xnest :1 -geometry 1280x800 -query 10.0.1.x
Xephyr :1 -screen 1280x1024 -query 192.168.1.x
The only thing you have to do is to enable remote login in your Linux by manually editing /etc/gdm/custom.cfg or using the gdmsetup GUI program. Here CentOS 5 is taken as an example. In Ubuntu things will be a little differrent.
This approach is very different to VNC which is like Microsoft's RDP (screen capture) while XDMCP utilizes the graphic power of your Mac to assist Linux system.
Remember that X11 was specifically designed to be used over network connections rather than on an integral or attached display device. X features network transparency: the machine where an application (the client application, for instance Firefox on Linux) runs can differ from the user's local machine (the display server, that is the X11 on your Mac). This approach allows both 2D and 3D operations to be fully accelerated on the user's local X server.