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
  • 14
  • 1
    It really depends on what software is in the .dmg. .dmg's most often contain software for Mac OS X, which you can not run on Ubuntu. – Tobias Nov 13 '15 at 10:54
  • i want to use use this http://support-sg.canon-asia.com/contents/SG/EN/0200006120.html software. How I can run this? – partho Nov 13 '15 at 10:58
  • It clearly states at the top that the supported operating system is Mac OS X. This will not run on Ubuntu. – Tobias Nov 13 '15 at 11:04

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,568
  • 2
  • 19
  • 34