Download XCode without logging in to Apple...

I need to install XCode on my (10.4) server so that hopefully I can compile and install mod_python on the server. I need to download the XCode file from the Apple website, but it requires a login. I can download the installer to my (10.5) computer and then upload the file to the server. It seems stupid though to transfer the file twice just to get around Apple's login window.

How can I download the XCode installer withought logging in to Apple?

2.4 MBP, Mac OS X (10.5)

Posted on Jan 7, 2008 11:15 PM

Reply
31 replies

Jan 8, 2008 1:00 PM in response to Gnarlodious

It is nothing that Apple is specifically doing. You have several options. You could pass your login information to curl on the command line. I haven't tried that but I don't see why it shouldn't work. Just try it a few times with something smaller than Xcode. You could try something like Lynx or links, my favorite. You could also use VNC. You could also download Xcode on your box and then send it to the server yourself.

Jan 9, 2008 5:39 AM in response to Gnarlodious

I did spend a few hours with "eLinks" installing it on my own Intel Mac using Macports. But when I transferred the files to the (PPC) server it would not run.


I'm guessing--not having looked at any of these apps!--that if you add the "-arch ppc64" option to CFLAGS when compiling eLinks on your Intel Mac, it will then work on the PPC server. In other words, say,
make distclean
./configure CFLAGS="-arch ppc64" [other options]
make
(don't make install on your Intel Mac!) that it will then work on the PPC server. This assumes your server is 64 bit; otherwise " -arch ppc".

Jan 9, 2008 11:18 AM in response to Mr.Lobotomy

Building Universal binaries of open-source tools is usually a bit more complicated than that. Apple has some instructions that work for many projects, but not all. There is nothing "standard" about an automake-based, "configure"-style projects. That is one of many reaons I don't trust Macports et al to do it right. Here are my procedures that work on almost every project I have tried. These procedures require more manual intervention, but should work for any project.

Jan 8, 2008 7:22 AM in response to Gnarlodious

Log into the Xcode site and click the link to start the relevant download.

Copy the link by control-clicking it.

Stop the dowload.

Log into the remote server.

Issue the command

wget "" 


The double-quotes are needed unless you escape all the special characters.


The problem with this is that OS X client, at least, doesn't come with wget, but just curl, and I can't get curl to do this. So you might first have to install a precompiled wget.

Once you get the disk image downloaded, I am not sure how you can install non-interactively, but there might be a way.

Can you run VNC? (Of course, if you could do that, then you could just display the browser remotely).

Jan 8, 2008 7:33 AM in response to Gnarlodious

Another option is I could compile it and send it to you.

And, since the Apple thought police saw fit to delete my question about BSD unix on the ipod, presumably under the assumption that the user agreement includes protecting their own interest in not having you do whatever you want with your own property, it is probably worth mentioning that all of these sorts of problems could be very simply avoided by using Ubuntu Linux Server instead of OS X server. You could just issue sudo apt-get install mod_python, and you would be done. If you needed to display anything remotely, you could easily do so since it is X-windows based.

You might even be able to install it on your current hardware. If I need anything like this, it is far easier to do on my linux server. Linux is also more stable and doesn't require you to reboot every time they mess with Quicktime or iTunes.

Jan 8, 2008 8:59 AM in response to Bill Scott

Apologies if this is known or irrelevant as I haven't gone through most of the steps you have. But re:
I can't get curl to do this

I have found that sometimes Apple's links are often placeholders that are replaced by redirects. By default, and unlike wget, curl doesn't follow redirects. So you need to
curl -L '<paste-in-the-link-here>' > download.dmg'
to get curl to follow the redirect headers to the actual download, and have the download sent to a file instead of the console.

Other times, the download is inside an iframe, and so you have to 'less download.dmg' to find the URL of the actual download, and then repeat.

Jan 8, 2008 11:27 AM in response to Mr.Lobotomy

I am beginning to understand what Bill Scott means by the OSX servers are hard to manage.

I did attempt to download the file with a command like this:

curl -L 'http://adcdownload.apple.com/Developer Tools/xcode_tools_2.1/xcode_tools2.1.dmg' > XCode2.dmg

While this link works on my Mac here, on the server it downloads a webpage and renames it to a DMG. The page says:

<html>tp<head>.w<link rel="stylesheet" type="text/css" href="http://connect.apple.com/WebObjects/MemberSite.wo<body>>r<center><div id=<img src="http://connect.apple.com/WebObjects/MemberSite.woa/WebServerResources/imag es/adc_membersite.gif" alt="Apple Developer Connection | Member Site" width="388" height="30" border="0" id="adc
1>" cPlease return to the ADC Member Site and attempt to downlIf you feel you received this message in error, please reference this

Jan 8, 2008 11:54 AM in response to Gnarlodious

I am pretty angry about this at Apple. I had my sister go to the server, log into the Developer website as myself, and try to download Xcode. Because sessions are uniquely coded, she was unable to open the download URL, and I couldn't explain to her how to find the file. All she could get was "Your session has expired".

It really seems like Apple is trying to discourage users from Apple servers. Why do they make it so impossible to do everything?

Jan 8, 2008 12:06 PM in response to Gnarlodious

Apple wants you to have logged in to access the dmg. First, if you can remotely access the computer, and you've successfully obtained the dmg, you no longer need curl. Just scp the dmg to the remote computer:
scp XCode2.dmg adminName@remote.computer:/path/to/dest/folder
and continue.

But if you insist on downloading again, the short answer is man curl

The somewhat longer, but still incomplete answer:
You were told that to log in again, to go to http://connect.apple.com/.
You can do so (using curl -L, find the log-in form in the resulting html, and extract the url of the "action=". Then
curl -L -F theAccountName=Appleusername -F theAccountPW=password url
to authenticate the session, which I guess is sufficient given your success on the local computer to successfully do the
curl -L 'http://adcdownload.apple.com/DeveloperTools/xcode_tools_2.1/xcode_tools2.1.dmg' > XCode2.dmg
Otherwise, search the man page for cookies, etc.

Jan 8, 2008 1:34 PM in response to etresoft

I tried all kinds of things with curl, including the login and password. I was able to login and download that page, but the download URL would not work. Apparently since it is a separate domain, it is not recognized.

I also attempted to use Lynx, but it does not support https protocol.

VNC is not installed on the server, and I don't even know what it is.

I thought Apple had a public FTP download server, but was unable to find it.

I can't download and upload a 1 gigabyte file, not on this ISP. Isn't that what Terminal commands are for?

This whole fiasco has seriously led me to believe a Linux server is what I need. Like Bill Scott posted in his screenshot... nice easy installations. Not the obstacle course Apple puts you through.

Jan 8, 2008 3:16 PM in response to Gnarlodious

Gnarlodious wrote:
I tried all kinds of things with curl, including the login and password. I was able to login and download that page, but the download URL would not work. Apparently since it is a separate domain, it is not recognized.


You could probably get it to work by specifying the login cookie. Curl is supposed to be able to do complicated things like this.

I also attempted to use Lynx, but it does not support https protocol.


Links does. I had trouble compiling Lynx on early version of MacOS X while links worked fine. I have liked it ever since.

VNC is not installed on the server, and I don't even know what it is.


Do you have the actual Server version of 10.4? If so, then you do have VNC. You may have to enable it tough. It is a decent security hole so you don't want to run it 24/7. It stands for Virtual Network Computing. It is a kind of Remote Access.

This whole fiasco has seriously led me to believe a Linux server is what I need. Like Bill Scott posted in his screenshot... nice easy installations. Not the obstacle course Apple puts you through.


I think Bill is just upset that they deleted one of his posts recently. He is certainly glossing over lots of Linux headaches that you will never see on MacOS X.

Why again do you need to install Xcode on the remove computer? Why not compile what you need to on your machine and then just send that?

Jan 8, 2008 4:53 PM in response to Gnarlodious

this is one reason i always install the dev tools upon initial configuration of os x server.

as others have outlined, you should be able to download the dmg with curl or wget. apple's policies of requiring a free registration to download all their dev tools is nothing considering you'd have to fork over cash for similar tools from microsoft.

if you're annoyed about downloading (for free) something you need, then maybe you would be better off with freebsd or one of the linux variants.

Jan 8, 2008 5:29 PM in response to etresoft

If you just need a speedy unix box or server, a PC running Ubuntu is pretty hard to beat. I definitely prefer OS X overall, but Ubuntu (which was recommended to me on this forum), has done much to close the gap.

I prefer to have an OS X machine on my desktop because I like the hardware and the OS X interface is very pleasant to use. But it is more of a struggle to do unixy things, and if it wasn't for Fink, I probably would own one or two Macs than the 10 or 12 our lab has.

Most of my colleagues think I am a hopeless mac shill, by the way.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Download XCode without logging in to Apple...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.