image
image
Ticket Options
Question Details
TICKET ARCHIVE -> How to Install a .dmg File At a Command Line?
nugulus - Aug 3, 2005 - 1:03 pm
image
image
I can remotely connect the xserv running tiger through ssh. How can I unpack and install a downloaded .dmg file at the command line?

Jun
macbri - Aug 3, 2005 - 2:46 pm
image
image
Hi Jun -

My name is Brian and thanks for using macosx.com.

If I understand you correctly, you have a .dmg file (a disk image file) on a remote server you wish to download and then mount, but using only the command line. So, first of all, since you can connect to the server with 'ssh', you can also copy files to and from that server with 'scp'. So instead of connecting with ssh you can use the same username and password for scp instead. For example:

scp username@xserv:/path/to/data/file.dmg ./file.dmg

(substituting your username, the name of your remote server, and the full path and filename of course). You'll get prompted for your ssh password, and then the file will be downloaded and your connection will be closed automatically afterwards. Then you can mount this .dmg file such that it appears on your desktop (and also is accessable via the command line in the /Volumes folder) with the following command:

hdiutil attach ./file.dmg

The command will mount the disk image for you, and then report back it's path in the /Volumes directory. When you're done with it, either drag it to the trash as usual, or you can type:

hdiutil detach /Volumes/SomeVolume

(where SomeVolume will be the directory reported by the 'hdiutil attach' command).

I hope this helps!

--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com
nugulus - Aug 3, 2005 - 3:52 pm
image
image
Hi Brian,
Thank you for your quick reply.
After the software (in this case Xcode for tiger) is unpacked to /Volumes/Xcode Tools, what do I do to install?
I'm looking at the content of the Xcode Tools directory as a result of the command "hdiutil attach xcode...dmg",

About Xcode Tools.pdf Utilities XcodeTools.mpkg
Packages WebObjects.mpkg

What should I do to these files and directories so that they become system programs? For instance, I'm expecting a cc or gcc compiler to appear under /usr/bin.
Thank you for your time?

Jun
macbri - Aug 3, 2005 - 4:11 pm
image
image
Hi Jun -

Glad to help. Well since you can see the .mpkg files all you need to do is install them! For this you can use the "installer" command which has lots of options (you can see them with "installer -help" or in even more gruesome detail with "man installer". Basic operation though is simple enough:

installer -pkg ./XcodeTools.mpkg -target /

This assumes you want it installed on your main (boot) partition. The final argument is the target mount point which you'd only change if you're installing the package somewhere other than your boot partition.

--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com
nugulus - Aug 3, 2005 - 4:38 pm
image
image
Thank you Brian! It's all done as you described.

Jun
macbri - Aug 10, 2005 - 3:09 am
image
image
Hi Jun -

As per your feedback, I'm attaching instructions from a site moderator here at macosx.com on how to view closed tickets.

Quote:
If she/he logs in into site, then clicks on Free Mac Support, she/he will see her questions, etc.

If she/he still gets that message have her/him go here:
http://www.macosx.com/contact/

The site support team will help her/him out.
I hope this helps.
Thanks again for choosing macosx.com!

--------
Brian S.
MacOSX.com Technical Support
brian@macosx.com

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Friendly URLs by vBSEO 3.1.0