... Since Emacs speaks the X11 protocol, and the Mac desktop has an X11 server, you can work directly with Solaris on the Mac desktop. There is no need to visit the Gnome desktop, or to wait for a "Solaris Unity" mode in your VM software. Just run the Mac's X11 server, and do your work in Emacs.
h3. Terminal Settings for Using TTY Emacs
When driving Emacs from a Mac terminal window, you'll need the Meta key. That's called the Option key on Mac, and since Option is used to form extended characters, it is not mapped to the Meta modifier by default. * Select Terminal, Show Info (Command-I), select Keyboard Tab * Check "Use option key as meta key"; press "Use Settings as Defaults"
You only need to drive Emacs from the Mac terminal long enough to issue the {{gnuclient}} command. After that, you will be driving Emacs via X11.
h3. Stable screen sessions
It is best if you avoid tying your Emacs session to a particular login. This can be done with the {{screen}} program, which maintains sessions across multiple shell logins, as long as Solaris is not rebooted. Install {{screen}} from: * visit http::/sunfreeware.com and download the ncurses and screen packages: ftp://ftp.sunfreeware.com/pub/freeware/intel/10/ncurses-5.6-sol10-x86-local.gz ftp://ftp.sunfreeware.com/pub/freeware/intel/10/screen-4.0.2-sol10-intel-local.gz * from a root shell within Solaris, install ncurses and screen: {noformat} # pkgadd -d ~/Downloads/screen-4.0.2-sol9-intel-local # pkgadd -d ~/Downloads/screen-4.0.2-sol9-intel-local {noformat} * test the installation by logging in from a Terminal window: {noformat} Welcome to Darwin! MyMac:~ joeuser$ ssh joeuser@solaris-devx.local Password: Last login: Sun Sep 02 10:05:06 2007 from macosx Sun Microsystems Inc. SunOS 5.11 snv_55 October 2007 $ /usr/local/bin/screen --version Screen version 4.00.02 (FAU) 5-Dec-03 $ /usr/local/bin/screen -xRR {noformat}
h3. Getting a Real Emacs Window
In order to run Emacs for real, you need to [install X11|UsingX11] on your Mac. It is generally found in {{Applications/Utilities}}. From a Mac Terminal, try saying {{open -a X11}}.
The gnu Emacs and gnuclient programs are pre-installed in Solaris. But, for gnuserv/gnuclient to work solaris-devx must be known to itself. One way to do it is to edit {{/etc/hosts}}: {noformat} $ su # cp /etc/hosts /etc/hosts.bak # echo 172.16.135.128 solaris-devx solaris-devx.local >> /etc/hosts {noformat}
From within {{screen}}, you can start an Emacs session that will survive as long as the Solaris VM continues to run. Because of snapshots, this means you can set up an Emacs session that is reusable even after Mac OS reboots. * Terminal => New Shell * Get ready for X11 action from Solaris: {noformat} open -a X11 xhost solaris-devx.local {noformat} * Log in to Solaris {noformat} $ ssh solaris-devx.local Password: {noformat} * Once in Solaris, start screen (or reconnect with it) {noformat} $ screen -xRR {noformat} * Once in the screen session, start Emacs in "no-window" mode. {noformat} $ DISPLAY=macosx:0.0 $ export DISPLAY $ /opt/SUNWspro/bin/xemacs -nw -f gnuserv-start {noformat} * Once the tty-mode emacs shows up, run gnuclient: {noformat} Meta-x shell (return) $ /opt/SUNWspro/bin/gnuclient {noformat} * When the X11 window comes up, you can immediately close the Terminal window, without further ceremony.
There are surely ways to streamline this process...
The following command has been known to work directly within Mac Terminal, but only after the {{emacs}} session has already been started (with {{gnuserv}}) and the {{xauth}} configuration is adjusted to allow it: {noformat} $ open -a X11 $ xhost solaris-devx.local $ gnuclient -display macosx:0.0 -h solaris-devx.local {noformat}
The {{xauth}} setup is something like this, where the bracketed number must be replaced by a random one of your own choosing: {noformat} $ open -a X11 $ xauth add solaris-devx.local:999 MIT-MAGIC-COOKIE-1 <5551212> $ ssh joeuser@solaris-devx.local solaris-devx$ xauth add solaris-devx.local:999 MIT-MAGIC-COOKIE-1 <5551212> {noformat}
|