[Date Index]
[Thread Index]
[Author Index]
Re: webMathematica problems if using Xvnc
*To*: mathgroup at smc.vnet.net
*Subject*: [mg62554] Re: webMathematica problems if using Xvnc
*From*: Dave <INVALID.See-signature-for-how-to-determine at southminister-branch-line.org.uk>
*Date*: Mon, 28 Nov 2005 00:57:35 -0500 (EST)
*References*: <dm496p$sqr$1@smc.vnet.net> <dm94rn$6l2$1@smc.vnet.net>
*Reply-to*: Nov-2005 at southminister-branch-line.org.uk
*Sender*: owner-wri-mathgroup at wolfram.com
albert wrote:
> Hi Dave,
Hi Albert
>
>>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.
Cheers, you have clarified an important point. I can forget any rubbish
about adding passwords anywhere.
>>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.
I had not edited .vnc/xstartup, but just wondered.
> 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.
I need to double check some of this. I can on the console of course, but
I am not so sure
>
>>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 ...
Yes, it runs as tomcat.
>>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...
Cheers. I'll look into the X-authorization.
>
>>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...
I need to check this a bit more carefully. I just tried some things that
do work, but it is possibly since the user is on the console anyway.
I'll check this by putting root on the console and trying to do the X
stuff as another user.
>
>
>>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.
Cheers. I'll look at that. I think mathematica must be picked up okay,
as text based examples (like the Hello that prints the date) work OK.
> 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.
I'll check that - it is not impossible.
> 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...
Not immediately, but it is an option for later if I don't suss it myself.
--
Dave K
http://www.southminster-branch-line.org.uk/
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)
Prev by Date:
**Re: Package development**
Next by Date:
**Re: How to define and plot a periodic signal?**
Previous by thread:
**Re: webMathematica problems if using Xvnc**
Next by thread:
**CostOfPath**
| |