Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another More Generic Script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another More Generic Script
Authored by: ktohg on Jan 21, '03 02:51:23AM
This one is a simpler one than the gvim one but it is more generalized. It's not as pretty as the gvim one. Also is an alias so the DISPLAY veriable gets set properly (unline a script which only sets it locally. This allows me to open an X11 app using `x' once or just typing `x' will start up the X11.app. Here is my alias: alias x='export DISPLAY=:0;Xapp' and the Xapp program:
#!/bin/sh if [ -z "`ps ax | grep X11.app | grep -v grep`" ]; then    open -a X11    sleep 5 fi if [ -n "$*" ]; then    export DISPLAY=:0    exec $* else    exit 0 fi


[ Reply to This | # ]