How to programmatically connect to Windows XMing X11 - node.js

I would like to programmatically (through node.js) connect to a X11 server running on the localhost installed on Windows to redirect the display of X application running on a remote linux server. For my use case, I'm considering Xming on my localhost but that's not a strong requirement.
I'm usually working on Linux and there I know I can connect either to the socket /tmp/.X11-unix/X0 or to localhost:6000 to trigger some display on my localhost (see for example the code on node.js ssh2 https://github.com/mscdex/ssh2#forward-remote-x11-connections).
However, I absolutely do not know how to proceed on Windows;
Thank you for your help.

Related

Using XRDP to connect linux to Windows PC from LINUX Client

Has anyone successfully used XRDP/freeRDP to remote login to a Windows PC from a LINUX Client? I did some research on the matter and I found there may be incompatibility issues. However those posts were quite old.
I would like to use the latest XRDP or freeRDP
The site says the following:
"The goal of this project is to provide a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients.
Unlike Windows NT/2000/2003/2008/2012 server, xrdp will not display a Windows desktop but an X window desktop to the user.
So it sounds like I can communicate between a Linux Box and Windows. But it sounds like the Windows PC can only be the client logging into a Linux Server and not vice-versa."
Is this true?
That's not true. You can using a freeRDP client in Linux connecting to a server on Windows. I've just tried the latest freeRDP code in Ubuntu, and I've tested Win7/Win10, both are OK.
Follow the instruction of freeRDP in the following link:
https://github.com/FreeRDP/FreeRDP/wiki/Compilation
and hope you make it.
Ps: There may be some connectivity issues, like firewall or something, just google it.

How to remotely restart a Linux server without SSH?

I have a Hummingboard running Ubuntu 14.04 which I use to work remotely on my coding projects. Sometimes I cannot connect using SSH or VNC and I have to physically unplug and replug it. Is there a way to do this process remotely?
For example if you have ibm server you can look for something like that
Or other solution like this or this

Cannot connect to a server on Cent OS Machine

I have installed CentOS as a virtual machine (using Virtual Box), on my Windows OS. I am running a lighttpd server on my CentOS machine. I am trying to access the server, from my browser, which is running on Windows, using the IP address and port number. But, I am getting the following error: Firefox can't establish a connection to the server at 10.209.145.152:8080.
Also, when I am running the server on Ubuntu(as a virtual machine using VMware Player), I am able to connect from the Window's browser successfully. Can anyone please suggest me, what I might have been missing on CentOS Machine. Thanks.
I would suggest that it is something that has to do with the VM setup. Compare the configuration of your Ubuntu VM and the CentOSVM. In order to connect from Windows to the VM, I think that you need to setup a bridge network connection rather than NAT. But I am not sure, so I would suggest you try all the different options.
Hope that helps!

How Can I connect to Amazon Linux instance using Remote Desktop from Windows 7?

I created an EC2 Amazon Linux instance (yes, an amazon version of linux..)
it is launched but I can't connect using Remote Desktop...
am I trying to do something crazy here?
I got a message that Remote Computer is not available on the network
If you mean Windows RDP (Remote Desktop) that is your problem. Most likely you will need to use an SSH client to connect. I suggest Putty.
You should've received an SSH key when you setup your server. You will need to convert that key using PuttyGEN (same page as the Putty download) to convert it then use it with Putty to access the server.
Trying to walk you through the process of installing a GUI and VNC on the server is a bit much for here but give this video a shot. It seems pretty thorough and from skipping through it I saw no obvious errors in his process.
Try installing the vnc4server package. Then you can use a client such as TightVNC to connect from a Windows machine. You'll also need to open up port number 5900 in your firewall, which is the default for VNC.
You'll also have to have a desktop environment installed on your EC2 instance - by default you may only have the server packages which will not give you a GUI.
For your information, some folks posted remote desktop conf for EC2 instances.
http://activeintelligence.org/blog/archive/remote-graphical-linux-desktop-on-ec2/

Re-attatching an X server view of a lost process

I'm running Xorg and my (Qt) program daemonises itself. Now I log out and restart the X server. When I log in again my process is still running fine, but I can't see it.
Is there a way of attatching the new incarnation of the X server to the old process?
If I don't restart the whole server, but log out and in again, is there a way to look at the old process?
Thanks
xpra should achieve your requirement. And it can also start tcp connection (without need of ssh). Start it on the you server:
xpra start :100 --start-child=xterm --bind-tcp=0.0.0.0:10000
Connect it on your client:
xpra attach tcp:SERVERHOST:10000
You can also use mac or windows xpra app to connect it. I tried in on win7 and osx10.10.2. The download link:
windows: https://www.xpra.org/dists/windows/Xpra_Setup.exe
mac: https://www.xpra.org/dists/osx/x86/Xpra.dmg
After the connection to the X server is lost, it is not possible to regain it.
There was an xserver proxy called xmove, but it is quite deprecated and doesn't work with several newer X extension, which are likely used by modern toolkits.
You could try to run your process in another virtual X server like xvnc or (better) NX. NX is a X proxy technology developed by NoMachine. There exist free implementations of NX servers as well.
If you run your program inside such a server, it is possible to attach and detach from it from arbitrary graphical environments.
Use something like Xpra: it allows you to run applications on an off-screen X11 server to which you can re-attach whenever needed, and from remote machines too. It supports "seamless" sessions too so the windows will appear just like local windows.
Practical example:
xpra start :10 --start-child=/bin/YOURAPP
Then whenever you want to re-attach (say after an X11 server restart):
xpra attach :10
Or from a remote machine:
xpra attach ssh://THESERVERHOSTNAMEORIP/10

Resources