[Date Index]
[Thread Index]
[Author Index]
Re: webMathematica problems if using Xvnc
*To*: mathgroup at smc.vnet.net
*Subject*: [mg62497] Re: webMathematica problems if using Xvnc
*From*: albert <awnl at arcor.de>
*Date*: Sat, 26 Nov 2005 02:46:50 -0500 (EST)
*References*: <dm496p$sqr$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Hi Dave,
> If I think about this, I can't understand how it can possibly work,
> since I believe there is no way for Mathematica to connect to the Xvnc
> without a password, and there is nowhere where the startup script has
> the password. The docs don't mention a password (other than say set one)
> so perhaps I am wrong.
there are two different authorization mechanisms here. You will need the
vnc-password to connect to the vnc-server if you want to look at the
display (and or interact with it) using a viewer program, e.g. vncviewer.
Whether or not an X-client-programm is allowed to open a window on the
server uses different mechanisms (X-authorization which you can control
with xhost), and should be possible for user tomcat on the server machine.
> I'm using:
>
> Solaris 9 on a Sun Ultra 80, 360 MHz, 512 MB RAM.
> Mathematica 5.2
> webMathematica 2.1
> Tomcat 5.5.12
> Xvnc Free Edition 4.1.1
> (Despite I have installed this user /usr/local/apache2, it is not
> currently using Apache at all).
I use a slightly different setup, and everything works fine for me. Main
difference concerning the problems you see might be that my server is a
linux box.
> I have created a user 'tomcat' under which I want to run Tomcat. I can
> get webMathematica working fine, with graphs etc, but ONLY if
>
> a) I don't use Xvnc
> b) Log into the console as user 'tomcat'.
> c) Run Tomcat as user tomcat.
> d) Run xhoost +localhost on the machine with the webMathematica,
> Mathematica and Tomcat.
>
> e) Don't mind the console being tied up with user 'tomcat' logged in.
>
>
> I'd like if possible to avoid this and use Xvnc as detailed in the
> documentation.
>
> http://documents.wolfram.com/webmathematica/v2/index_2_4.html
>
> 2) Next I start vncserver on the host "web-server", as a user 'tomcat'
>
> main-webserver /usr/local/apache2/apache-tomcat-5.5.12 $ vncserver
>
> New 'main-webserver:1 (tomcat)' desktop is main-webserver:1
>
> Starting applications specified in
> /usr/local/apache2/apache-tomcat-5.5.12/.vnc/xstartup
> (SHOULD THAT START MATHEMATICA ???)
No, mathematica is started when needed, in fact you might see problems due
to licencing when too many frontends are running. But it should be possible
to start mathematica (or any other X-client) for tomcat from that very
commandline using -display main-webserver:1, for tests just use e.g. xterm.
When now looking at main-webserver:1 with a local or remote vncviewer, you
should see the corresponding window within the vncviewer. I suspect that
this might not work for you for whatever reason and causes the problems you
see.
> 3) Next I start Tomcat on the machine main-webserver. Since I am logged
> in as user 'tomcat', it clearly starts as that user.
and I guess you have checked that it really runs as user tomcat with ps or
top ...
> But how is Mathematica supposed to connect to Xvnc unless it knows the
> password I entered?
it doesn't need it, but it does need the X-authorization to display windows
on main-webserver:1. This could for some reason go wrong, but it definitly
won't need the vnc-password...
> 5) If I try to connect to the host "main-webserver" via Xvnc from the
> original workstation (sparrow) it works fine, so Xvnc is working.
can you see any windows of applications that you start as user tomcat on
main-webserver with the option -display main-webserver:1? If not, try a
xhost +localhost on a commandline within that vncviewer and start another
application to see whether that helps...
> KernelNumber=1
> KernelAcquireLimit=2000
> KernelTimeLimit=30000
> MathLinkArguments.Windows=-linkname 'C:\\Program Files\\Wolfram
> Research\\Mathematica\\5.0\\MathKernel.exe -mathlink' -linkmode launch
> MathLinkArguments.Unix=-linkname 'math -mathlink' -linkmode launch
> MathLinkArguments.MacOSX=-linkname '"/Applications/Mathematica
> 5.0.app/Contents/MacOS/MathKernel" -mathlink' -linkmode launch
> MathLinkArguments=-linkname '/usr/local/bin/math -mathlink' -linkmode
> launch FrontEndLaunchCommand=mathematica -mathlink -display
> main-webserver:1 -nogui -geometry 1000x500+10+10
> VerboseLogs=true
> StaticFileExtensions=gif:image/gif,jpg:image/jpeg,jpeg:image/jpeg
you need to check the line with FrontEndLaunchCommand. Maybe try the full
path to the mathematica-startscript /usr/local/bin/mathematica and make
sure that everything else is correct. I also noticed that sometimes there
are relicts of other vncservers that cause the next vncserver to open a
display different from main-webserver:1, e.g. main-webserver:2, so make
sure that these numbers match.
Have you access to an experienced system administrator? Maybe he can help
you to sort out the (nontrivial) details of X-authorization problems, if
these are the reason...
good luck,
albert
Prev by Date:
**Re: Re: Types in Mathematica**
Next by Date:
**does this shut down anyone else's kernel?**
Previous by thread:
**webMathematica problems if using Xvnc**
Next by thread:
**Re: webMathematica problems if using Xvnc**
| |