Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I use imagemagick's display from command line, say:

$ display -density 150 test1.pdf 

... then display locks in the command line, until you exit the window (or press CTRL+C in terminal).

However, what I'd like to do, is when the above command is ran in terminal, then display would both start the window, and at the same time exit; then I could quickly press up arrow in terminal, and edit the settings (like -density), and repeat the now modified command line - which would likewise now exit, and the window would show the newly requested image.

This is similar to how scite has a "single instance mode" (see How to load new documents in a single instance of SciTE): when it is set up, you can say scite filename on the command line; scite then exits in terminal - while it opens the file as new tab (so you can quickly open files on command line by using bash history and up arrow). Now, I wouldn't expect display's GUI to have tabs, but I think it should be possible to somehow have display's window replace the content it displays upon a command...

Is what I want possible with imagemagick's display - and if so, how?

Many thanks in advance for any answers,

share|improve this question
possible duplicate of How do I fork a process that doesn't die when shell exits? – grawity May 18 '12 at 19:59
Many thanks for that, @grawity - I tried setsid before my display command line, and it indeed does release the terminal - but then, how do I communicate with the running instance of display (e.g. to tell it to load a new image)? Am also looking now into coding a custom solution using an API: linux - ImageMagick API for command-line GUI application interface to display - Stack Overflow. Thanks again - cheers! – sdaau May 19 '12 at 7:32

Well, just came up with a (very crude - no mouse interaction, no anything) script example using ImageMagick's Perl API, which demonstrates what I wanted done with display - so I thought I may just as well post about it here. The example is given in this answer: ImageMagick API for command-line GUI application interface to display - Stack Overflow.

Hope I get to eventually read about how to do this with ImageMagick's display, though :)


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.