Next: , Previous: , Up: Miscellaneous  


Q5.0.20: Is there a way to start a new SXEmacs if there’s no gnuserv running, and otherwise use gnuclient?

Jan Vroonhof writes:

Here is one of the solutions, we have this in a script called etc/editclient.sh.

 #!/bin/sh
 if gnuclient -batch -eval t >/dev/null 2>&1
 then
   exec gnuclient ${1+"$@"}
 else
   sxemacs -unmapped -f gnuserv-start &
   until gnuclient -batch -eval t >/dev/null 2>&1
   do
      sleep 1
   done
   exec gnuclient ${1+"$@"}
 fi

Note that there is a known problem when running SXEmacs and ‘gnuclient -nw’ on the same TTY.