Re: running mathematica notebooks without interface
- To: mathgroup at smc.vnet.net
- Subject: [mg98889] Re: running mathematica notebooks without interface
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Mon, 20 Apr 2009 19:14:53 -0400 (EDT)
- References: <gs9emj$mvd$1@smc.vnet.net> <gsbvv7$5ki$1@smc.vnet.net> <gseoma$e2t$1@smc.vnet.net>
Hi, > This is a very good idea and it works. > However I would like to use graphics command such as contourPlot and > others, and this seems not to be possible using a .m package run > without a frontend? > maybe the UsingFrontEnd command may help? actually that is what it is for, so yes, it may help... > But it's quite undocumented! It is part of JLink and an essential part of webmathematica, so you should look in the documentation of these to learn more about it and why it is there. Actually if everything is set up correctly, its usage is trivial, since you only wrap it around parts of code which need the frontend to work. The complicated part is the setup, which is described in the JLink tutorial. > It seems there is no way to run a .nb file without a front-end and > save the output of the cells (including graphics) without having the > actual frontend running... it can be done with UseFrontEnd, but you need to be able to run a graphical interface on the server, which is not per se possible on all platforms when logging in via ssh. E.g. on a unix machine you need to have X installed and an X server of some sort running, e.g. a vncserver. For tips on how you can make UseFrontEnd work you need to give more details about the server you are trying to access. On the other hand, if you have the possibility to run something like e.g. vncserver on the server, I would recommend using that to start the frontend on the server in a vnc-session, start the evaluation and reconnect when the evaluation of the notebook has finished. > Someone suggested me to use the Kernel remotely, which could be an idea! > However I have some troubles addressing the remote kernel since it is > located in a private network and I usually reach it by a double ssh > session (ssh user1@gateway and then ssh user2@server) > Any quick trick to tell mathematica to load a remote kernel using ssh > tunnel? you could set up a tunnel which connects a free port on your local host to port 22 on 'server' via 'gateway'. This is independent from mathematica, you can do the setup and testing without even touching mathematica, and you can also tunnel any protocol for remote access like e.g. vnc this way, too. Then when this works you would just need to connect to 'localhost' on the new port which should make the configuration of mathematica much simpler. You should read the documentation of the ssh-flavour you are using to learn how to do that. Maybe it would also be a good idea to ask your system administrators what their suggestions are to access the server, since it was them who hided the server, so probably they have a working solution already... hth, albert