The Applescript Code:
on run {input, parameters}
tell application "Finder"
launch application "X11"
end tell
set results to do shell script "cd ~; DISPLAY=:0.0; export DISPLAY; PATH=$PATH:/usr/local/bin; export PATH ; /usr/local/share/lazarus/lazarus> /dev/null 2>&1 &"
return input
end run
The easiest way: Just open Automator select the option "Run Applescript" copy the code above! Then compile the Application by saving the workflow as Application. That's everything. Now you can darg and drop the application in your Application folder or on your dock and launch it with out starting X11 !
Important: This Application starts X11 itself, so X11 is still required, similar to all the other stuff. The Application you creat here is more like a shortcut !