<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">When I connect through vncviewer on my windows machine, I connect through IP:5901. So, the display is 1 and I can confirm that when I open a terminal and write "echo $DISPLAY" which returns ":1".</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Also, when another user connects through IP:5914, he can see the "echo $DISPLAY" will return ":14".</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Please note that when I run</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
[mahmood@rocks7 ~]$ srun --x11 --nodelist=compute-0-5 -n 1 -c 6 --mem=8G -A y8 -p RUBY xclock<span class="gmail-im"><span class="gmail-m_-6073117273997332424gmail-im"><br>srun: error: Cannot forward to local display. Can only use X11 forwarding with network displays.</span> </span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">That command is actually running from the Gnome on the frontend via vncviewer and not any remote machine with ssh or something else.<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br clear="all"></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="tahoma,sans-serif">Regards,<br>Mahmood</font><br><br><br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 23, 2018 at 1:09 PM Williams, Gareth (IM&T, Clayton) <Gareth.Williams@csiro.au> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
In the vncviewer session, what is DISPLAY set to? I guess it will be something like <a href="http://head.mydomain.com:1" target="_blank">head.mydomain.com:1</a> and you can run x applications that done need much resource.<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Then I'd you run something like:<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
srun --var=DISPLAY xterm<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Or sbatch with this script:<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
#!/bin/bash<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
xterm<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
You should get an xterm in a batch session. <br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
head <a href="http://mydomain.com" target="_blank">mydomain.com</a> must be network accessible from the compute nodes.<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Gareth<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
<div dir="auto" style="direction:ltr;margin:0;padding:0;font-family:sans-serif;font-size:11pt;color:black">
Get <a href="https://aka.ms/ghei36" target="_blank">Outlook for Android</a></div>
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-3663234629146518511divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> on behalf of Mahmood Naderan <<a href="mailto:mahmood.nt@gmail.com" target="_blank">mahmood.nt@gmail.com</a>><br>
<b>Sent:</b> Friday, November 23, 2018 6:34:42 PM<br>
<b>To:</b> Slurm User Community List<br>
<b>Subject:</b> Re: [slurm-users] About x11 support</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Gareth,</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks for the info. My cluster is not a big one and I have configured in the following way.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">1- A frontend which has the rocks 7 (based on centos 7) with gnome. Users login to this node *only* via vncviewer.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">2- While a user is connected to his gnome desktop, he opens a terminal and may run an interactive GUI job. So, he has to use x11.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Now, the question is, why the following error happens when we now that x11 support had been enabled during the compilation.<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">[mahmood@rocks7 ~]$ srun --x11 --nodelist=compute-0-5 -n 1 -c 6 --mem=8G -A y8 -p RUBY xclock<span class="m_-3663234629146518511gmail-im"><br>
srun: error: Cannot forward to local display. Can only use X11 forwarding with network displays.</span>
<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div>
<div dir="ltr" class="m_-3663234629146518511gmail_signature">
<div dir="ltr"><font face="tahoma,sans-serif">Regards,<br>
Mahmood</font><br>
<br>
<br>
</div>
</div>
</div>
<br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Nov 23, 2018 at 3:22 AM Williams, Gareth (IM&T, Clayton) <Gareth.Williams@csiro.au> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
X11 comes up on this list now and then.  I'm often tempted to describe our site's approach and will do so now it case it help others (or someone wants to say why it is a terrible approach).<br>
<br>
First some preamble:<br>
 * we offer 'login' nodes with limits on what can be run as a highest-reliability option for managing batch jobs<br>
 * we offer a set of 'interactive' nodes where there is more flexibility for running larger analysis, development and house-keeping tasks.<br>
 * we offer a set of 'visualisation' nodes with gpus and setup for hardware accelerated graphics<br>
 * we encourage use of (vnc) virtual desktop sessions, and/or ssh access<br>
<br>
In both modes of access we ensure DISPLAY is set in a form that is network accessible within the cluster. ie _not_ localhost:NN<br>
With ssh this is done with the sshd_config X11UseLocalHost=no option.<br>
<br>
With DISPLAY set to a network accessible form and an xauth entry in the home directory, batch processes can access DISPLAY as long as the DISPLAY variable is passed into the job.<br>
<br>
No plugin, no compiled in support in slurm. <br>
<br>
Note that DISPLAY is not in a form immediately accessible outside the cluster (not fqdn of the external interface) and we have various firewalls in place.<br>
<br>
Gareth<br>
<br>
</blockquote>
</div>
</div>
</div>
</div>

</blockquote></div>