Skip to content

How to open .CGM files on Linux

To open .CGM files on Linux, in the file manager, try Open With and look for apps associated with “Computer Graphics Metafile” (shared-mime-info identifies .cgm as image/cgm).

Step-by-step instructions

  1. In the file manager, try Open With and look for apps associated with “Computer Graphics Metafile” (shared-mime-info identifies .cgm as image/cgm).
  2. If that fails, open it from within a graphics/CAD application that supports CGM import, or convert it using a CGM-aware tool available in your environment.

Common issues

The file won’t open or shows as an unknown format

CGM is a specialized ISO standard and many general-purpose image viewers don’t support it. The issue is usually missing CGM support rather than a bad file.

  1. Open the file from inside a CGM-capable application using an Import/Open command (don’t rely on double-click association).
  2. Try opening it in the same environment/workflow that produced it (common in technical illustration and SAP-related documentation workflows).
  3. If you only need to share it, export/convert from a CGM-capable tool to a more widely supported format.

Opens, but graphics look wrong or elements are missing

Different tools may implement different CGM parts/profiles; complex CGM features (mixed vector/raster/text, specific attributes) may not render identically everywhere.

  1. Try a different CGM-capable application (or the original creator tool) to compare rendering.
  2. If you control the export, re-export using a simpler CGM option/profile if available, or export to another interchange format for recipients.

File extension and MIME/type detection problems

Some systems rely on MIME mappings (e.g., image/cgm) and file associations; if misconfigured, the OS won’t know what to do with .cgm files.

  1. Ensure the file really is a CGM and still has the .cgm extension.
  2. On Linux desktops, verify your environment recognizes image/cgm and associate it with your chosen CGM-capable application.
  3. Use the application’s File → Open/Import rather than relying on the OS association.

Security note

CGM files are graphics metafiles (image/cgm), not executables, but they can be complex to parse; only open CGM files from sources you trust to reduce the risk of exploiting bugs in viewers/importers.

Did this guide help?

Back to .CGM extension page