0

I have extracted a .dmg file into .img file following the accepted answer of this question.

At last I mounted it and extracted to /mnt directory.

That .dmg file was a software. But now how I can run that software?

partho
  • 349
  • 1
  • 4
  • 15

1 Answers1

1

I'm guessing the .dmg file you're referring to is an Apple Disk Image.

Theoretically an Apple Disk Image can contain any type of file, so your question is very broad. Most likely it contains software compiled for Mac OS X that you can not run on Ubuntu.

If the disk image contains executable scripts written in languages Ubuntu can interpret, or binary files Ubuntu can execute, the following method should work.

Open up a terminal: Ctrl+Alt+T

Navigate to the directory you mounted the .dmg in:

cd /path/to/mount

List the content

ls -l

This should give you a list of the files. It could look like this:

drwxrwxr-x 2 tobias tobias 4096 Nov 13 12:01 test2

-rwxrwxr-x 1 tobias tobias 0 Nov 13 12:00 test.py

If a line has an 'x' it means it's executable. So long it doesn't begin with a d, it should be an executable file. You can now run this file with:

./filename

In my example:

./test.py

Optionally you can use file to discover what kind of file it is:

file test.py
Tobias
  • 1,678