Hello!
It is so that I found another solution, the second solution requires X11 to be installed, together with the ImageMagick tools. (which display must give a result that should be : /opt/local/bin/display.
The next step is to try to fire up x11, then go to a local terminal window and enter display “posix-path to some image file”
If this works then the next step is to change the script in post #2 to use the display command, which I think you manage by yourself.
If this didn’t work, then the first easy step is to make the folder ~/.MacOsX here you save an empty info.plist file, that you rename to Environment.plist.
You then add a key to it with the key DISPLAY (case!) and value 0:0.
You now have to log out and back in again for those changes to take effect.
if you now start up x11, then open an Mac OsX terminal window, and type xclcock and gets the clock up, then you should be ok to try to run the script modified to use display again, if not, see below! (This is just the preliminaries, as we’ll have to emulate it in a do shell script command.
This is to assure that you can get contact with the X11 window server from your regular terminal window, since we’ll have to use that. And X11 should be configured to be in “normal” and not full screen mode.
You’ll have to paste the code below into your .bashrc or .profile, or whatever init file you use for bash, this just to see that we can make it work manually first.
[code] function get_xserver ()
{
case $TERM in
xterm )
XSERVER=$(who am i | awk ‘{print $NF}’ | tr -d ‘)’‘(’ )
# Ane-Pieter Wieringa suggests the following alternative:
# I_AM=$(who am i)
# SERVER=${I_AM#(}
# SERVER=${SERVER%)}
XSERVER=${XSERVER%%:*}
;;
aterm | rxvt)
# find some code that works here.....
;;
esac
}
if [ -z ${DISPLAY:=“”} ]; then
get_xserver
if [[ -z ${XSERVER} || ${XSERVER} == $(hostname) || ${XSERVER} == “unix” ]]; then
DISPLAY=“:0.0” # Display on local host
else
DISPLAY=${XSERVER}:0.0 # Display on remote host
fi
fi
export DISPLAY[/code]
When you have inited with this code in your .bashrc or other init file, (started up a new terminal window from Mac Os X), and you have fired up X11, you should be able to enter xclock in your terminal window and get the xclock up on the screen.
You should have the display command available, and for now you can try to use it on images from the command line, and they should pop up on the screen.
If you got so far in your endavours that you can make the display command work from the normal terminal window, I’d like to hear from you, and how you made it work, (Environment.plist or through the function in your .bashrc file.