======================= HOW to USE REMOTE MAPLE ======================= Do you work at home at night and the weekend with slow internet? Then maple graphics at home is possible, although it is less intuitive and a longer process. The process will be explained for MS-Windows. The differences for OS/X and Linux appear later. WHAT YOU NEED for MS-Windows (1) A graphics program. Free software: IRFANVIEW, FASTSTONE (2) File transfer program. Free software: PUTTY, WINSCP FREE SOFTWARE DETAILS IRFANVIEW. FASTSTONE. A free graphics program to view, crop, resize, resample and convert graphics files. Choose one or use your favorite. PUTTY, SSH, SFTP, WINSCP. Free secure ftp and secure telnet. Provides sftp and ssh. The ftp interface is command line. The telnet interface is vt100 terminal. Both are used by WinSCP, and you can forget them once installed and the preferences are set. WinSCP is a free windows file transfer graphical interface, with built-in PUTTY launcher. Recommended for moving files between laptop and university account. Launches putty without extra password entry, giving a single interface. PUTTY PREFERENCES. The setup for a university math dept account requires site "xserver.math.utah.edu". Set the default user name to your user name in the "Connection --> Data" section of Putty. Save the setup under a name like "math" (instead of "Default"), then each use of putty will require only a password. Customize putty for colors, font and font size, then save the setup again under "math". REMOTE MAPLE. Start putty with a button click in WinSCP. Start maple [not xmaple] in the putty connection window. Type in the several lines of code below to test the interface. EASY EXAMPLE: file:="plot.jpg"; opts:="width=400,height=320"; plotsetup(jpeg,plotoutput=file,plotoptions=opts); plot(sin(x),x=0..Pi); plotsetup(default); This example diverts graphics output to file "plot.jpg", does the plot, then resets the plot device back to maple default. After executing the four lines, transfer file "plot.jpg" back to your local machine with WinSCP. View it locally in IrfanView/FastStone. Recommended: Copy and paste the lines of text above into WORDPAD. Then paste WORDPAD contents into the Putty window [which is running MAPLE]. Do all editing in WORDPAD. Graphics: The name "plot.jpg" is just a container to pass to the graphics program. Edit the graphic, SAVE AS to keep it and OPEN/REREAD to load a new image. Programmer's Puzzle: Write a maple function myplot(u) that does the 5 lines above, so that myplot(sin(x),x=0..Pi) does it in one line. COMPLEX EXAMPLE: b1:=1:b2:=2:m1:=1:m2:=1: de1:=diff(x1(t),t,t)=-(b1+b2)/m1*diff(x1(t),t)+ b2/m1*diff(x2(t),t); de2:=diff(x2(t),t,t)=b2/m2*diff(x1(t),t)- b2/m2*diff(x2(t),t); dsolve({de1,de2},{x1(t),x2(t)}); p:=subs(_C1=1,_C2=1,_C3=1,_C4=1,%); p1:=convert(p,list); X1:=unapply(rhs(p1[2]),t); X2:=unapply(rhs(p1[1]),t); file:="plot.jpg"; opts:="width=400,height=320"; plotsetup(jpeg,plotoutput=file,plotoptions=opts); plot([X1(t),X2(t)],t=0..10,thickness=3); plotsetup(default); This dynamical system is a linear cascade for uranium and thorium. Then the solutions x1(t), x2(t) are plotted on one set of axes. WRITTEN REPORTS. Both Open Office and MS-word can be used to put together the maple code and the images. The result is a pad of paper not different from what you get by printing a worksheet from maple. =========================== OS/X and LINUX DIFFERENCES =========================== Both systems support SSH and SFTP programs that can do everything described above for Windows. It is possible in both to mount a remote disk, so that all file transfer operations are done through the graphical window interface, and not directly through SFTP. Both systems require Putty or its equivalent to be installed. To detect previous installs, try in a terminal window commands STFP and SSH. If they work, then the install was already done. LAUNCH REMOTE TERMINAL. Do this command in an xterm window. ssh username@xserver.math.utah.edu It sets up a vt100 terminal to the remote machine from which to run command line MAPLE. In each system, there is a graphical user interface to launch the equivalent of SSH. Names vary but the idea is identical: open a vt100 terminal window and log into the remote site. Settings for the Linux REMOTE DESKTOP VIEWER: Protocol: SSH Host: xserver.math.utah.edu Username: XXXXXX It is the same as " ssh XXXXXX@xserver.math.utah.edu " with command line split into three strings, entered in a different order. =================== SAVING MAPLE CODE. =================== A safe method for writing maple code is to produce everything in Wordpad, then mouse-copy it and paste it into maple. No mouse copying is done from the maple screen back to wordpad, except error correction. This interface offers the best and safest method for saving code. Mouse copying from the maple terminal interface is problematic, due to maple's default sub and super scripts, plus unusable output for matrices and vectors. A work-around is discussed below. There are maple commands writeto, connectdir, appendto which can save maple code in a specific location as text. An example: currentdir("/home/tmp"); # To write file /home/tmp/foo.mpl writeto("foo.mpl"); # Screen output sent to file. .. then mouse-paste code from wordpad writeto(terminal); # closes foo.mpl, back to normal interface. To save massive amounts of code, error-free, please investigate the MAPLE command "save". The command ' save p, "foo.mpl" ' will deposit variable p into text file "foo.mpl"; the extension ".mpl" is required. Code saved in foo.mpl can be executed inside command line maple with the statements currentdir("/home/tmp"); # Where to find foo.mpl read "foo.mpl"; # Execute contents as though typed. ============================== COPYING TEXT in a REMOTE MAPLE ============================== # Solve the remote MAPLE mouse copy problem. # Some displays are useless for mouse copy. # Make the default display text. No subs or supers. interface(prettyprint=0); # Function to pretty-print specific output. # USE: "pprint" used instead of maple's "print" pprint:=proc(x) global prettyPrint; interface(prettyprint = 1); print(x); interface(prettyprint = 0); end proc # Put this function into MAPLE startup [not for xmaple]. ===================== SOME USEFUL COMMANDS: ===================== ssh -X -Y username@xserver.math.utah.edu Sets up a vt100 terminal to the remote machine which can run X-window applications like xmaple, emacs, openoffice, etc. Leave off the "-X -Y" to get a terminal window without X-windows. xmaple -cw& Starts xmaple with classical window interface, not java, ten times faster. Must be run after you have logged in with ssh, as above. Only works with high-speed internet or a university campus T1 connection. sftp username@xserver.math.utah.edu Starts an ftp session for upload or download of files. Works in OS/X (with linux support installed) and Linux. Works in Windows from a CMD.EXE window (install pkg putty). Don't use an ampersand! =============================================================