Title: Trouble finding Ghostscript path
Last modified: August 30, 2016

---

# Trouble finding Ghostscript path

 *  Resolved [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/)
 * I have Imagick and Ghostscript installed on Yosemite with MAMP. In Thumbnail 
   support, I see the following error: WARNING: MLA Viewer support may not be available:
   
   Ghostscript support is not installed.
 * Ghostscript is installed in /usr/local/bin/gs
 * If I uncheck the Enable explicit ghostscript field, my page tries to open ghostscript
   with X11. If I check it, everything runs fine except no thumbnails – only pdf
   file names are shown.
    `[mla_gallery post_mime_type=application/pdf post_parent
   =all link=file mla_viewer=single columns=1 orderby=date order=desc]`
 * [https://wordpress.org/plugins/media-library-assistant/](https://wordpress.org/plugins/media-library-assistant/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688782)
 * Thanks for your question and for the details of your install.
 * By default, MLA looks for Ghostscript in `/usr/bin/gs`, and it looks like this
   does not match your configuration. Just below the “Enable explicit Ghostscript
   check” checkbox is a “Ghostscript path” text box where you can enter an alternate
   location. Have you tried entering `/usr/local/bin/gs` in the text box, then scrolling
   to the bottom of the page and clicking “Save Changes” to record your new setting?
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688821)
 * Thank you for your response. I’ve tried this, but it does not help. I’ve even
   tried putting a symbolic link to /usr/bin/gs.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688862)
 * Thanks for your update and for taking the time to try out my suggestion. I regret
   that it did not help.
 * You wrote “**_Yosemite with MAMP_**” – that sounds like an Apple Mac platform;
   is that right?
 * Here are a couple of earlier topics with more information on configuring Ghostscript
   support:
 * [Installing ImageMagick on Mac OSX for PHP and MAMP](https://github.com/delphian/drupal-convert-file/wiki/Installing-ImageMagick-on-Mac-OSX-for-PHP-and-MAMP)
 * [Nothing but error messages](https://wordpress.org/support/topic/nothing-but-error-messages)
 * It sounds like you have done what they suggest. It is possible that the symlink
   isn’t properly handled by the MLA code.
 * When you add `/usr/local/bin/gs` in the Ghostscript path text box MLA uses a 
   shell command to test the value. Could you enter `test -e /usr/local/bin/gs` 
   at the command line and post the results?
 * Do you have access to your PHP error log? If so, you can try adding `mla_debug
   =log` to your shortcode to produce some debugging information in the log (along
   with any possible error messages). If not, you can try adding `mla_debug=true`
   to write ugly but helpful information to the page containing the shortcode. Anything
   you can capture and post would be helpful.
 * You can also try changing `mla_viewer=single` to `mla_viewer=true` just to see
   if the single threading path is part of the problem; that seems unlikely.
 * I do not have any direct access to a Mac system, but I will try to find one so
   I can experiment with an environment more like yours. Thanks for your understanding
   and your patience.
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688864)
 * Yes indeed, I’m on a Mac platform with MAMP. And I did follow all those links
   that you have mentioned for installing and configuring on Mac.
 * `test -e /usr/local/bin/gs` returns empty. So does `test -e /usr/bin/gs`
 * Mac is my development environment. I will try this on the deployment server, 
   which is Redhat Linux, and see if it works there. If it does, that’s good enough
   for me.
 * Thanks for your help with troubleshooting this.
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688865)
 * David,
    It seems that my deployment server is working quite well with the first-
   page thumbnail creation. However, in reading more on your plugin, it sounds like
   PDFs work well, but there isn’t a good mechanism in place for MS documents – 
   pptx, docx, etc. I have 2 questions in this regard: 1. Is it not possible to 
   dynamically convert/export the pptx to PDF and then create a thumbnail from it?
   2. The featured image solution is not the most ideal, however, it could work 
   for me if I can assign the same featured image for all pptx files. Is there a
   way to do this currently? This is my shortcode: `[mla_gallery mla_viewer="true"
   post_parent=all mla_viewer_extensions="pdf,txt,doc,docx,xls,ppt,pptx" post_mime_type
   =all size=full link=file]`
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688879)
 * Thanks for the good news regarding your deployment server; I am happy to hear
   that the problem seems to be Mac-specific. I will continue to work on a fix for
   that.
 * You wrote “**_… dynamically convert/export the pptx to PDF …_**” That would require
   a program on the server that understands and exports the `PPTX` file format. 
   I am not aware of any such program other than Microsoft PowerPoint or Open Office
   on a Microsoft Windows OS platform. Most sites run on other operating systems.
 * You wrote “**_… assign the same featured image for all pptx files._**” The current
   MLA version does not have anything that supports that. You can use `size=icon`
   in your shortcode to use an appropriate icon for non-image file types. It’s an
   interesting idea; I will think about some way to associate a “default thumbnail/
   default Featured Image” with an extension or MIME type.
 * I will leave this topic unresolved for now and post an update with any progress
   I can make. Thanks for your ideas and for your interest in the plugin.
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688933)
 * David,
    Coming back to this after a month, I’m wondering if you have any suggested
   workaround for displaying some sort of default thumbnail for a given file extension.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688934)
 * I have not had time to work on a “default Featured Image” for a specific file
   extension, but it is on my list. I will post an update here as soon as I have
   something for you.
 * If I can’t build this in to MLA, a custom plugin using the MLA filters might 
   be an interim solution. Would that be of interest in your application?
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688935)
 * I haven’t looked into MLA filters, but will check t out. In the meantime, I’ve
   been able to accomplish what I need by creating a style template and adding something
   like:
    `.gallery-item a{ background-image: url(“[https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/document.png&#8221](https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/document.png&#8221););
   height: 100%; }’
 * However, it’s not giving me the desired result in terms of size. I might need
   to apply the background to a different element or handle it differently so that
   it is the same size as the generated thumbnail. Any suggestions you can provide
   on this will be very helpful.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688936)
 * I have uploaded a new Development Version dated 20151228 with a new filter, `
   mla_gallery_featured_image`, that allows modification of the Featured Image assigned
   to an item. A new example plugin, `mla-default-featured-image-example.php.txt`,
   has been added that uses the filter to supply a default Featured Image based 
   on the item’s file extension.
 * To get the Development Version, follow the instructions in this earlier topic:
 * [Shortcode not working in (special) widget](https://wordpress.org/support/topic/shortcode-not-working-in-special-widget?replies=3#post-7753687)
 * You can follow the instructions in the “MLA Gallery Filters and Actions (Hooks)”
   section of the /Settings/Media Library Assistant Documentation tab to access 
   the example. I can also send you a copy if that would be easier for you to use.
   You can give me your contact information using the Contact Us page at the FTJ
   web site:
 * [Fair Trade Judaica/Contact Us](http://fairtradejudaica.org/our-story/contact-us/)
 * Do not post your e-mail address in the forum; personal details in a public forum
   violates WordPress guidelines. If you have trouble accessing the FTJ site, post
   a note here with your country of origin and I can temporarily unblock it.
 * To add default Featured images to your `[mla_gallery]` display, first install
   and activate the example plugin. There are no arguments or option settings for
   it.
 * Then, find the Media Library item for the image you want to use as your default.
   Assign a WordPress custom field named `default_thumbnail_for` to the item and
   put a comma-delimited list of file extensions (e.g., `pptx` or `ppt,pptx`) in
   the value of the custom field.
 * You can use the Settings/Media Library Assistant Custom tab to add the field 
   to your Media/Assistant submenu table and the Quick/Bulk edit areas, but that
   is not necessary. You can simply use the WordPress Media/Edit Media screen to
   assign the custom field to the item(s) you want to use as your default image(
   s).
 * Thanks for your help with this new example and for your patience in waiting for
   it.
 *  Thread Starter [wprookiekris](https://wordpress.org/support/users/wprookiekris/)
 * (@wprookiekris)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688937)
 * David,
    This is working out even better than I expected. I was expecting to modify
   the short code, but this setup makes it so configurable. Thanks so much for all
   your help!
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688942)
 * I have finally been able to spend some time on a Mac/MAMP system with someone
   who knows more about the Mac environment than I do. We were able to reproduce
   your symptoms and we were able to get Ghostscript going and had success with 
   MLA thumbnail generation.
 * On the system we used, MAMP had installed Ghostscript in a different location:
 *     ```
       /Applications/MAMP/Library/bin/gs
       ```
   
 * We entered this path in the Settings/Media Library Assistant MLA Gallery tab’s“
   Ghostscript path” text box and we unchecked the “Enable explicit Ghostscript 
   check ” box. Then, we went to the Media/Assistant submenu, selected a PDF document
   and executed the “Thumbnail” bulk action. We got a dialog box which displayed:
 * >  To open “gs”, you need to install X11. Would you like to install X11 now?
   > X11 is no longer included with OS X. Apple continues to support the development
   > of X11 on OS X with the open source community. Clicking “Continue” will take
   > you to an Apple Knowledge Base Article which provides information about installing
   > X11.
   >  [Cancel] [Continue]
 * We clicked Continue and went through the process of installing “XQuartz 2.7.8”
   for OS X 10.6.3 and later. After installing X11 we logged out and back in, restarted
   MAMP and all of the MLA thumbnail generation features worked without errors.
 * You wrote “**_If I uncheck the Enable explicit ghostscript field, my page tries
   to open ghostscript with X11._**” That is correct; Ghostscript requires X11 support
   and will not run without it. Installing X11 support solves the problem.
 * I hope that gives you what you need to get your Development System going. I am
   leaving this topic resolved, but please update it if you have any problems or
   further questions regarding the above suggestions. Thanks for your patience while
   I was looking for time on a Mac system.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Trouble finding Ghostscript path’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/trouble-finding-ghostscript-path/#post-6688942)
 * Status: resolved