{"id":302,"date":"2006-02-28T14:11:26","date_gmt":"2006-02-28T19:11:26","guid":{"rendered":"http:\/\/www.vacanteyes.com\/blog\/2006_02_302"},"modified":"2007-09-11T17:16:58","modified_gmt":"2007-09-11T21:16:58","slug":"some-notes-on-running-mathematica-remotely","status":"publish","type":"post","link":"https:\/\/vacanteyes.com\/blog\/2006\/02\/some-notes-on-running-mathematica-remotely\/","title":{"rendered":"Some notes on Running Mathematica Remotely"},"content":{"rendered":"
I was totally new to Unix command lines and Mathematica, and some of these errors cost me a huge amount of time to finally solve. I have a bad habit that I don’t take notes for these “small” tricks. Then I have to repeat the searching process the next time I need them-_-. So I guess it’s a good idea for me to record them here for future use, aslo for others who have the same problems. <\/p>\n
These notes are for X11 under OS X, but other platforms should be similar.
\n<\/p>\n
ssh -Y -l user host<\/code>
\nOr you can edit \/etc\/ssh_config, and add the following two lines ot it:
\nForwardX11 yes
\n ForwardX11Trusted yes<\/code>
\nThe -X option is equivalent to the first line. The -Y option is equivalent to both. <\/li>\n- To prevent Can’t Open Display errors, type following lines before attempting to run Mathematica:\n
\n- On the local machine:
xhost +remotemachinename<\/code><\/li>\n- On the remote machine:
setenv DISPLAY localmachinename:0<\/code><\/li>\n<\/ul>\nIf you don’t know your localmachinename or ip address, type the command “who”.<\/li>\n
- To prevent the Fonts error, there’re two methods you can use:\n
\n- You can set a font server by typing the command:
\nxset fp+ tcp\/fontserver:7100<\/code>
\nIf you don’t want to type this command every time you run Mathematica, you can edit the original version of “xinitrc” at \/etc\/X11\/xinit\/xinitrc or copy it to your home directory as an invisible file “.xinitrc” and edit that copy.
\nCopy command: cp \/etc\/X11\/xinit\/xinitrc ~\/.xinitrc<\/code>
\nUse “pico” to edit: pico .xinitrc<\/code>
\nAdd these two lines:
\nxset fp+ tcp\/fontserver:7100
\nxset fp rehash<\/code>
\nIf you get a “Permission Denied” error, use command “chmod” to change the permission. For example, if you want to add writing permission to users, type
\nchmod u+w file<\/code><\/li>\n- Copy the font files to your local machine, repeat the steps to edit .xinitrc, the lines you need to add will be:
\nxset fp+ \/fontpath
\nxset fp rehash<\/code>\n<\/li>\n<\/ul>\n<\/li>\n- Some basic unix commands:\n
\nls [-l] [-a]<\/code>: To list the conents fo a directory.<\/li>\nmkdir<\/code>: To create a new directory.<\/li>\ncp data1 data2<\/code>: To create a copy of “data1” named “data2”.
\n mv data1 data1.old<\/code>: To rename a file “data1” to “data1.old”.
\n mv data1 subdir<\/code>: To move file “data1” into subdirectory “subdir”.
\n rm data1<\/code>: To delete file “data1”.<\/li>\nmore<\/code>: to view the content of a file.<\/li>\npico<\/code> or vi<\/code>: to edit a file.<\/li>\n- Email:\n
\npine<\/code>: email client.<\/li>\n- For Dartmouth Northstar mail, to turn mail forwarding off:
\ncp ~\/.forward ~\/.forward_dir\/back
\nunset noclobber
\necho > ~\/.forward
\nset noclobber<\/code>
\nTo turn mail forwarding back on:
\ncp ~\/.forward_dir\/back ~\/.forward<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n————————
\nReferences:
\n[1]. Mathematica Technical Support<\/a>
\n[2]. Dartmouth Research Computing<\/a>
\n[3]. Princeton Help Desk<\/a>
\n[4]. Mac OS X Emacs Digests<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"I was totally new to Unix command lines and Mathematica, and some of these errors cost me a huge amount of time to finally solve. I have a bad habit that I don’t take notes for these “small” tricks. Then I have to repeat the searching process the next time I need them-_-. So I guess it’s a good idea for me to record them here for future use, aslo for others who have the same problems. <\/p>\n
These notes are for X11 under OS X, but other platforms should be similar.<\/p>\n
\tTo avoid BadWindows errors, use -Y option instead of -X.
\n ssh -Y -l user host
\nOr you can edit \/etc\/ssh_config, and add the following two line …\u7ee7\u7eed\u9605\u8bfb\u5168\u6587 » » » <\/a><\/span><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[1524,71,72,74,73],"_links":{"self":[{"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/posts\/302"}],"collection":[{"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/comments?post=302"}],"version-history":[{"count":0,"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/posts\/302\/revisions"}],"wp:attachment":[{"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/media?parent=302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/categories?post=302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vacanteyes.com\/blog\/wp-json\/wp\/v2\/tags?post=302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}