Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm used to working on Unix/Linux and recently moved to Mac. In used to be able to do this:

derick@linux1:~$ ssh -X linux2
derick@linux2's password:
derick@linux2:~$ xclock

I've install X11 from maxports and I can do the same from my mac. If I try the reverse by ssh-ing into my mac from linux I can only run certain apps:

  • /usr/X11/bin/xclock works fine
  • Something like /Applications/Preview.app/Contents/MacOS/Preview opens the GUI on the mac.

    It seems that this is not possible on a mac? If not, how do I run an application remotely (on a mac) with a local (linux) display? Do I need some third-party app?

Update: To be more precise: I have synergy and use Mac for coding. On my linux PC I would like to see another application's display (GUI) from Mac. Thus, 'live screen sharing' apps like VNC will not work.

For example I'm working on my mac in app A (say Word) and want to see the output of Excel (running on mac) on my linux PC next to me. (Simulating a dual screen via the network). It worked nicely on linux, hoping for a solution for mac.

share|improve this question
    
If there is not a solution via SSH I would also be interested in that. The problem is that I want to run a local app's display on a PC via the network next to me like I used to do with linux. –  Derick Schoonbee Aug 31 '11 at 14:36
    
Can I ask why you want to avoid VNC? Network lag issues? –  Nicholas Smith Sep 2 '11 at 13:43
    
I'm currently working on the Mac, thus the screen is "occupied". I want to run another app on the mac with the output displayed on the PC next to me. Like I did with linux. Hoping to see a solution on mac. –  Derick Schoonbee Sep 2 '11 at 18:08
    
By the way you don't have to install X11 by macports... X11 comes with OS X. –  Yuji Sep 3 '11 at 18:08
    
Ah hah, so your objection to VNC isn't down to any VNC issues, but because of the screen constraints? –  Nicholas Smith Sep 4 '11 at 17:57

4 Answers 4

up vote 8 down vote accepted
+50

So if I am not mistaken the the problem you have with VNC currently is that it is sharing the current Mac user's screen with apps open that you don't want to see on your other computer? Lion introduces the ability to screen share users that are logged in the background. Quoting the text from the link:

  • Enable Screen Sharing and set a VNC password.
  • Take note of your computer’s IP address.
  • Fire up a VNC client on another machine.
  • Connect to your computer’s IP address along with the password you set earlier.
  • You will see the Mac OS X login screen that appears when you first start the computer. If you log into the currently active user you will be controlling the computer’s screen. If you select a different user, you will be logged into that user’s desktop in the background. It will not affect what what is seen on the physical computer screen.

You will likely just need to create another user for sharing.

share|improve this answer
    
Great, this seems to be what I want! Now I have another motivation to upgrade to Lion. I'll test soon and probably accept this as the answer. Thanks! –  Derick Schoonbee Sep 3 '11 at 9:51
    
Darn, I've just upgraded and I get the login screen via VNC. But it does not want to take my keyboard stroked. Thus I can not login :( –  Derick Schoonbee Sep 4 '11 at 9:38
    
That is very odd - what VNC client are you using? –  cftarnas Sep 6 '11 at 6:49

The Mac OS X native application do not use the X protocol for the rendering, but the Mac specific protocol. So you cannot use ssh X protocol forwarding as you could with a Linux workstation.

As you discovered, the reverse is not true, you can install an X server on Mac OS X and have the Linux program appear on your Mac.

What you can do is use either Mac own desktop sharing facility or install a VNC server. Then from your Linux box, you connect to your Mac through VNC instead of ssh.

share|improve this answer
    
Thanks for info. What I want to know if there is some similar functionality I can use on the Mac. For example can I use the desktop sharing facility from linux1 while I'm working / logged in on my mac? –  Derick Schoonbee Aug 28 '11 at 15:33
    
Yes, you can run a VNC server on Linux and connect it from Mac with a VNC client (there are some free VNC client on the Mac, and free VNC server on Linux). –  Sylvain Defresne Aug 28 '11 at 22:43
    
Hmm.. VNC does not cut it: I'm working on my mac in app A (say Word) and want to see the output of Excel (running on mac) on linux PC next to me. –  Derick Schoonbee Aug 29 '11 at 3:30
    
As Sylvain explained this is not possible on the Mac. The underlying architecture of the OS does not permit this type of use. –  Samuel Mikel Bowles Sep 2 '11 at 19:57
3  
See my answer, but with Lion it is possible if you use a different user on the Mac for the VNC session. –  cftarnas Sep 3 '11 at 4:21

As Sylvian mentioned, you can't run your Mac apps and display them on Linux. The best you can do is VNC. You'll see the whole screen, not just one app.

Enable a VNC password in Screen Sharing Preferences:

Screen Sharing Preferences

You can then use any VNC client application on Linux.

share|improve this answer

You're a little out of luck, but ScreenRecycler is going to get you as close as possible. Runs over VNC but convinces OS X the VNC connection is actually a separate monitor, it should allow you to get close to what you need. I've used it, it's pretty good, there's a free trial then it's quite cheap. I stopped using it purely because I was on a crappy network and there was too much latency unless I was directly networking the two.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.