<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Jeremy and all,<br>
<br>
Thanks for these instructions. I followed them and was able to
implement this perfectly with just a few minor corrections.<br>
<br>
In the `<font face="monospace">submit/my_submit.yml.erb</font>`
the erb tags were missing, it should be:</p>
<div><br>
</div>
<div>
<div><font face="monospace">---</font></div>
<div><font face="monospace">batch_connect:</font></div>
<div><font face="monospace"> template: vnc</font></div>
<div><font face="monospace"> geometry: <%=
vnc_resolution.blank? ? "1024x768" : vnc_resolution.strip
%></font></div>
<div><font face="monospace">script:</font></div>
<div><font face="monospace"> ...</font></div>
</div>
<br>
<div class="moz-cite-prefix"><br>
Then for the button code I had to change it slightly so that the
eyeball fa icon worked, and also to keep the view-only button a
different color:<br>
<br>
<div><font face="monospace"><a
href="/pun/sys/dashboard/path/to/noVNC-1.0.0/vnc.html?autoconnect=true&password=<%=
password %>&path=rnode/<%= host %>/<%=
websocket %>/websockify&resize=off" class="btn
btn-primary" target="_blank"></font></div>
<div><font face="monospace"> <i class="fa
fa-eye"></i> Launch noVNC in New Tab</font></div>
<div><font face="monospace"></a></font></div>
<div>
<div><font face="monospace"><a
href="/pun/sys/dashboard/path/to/noVNC-1.0.0/vnc.html?autoconnect=true&password=<%=
spassword %>&path=rnode/<%= host %>/<%=
websocket %>/websockify&resize=off" class="btn btn-default
pull-right" target="_blank"></font></div>
<div><font face="monospace"> View Only (Share-able Link)</font></div>
<div><font face="monospace"></a></font></div>
</div>
<br>
I also changed the view-only link to "resize=downscale" as I think
this made more sense, but I'll see based on user feedback. I
*think* but am not 100% sure that I had to do a "touch
tmp/restart.txt" in the dashboard directory to make the changes
take effect.<br>
<br>
We're going to announce this as a "beta" to all of our users soon
and are working on our documentation and training, but we hope to
move to the "Production Deployment" category of organizations
using OOD very soon.<br>
<br>
-Eric<br>
<br>
On 10/30/18 10:28 PM, Jeremy Nicklas wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGFF+Bi3gJCujhQSQmtyvhQM9XUDeyuo5WSP2Ff4b7TOUbxPLg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">Hi Eric,
<div><br>
</div>
<div>I do not remember experiencing similar issues with Matlab
at OSC back when I experimented with it (although it has been
awhile). But I do know Matlab bundled its own software
rendering opengl drivers which caused us quite a few headaches
until we avoided loading them. So be mindful of all the
libraries that Matlab bundles and loads.</div>
<div><br>
</div>
<div>Currently the input field for `<font face="monospace">bc_vnc_resolution</font>`
is force hidden in the code here:</div>
<div><br>
</div>
<div><a
href="https://github.com/OSC/ood-dashboard/blob/25c54a55d6a84905c7b324eb39d05e0c374bf5de/app/models/batch_connect/app.rb#L151-L152"
target="_blank" moz-do-not-send="true">https://github.com/OSC/ood-dashboard/blob/25c54a55d6a84905c7b324eb39d05e0c374bf5de/app/models/batch_connect/app.rb#L151-L152</a><br>
</div>
<div><br>
</div>
<div>I am the one who added that code 2 years ago, but I can't
remember the reasoning behind it anymore (possibly there were
some issues with noVNC at the time).</div>
<div><br>
</div>
<div>Good news is that just about everything can be overridden.
So one suggestion is to create a new form attribute, let's
call it `<font face="monospace">vnc_resolution</font>` and
define it as such in your `<font face="monospace">form.yml</font>`:</div>
<div><br>
</div>
<div>
<div><font face="monospace">---</font></div>
<div><font face="monospace">title: "ACCRE Fixed-Screen
Desktop"</font></div>
<div><font face="monospace">cluster: "accre"</font></div>
<div><font face="monospace">attributes:</font></div>
<div><font face="monospace"> ...</font></div>
<div><font face="monospace"> vnc_resolution:</font></div>
<div><font face="monospace"> required: true</font></div>
<div><font face="monospace"> widget: "resolution_field"</font></div>
<div><font face="monospace"> label: "Desktop Screen
Resolution (px)"</font></div>
<div><font face="monospace"> value: "1024x768"</font></div>
<div><font face="monospace">form:</font></div>
<div><font face="monospace"> ...</font></div>
<div><font face="monospace"> - vnc_resolution</font></div>
<div><font face="monospace"> - bc_email_on_started</font></div>
<div><font face="monospace">submit: "submit/my_submit.yml.erb"</font></div>
</div>
<div><br>
</div>
<div>Note, be sure to remove `<font face="monospace">bc_vnc_resolution</font>`
from your `<font face="monospace">form.yml</font>` if you do
this or you may have a conflict.</div>
<div><br>
</div>
<div>Then (I believe as I can't really test it) in your `<font
face="monospace">submit/my_submit.yml.erb</font>` you will
have something like:</div>
<div><br>
</div>
<div>
<div><font face="monospace">---</font></div>
<div><font face="monospace">batch_connect:</font></div>
<div><font face="monospace"> template: vnc</font></div>
<div><font face="monospace"> geometry: vnc_resolution.blank?
? "1024x768" : vnc_resolution.strip</font></div>
<div><font face="monospace">script:</font></div>
<div><font face="monospace"> ...</font></div>
</div>
<div><br>
</div>
<div>Last but not least we need to fix the links to noVNC so
that it doesn't try to auto-resize when the browser window
changes size. You can override the panel view the user sees to
connect to the session by including a `<font face="monospace">view.html.erb</font>`
file in your interactive app's root directory (similar to what
we do for the Jupyter app). So an example would be:</div>
<div><br>
</div>
<div><font face="monospace"><a
href="/pun/sys/dashboard/path/to/noVNC-1.0.0/vnc.html?autoconnect=true&password=<%=
password %>&path=rnode/<%= host %>/<%=
websocket %>/websockify&resize=off" class="btn
btn-primary" target="_blank"></font></div>
<div><font face="monospace"> <i class="fas
fa-eye"></i> Launch noVNC in New Tab</font></div>
<div><font face="monospace"></a></font></div>
<div>
<div><font face="monospace"><a
href="/pun/sys/dashboard/path/to/noVNC-1.0.0/vnc.html?autoconnect=true&password=<%=
spassword %>&path=rnode/<%= host %>/<%=
websocket %>/websockify&resize=off" class="btn
btn-primary pull-right" target="_blank"></font></div>
<div><font face="monospace"> View Only (Share-able Link)</font></div>
<div><font face="monospace"></a></font></div>
</div>
<div><br>
</div>
<div>Note, I took a guess at the path for the noVNC installation
links (notice that I stubbed it with "/.../path/to/..."). You
should copy the links from the respective buttons in your
Dashboard for a running session in your browser. After
swapping in the ERB code for the connection variables you will
set "resize=off" at the end of the URL to achieve what you
want.</div>
<div><br>
</div>
<div>I did most of this off the top of my head, so anyone else
is free to correct my mistakes. Hope this helps.</div>
<div><br>
</div>
<div>-Jeremy Nicklas</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Oct 30, 2018 at 2:44 PM Eric Appelt via
OOD-users <<a href="mailto:ood-users@lists.osc.edu"
target="_blank" moz-do-not-send="true">ood-users@lists.osc.edu</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
Everyone,<br>
<br>
We are getting close to finishing our evaluation phase of
OOD with <br>
select labs and deployment of the service at Vanderbilt's
ACCRE facility <br>
for general use.<br>
<br>
One of our clients uses MATLAB and has noticed two issues
related to <br>
automatic screen sizing through NoVNC. This causes issues
when the user <br>
closes NoVNC on their desktop and opens it again on their
laptop. The <br>
remote desktop screen is resized causing MATLAB to panic and
throw a <br>
cascade of java exceptions.<br>
<br>
Another related issue is that when a session is initialized
on the <br>
smaller laptop screen, the remote desktop size is too small
for some of <br>
their MATLAB applications and the font is unreadable. What
they need is <br>
a remote screen larger than the actual browser window that
they can <br>
"Clip to Window" in NoVNC and pan around.<br>
<br>
For both these problems I was hoping I could create an
interactive <br>
desktop form where the user could specify a desired screen
size in <br>
pixels using "bc_vnc_resolution". However, I can't seem to
get the form <br>
attribute to show up, nor does XFCE seem to respect this
setting as <br>
NoVNC will default to remote resizing and rescale a window.
My yml form <br>
is as follows:<br>
<br>
---<br>
title: "ACCRE Fixed-Screen Desktop"<br>
cluster: "accre"<br>
attributes:<br>
desktop: "xfce"<br>
bc_account: null<br>
bc_queue: null<br>
bc_num_slots: null<br>
bc_mem:<br>
label: "Maximum Memory (GB)"<br>
value: 4<br>
bc_num_cores:<br>
label: "Number of CPU Cores"<br>
value: 1<br>
bc_vnc_resolution:<br>
required: true<br>
widget: "resolution_field"<br>
label: "Desktop Screen Resolution (px)"<br>
value: "1024x768"<br>
form:<br>
- bc_vnc_idle<br>
- desktop<br>
- bc_num_hours<br>
- bc_mem<br>
- bc_num_cores<br>
- bc_num_slots<br>
- node_type<br>
- bc_account<br>
- bc_queue<br>
- bc_vnc_resolution<br>
- bc_email_on_started<br>
submit: "submit/my_submit.yml.erb"<br>
<br>
I tried variations of the attribute settings but nothing
ever shows up. <br>
Is there something I am doing wrong here? I couldn't find
any <br>
documentation on this option or reference browsing the
source.<br>
<br>
Thanks,<br>
<br>
Eric<br>
<br>
_______________________________________________<br>
OOD-users mailing list<br>
<a href="mailto:OOD-users@lists.osc.edu" target="_blank"
moz-do-not-send="true">OOD-users@lists.osc.edu</a><br>
<a href="https://lists.osu.edu/mailman/listinfo/ood-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osu.edu/mailman/listinfo/ood-users</a><br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>