Whenever I try and open a window using Ocaml Graphics, I receive the error:
Graphics.Graphic_failure "Cannot open display "
This is after already installing XMing and PuTTy. I am running Windows 10 and just running the following code in utop, for reference
#require "graphics";;
Graphics.open_graph "";;
Our teammate using a Mac can run graphics but nobody on Windows can.
Related
I am on Windows running Intellij and Git for Windows SDK for a feature rich terminal on Windows (pacman, oh my zsh, etc...)
I looked up previously on which command to use to make it the default Intellij Terminal and SO delivered:
How can I launch git-for-windows SDK's git-bash in Windows Terminal?
I am using the cmd from above's 2nd post:
C:\git-sdk-64\msys2_shell.cmd -defterm -here -no-start -mingw64
Everything works fine except for a stubborn resizing issue :
Every time I resize the Intellij Terminal, the MSYS terminal stops receiving key strokes and I have to reopen a new one:
( can't type after the resize under the echo hello )
Trying to avoid WSL for now as I noticed maven builds through wsl were noticeably slower than directly on powershell or via git terminal.
Workaround
Not exactly a solution but if you run with MinGW32, the resize no longer causes the problem
To be seen if I will suffer from other 32/64 bit incompatibilities
using for now:
C:\git-sdk-64\msys2_shell.cmd -defterm -here -no-start -mingw32
I tried setting up Nannou following the instructions here.
I am running Debian Buster on a MacBook with an NVIDIA graphics card (GK107M [GeForce GT 750M Mac Edition]).
I tried running the example and get the error
thread 'main' panicked at 'could not build default app window: NoAvailableAdapter'
It seems this is an error when Nannou tries to open a window -- something about its communication with the window manager (Gnome on xOrg), or something about vulcan-tools.
Any ideas for how to debug this?
The issue is that I was using the open-source Nouveau driver for my graphics card (the default on Debian) which does not currently support Vulkan, which is required for Nannou.
By installing the proprietary nvidia graphics driver, the problem was resolved.
I was able to install the nvidia driver by running
apt install nvidia-driver,
and then rebooting my computer,
as described in this tutorial https://linuxconfig.org/how-to-install-nvidia-driver-on-debian-10-buster-linux
Now nannou works :)
I'm running a VM in Azure with Ubuntu 14.04. I've installed XFCE and use X2GO to remote desktop to the machine.
I've downloaded the VS Code and unzipped the files. When I run Code from a terminal I get the following error:
WouterDeKort#UbuntuDev:~/tools/web/visual-studio-code$ ./Code
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
WouterDeKort#UbuntuDev:~/tools/web/visual-studio-code$ [ , [Error: channel closed] ]
Any idea what I'm doing wrong?
DISCLAIMER ;-) I'm a total Linux newby. I've just installed Linux for the first time today and I have no idea what I'm doing ;-)
The work-a-round is in issue 3451. After running this, I was able to launch it from Debian Jessie with LXDE over X2Go.
sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1
I have the same problem using X2GO and LXDE. Works okay (but slowly) using MobaXterm so apparently this is a problem specific to X2GO.
For anyone who still wonder what is the best choice if you want to start Visual Studio Code on a headless Ubuntu - the winning combination is:
Ubuntu Server + xfce + nomachine remote desktop
VS Code starts immediately without any hacks, you can set your resolution however you like, and nomachine is blazingly fast.
I'm using NetBeans IDE 8.0.2 on my Win7 machine to develop Raspberry Pi opencv C++ application.
I'm building & debugging the application remotely on the Raspberry Pi from my Win7 machine.
At run time the application fails with "Gtk-WARNING **: cannot open display:" error when reaches the line:
imshow("source", src);
When I'm running the exact same application from the Raspberry Pi and not remotely via SSH everything works as expected.
Is there any way that I can configure NetBeans to open GTK windows at the Raspberry Pi?
The solution is to add DISPLAY=:0 Environment variable.
At File menu select Project Properties (yourprojectname) to open Project Properties window.
At Categories: click Run and then click Environment, add variable name DISPLAY with value :0
Good luck
I haven't actually tried this with the Rasberry Pi, but assuming it is like other linux systems perhaps this will get you started.
To have the Gtk program display on your windows system will need a version of X Windows ( the linux/unix graphics server) for Windows the operating system. You can get it as one of the packages in Cygwin. (http://x.cygwin.com/) Get cygwin https://cygwin.com/index.html during setup select the xinit package. You also either need to enable port-forwarding in ssh or set the DISPLAY variable on the Rasberry Pi to your windows host:0.
To have the Gtk program display on the Rasberry Pi when started from Windows you just need to allow remote hosts to open windows.
Try the command :
xhost +
in the Rasberry Pi shell before trying to have the program started from windows.
Another option would be to start the program on the Rasberry Pi with gdbserver and then attach to the already running program with Netbeans.
You will need to install the gdbserver plugin for Netbeans.
An alternative to getting the X window manager working on Windows would be to get a remote desktop running on both machines. VNC is a popular client and server for this. This would allow you to run the window for Netbeans and use the system as if it were your desktop from another location.
There is even a download specifically for Raspberry pi here:
https://www.realvnc.com/download/vnc/latest/
I'm trying to run a .exe file (that uses some other .dll files) with wine, in Ubuntu 11.04, command line, but i get an error regarding the x server not being started and that a window is being created (i attached a screenshot).
When I run it normally (normal ubuntu boot, x server running) everything is ok, but actually, no window is displayed, which is normal because no window is needed for the program to run. So I just want to know if there is a way to avoid that: somehow simulating that the x server is open or to set $DISPLAY in some way to "fool" the program.
Just use Xvfb.
Xvfb :1 &
DISPLAY=:1 wine ...