XOpenDisplay(NULL) fails to connect to X - ssh

I was given a fairly large program to compile and run with extremely vague instructions on how to properly configure my system and install the program. I was told to use a Windows, install Cygwin, navigate to the program's base directory, and type "make". I installed Cygwin on a 64-bit Windows 7 in C:\cygwin64 as the main user (I also installed all of the default packages, plus a few extras) and then ran the makefile included with the program (this worked with no problems). When trying to run the executable with a required file argument, I was simply given the error message "cannot connect to X server." Upon examination of the code, it appears that this error was caused by a line setting display=XOpenDisplay(NULL) and then exiting when this resulted in display == NULL. Earlier, "display" had been declared as a variable of type Display. Is there any way I can get the program to connect to the X server? I have been assured that the installation of the program is extremely easy, but I'm not so sure... Thanks in advance.

Related

<PATH_TO_SUMO>/bin/netedit: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: ecs_SetReportErrorFunction

Error:
<PATH_TO_SUMO>/bin/netedit: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: ecs_SetReportErrorFunction
This error appears when I try to run netedit. I have both the Webots simulation software, as well as the SUMO simulation software in my system and both, have netedit. When I remove either one of the software and then run netedit, it works. So, I think the issue is because of the presence of netedit twice. I was running netedit directly from the terminal but even after I give the exact path of the netedit I want to run, in a python script, and then run that script(For eg: I give the path of the netedit in SUMO), it shows this error. How to force the system to use a particular netedit (either webots' or SUMO's) whenever the netedit command is given?
This should be a question of setting your environment variable(s) PATH (and possibly LD_LIBRARY_PATH) to the correct values. If you install SUMO via the package manager of your Linux (apt or something) there should be nothing to adapt. I see from the Webots docs that they recommend manual adaption of those paths. If you don't do those changes or revert them you should be always using the netedit coming with plain SUMO. If you want to use the Webots version adapt the paths such that they list Webots directories first.

/sbin/nologin issue with msys2 on Windows 10

I have just installed MSys2 (https://msys2.github.io, msys2-x86_64-20150916.exe) on my Windows 10 computer.
Once installed, the terminal is launched. But as soon as I stop it and relaunch it, I get the error: "Failed to run /sbin/nologin: No such file or directory".
Any idea on what to do?
You should figure out why Bash is trying to run /sbin/nologin. Check your Windows home directory (e.g. C:\Users\Joe) for files like .bash_profile, .profile, and .bashrc. Inspect those files and find which one is calling nologin.
If that doesn't help, try creating an empty file in C:/msys64/sbin/nologin, or wherever you actually installed MSYS2. An empty file would be a valid shell script and run without errors.
If the error is non-fatal you might consider just ignoring it.

Mac OS X screensaver fails to start with error: "Could not create patch from composition file"

We built a screensaver for Mac OS X called Screensaver Ninja. I'm not the main developer, but I did work a bit on it. Now, the screensaver is not starting on my machine. It works fine for everybody else but I'm at a loss about what's causing it to not start in my machine.
In the console, I'm seeing these messages:
2015-12-21 10:08:23.426 ScreenSaverEngine[2756]: <QCScreenSaverView: 0x7fd638d4dcc0>: Could not create patch from composition file "/Users/pupeno/Library/Containers/com.carouselapps.ScreensaverNinja/Data/Library/Screen Savers/Ninja.saver"
2015-12-21 10:08:23.441 ScreenSaverEngine[2756]: <QCScreenSaverView: 0x7fd638f69bb0>: Could not create patch from composition file "/Users/pupeno/Library/Containers/com.carouselapps.ScreensaverNinja/Data/Library/Screen Savers/Ninja.saver"
2015-12-21 10:08:23.443 ScreenSaverEngine[2756]: <QCScreenSaverView: 0x7fd638c3d7b0>: Could not create patch from composition file "/Users/pupeno/Library/Containers/com.carouselapps.ScreensaverNinja/Data/Library/Screen Savers/Ninja.saver"
Any ideas what's going on here? We used mostly Swift to build it, with a bit of Objective-C to handle a special case with cookies.
In a computer where it works, there's no trace of that error. Another difference I notice is that if I go to folder where the Ninja.saver file is, ~/Library/Containers/com.carouselapps.ScreensaverNinja/Data/Library/Screen Ninja and I double click on it, in my computer, I get this message:
while in computers in which it works, it offers to install it the way it normally does for .saver files.
Update: it started working almost by itself, so, now, I'm not sure what the problem was or how to solve it :(

Exported RCP application does not run

Current situation:
One of our products exported via the Eclipse Product export wizard does no longer run, if the produced .exe is run directly. Unfortunately no error message is shown, the program just stops. I assume that no plug-in is loaded at all.
Interestingly the product runs in the following cases:
the created .exe is executed in the developer mode:
in cmd with MyApplication.exe -dev
in Eclipse with Launch an Eclipse application
my colleague, who uses the same code, can export the product and run it directly
the .exe, created by me, can be run on my colleague's PC and another PC
Furthermore I can build and run the other product as usual. Win 7 and Java 7 are installed on the three PCs.
Log:
There is a Log file in \configuration:
!SESSION 2015-02-05 18:03:17.765 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.equinox.ds 1 0 2015-02-05 18:03:19.481
!MESSAGE Could not bind a reference of component com.company.common.utils.Zipper.
The reference is: Reference[name = LogModelProvider, interface = com.company.common.service.ILogModelProvider,
policy = dynamic, cardinality = 0..1, target = null, bind = setLogModelProvider, unbind = unsetLogModelProvider]
I am not sure what the message means, but it also appears when the application is running in Eclipse. Therefore I ignored it.
There is no log file in \workspace. The folder .metadata does not exists.
What might have gone wrong:
The PDE build and export used to work, till I wanted to use Tycho as build system. Therefore I made the needed changes and finally I could build the two projects. Although the projects showed the same symptoms as described above (one worked, the other not). Therefore I created a SVN branch, committed every change and switched back to the trunk, to be back in the starting position. But the symptoms were not gone. Therefore I assume that I must have changed some setting, which causes the problem.
What I tried:
Basically I checked if the code and settings were back in the original state. I also switched the Eclipse workspace and imported the necessary plug-ins again. I also rebooted the PC once or twice.
Question:
Did anybody already have a similar behavior? Any hint is welcome.
(I know that my problem description is vague, sorry for that.)

Why would a native program run fine when executed directly, but fail with a seg fault when submitted through condor

I have a third party library that I'm attempting to incorporate into a simulation. We have the static library (.a), along with all of it's runtime dependencies (shared objects). I've created a very simple application (in C) that is linked against the library. All it does is call an initialization function that is part of the third party library's API, and exits. When I run this directly from the command line, it works fine. If I submit the executable to our Condor grid, it fails with a seg fault on strncpy (libc.so.6). I've forced condor to only run the executable on a particular machine, and if I run it directly on that machine, it works fine.
I'm mostly a Java programmer... limited amount of native coding experience. I'm familiar with tools such as nm, ldd, catchsegv, etc... to the point where I can run them. I don't really know where to start looking for an issue though.
I've run ldd directly on the executing machine, and via a script submitted through condor, along with my executable. ldd reports the same files in both cases.
I don't understand how running it directly would work, but it would fail being run by condor. The process that ultimately executes the program, condor_startd, is a process that starts as root, and changes its effective uid to the submitter. Perhaps this has something to do with it?
Don't know why this would cause an issue, but the culprit was the LANG environment variable. It was not set when running under Condor, but was set to US_EN.UTF-8 when running locally. Adding this value to the condor execution environment fixed the problem.