<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m running in windowed mode (XFCE) through x2go and XQuartz. The DISPLAY environment variable is not set. <div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">—</div><div class="">Ted Toal, Postdoctoral Researcher</div><div class="">Carvajal-Carmona Lab</div><div class="">4502 GBSF, One Shields Ave</div><div class="">Davis, CA 956626 (530) 263-5986</div><div class=""><a href="mailto:twtoal@ucdavis.edu" class="">twtoal@ucdavis.edu</a></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2017, at 2:28 PM, Stefan Baur <<a href="mailto:X2Go-ML-1@baur-itcs.de" class="">X2Go-ML-1@baur-itcs.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Am 10.01.2017 um 23:12 schrieb Rick Benkstein:<br class=""><br class=""><blockquote type="cite" class="">I have made my software switchable between GUI non-GUI by examining the DISPLAY variable - if it is NULL then x2go is not being used.<br class=""></blockquote><br class="">Unless, of course, you are occasionally using a local X session, or<br class="">regular X forwarding, where this approach will bite you in the<br class="">posterior, falsely assuming that you're running an X2Go session when<br class="">it's regular X.<br class=""><br class="">The deeper-rooted issue here is that X2Go-specific variables are only<br class="">set when a session is run in fullscreen or windowed mode, displaying an<br class="">entire desktop.<br class=""><br class="">For single/published applications, no such X2Go-specific variable is set.<br class=""><br class="">However, you can check if:<br class=""><br class="">the command x2golistsessions is executable (=we're on an X2GoServer -<br class="">important in case of NFS-mounted home directories)<br class=""><br class="">AND the DISPLAY variable is set<br class=""><br class="">AND client DISPLAY and SSH client IP match an X2Go session marked as "R"<br class="">for running.<br class=""><br class="">See <<a href="http://wiki.x2go.org/doku.php/doc:howto:ssh-agent-workaround" class="">http://wiki.x2go.org/doku.php/doc:howto:ssh-agent-workaround</a>>,<br class="">section "# Part that runs in X2Go session", for an example where you<br class="">could lift the required code.<br class=""><br class="">What you don't need is the part that checks for a file named<br class="">"~/.x2go/agent", so just remove that part.<br class=""><br class="">Kind Regards,<br class="">Stefan<br class=""><br class="">-- <br class="">BAUR-ITCS UG (haftungsbeschränkt)<br class="">Geschäftsführer: Stefan Baur<br class="">Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364<br class="">Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243<br class=""><br class="">_______________________________________________<br class="">x2go-dev mailing list<br class=""><a href="mailto:x2go-dev@lists.x2go.org" class="">x2go-dev@lists.x2go.org</a><br class="">http://lists.x2go.org/listinfo/x2go-dev</div></div></blockquote></div><br class=""></div></body></html>