Remote Development using XCode locally

Discussion in 'Mac Programming' started by luksen, Jul 3, 2009.

  1. luksen macrumors newbie

    Jun 15, 2009
    Hey there,

    Is it possible to use the XCode IDE to code but have it compiled on a linux machine?

    The current setup is as follows. The Linux machine has AFS installed, which I have on my mac as well, thus I see my linux home directory as a network drive. So, I ssh into the linux machine checkout the Code using subversion, add the checked out files to an XCode project, edit them there, but can't compile. I need to ssh back to the linux machine to compile the Code. Can this process be automated?

    I think I read this was possible, at least with emacs, bit I would like to use the XCode IDE


  2. theunixgeek macrumors newbie

    Jun 25, 2008
    I'm not sure I quite understand your situation, but have you considered writing a quick BASH script to make SSH'ing a bit quicker? As far as I can tell, you could also try to write a quick application in Automator, especially since it can record what you do (where you click, what you type, etc).
  3. luksen thread starter macrumors newbie

    Jun 15, 2009
    yes writing a bash script would probably work.. but I was wondering if one could still use XCode as a full IDE.. ie with debugging etc. and compile from within XCode (but have it somehow ssh to the linux machine and use its compiler)

    as it is now xcode is just a more or less bloated text editor..

    maybe this is just not possible?
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Not with Xcode.
  5. luksen thread starter macrumors newbie

    Jun 15, 2009
    Ok thanks, that was what I was expecting...

    So is there an IDE with which I could do that? Maybe Eclipse?
  6. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    I would set the DISPLAY environment variable on the Linux machine to the IP and first display of your mac, then start on the mac, and run xhost + with the IP of the Linux machine. I would then run eclipse on the Linux machine, and it will display on the mac.

    There may be a way to have the IDE run on the mac, but have it run all the supporting programs remotely, but it seems like it would be very involved.

  7. luksen thread starter macrumors newbie

    Jun 15, 2009

    I remembered recently that I posted this question here a long time ago and wanted to state how i solved the problem

    I eventually added a shell script target that would do

    ssh user@host "cd path/to/makefile;make"

    this needs ssh keys to have passwordless access to the host but it has worked ever since. you do lose the debugging functionalities (but you loose this anyway when using makefiles) but at least you can build from xcode using command-Q

Share This Page