Running Python GUI apps on C9.io - python-2.7

Does anyone know if it is possible to run python-gui apps, like wxPython, on a c9.io remote server? I have my home server set up with c9 via SSH, and no issues logging in and running apps in the terminal on the VM. However, when I try to run GUI apps, I get the following error message.
Unable to access the X Display, is $DISPLAY set properly?
After searching and searching, I can't seem to find a guide or anything in the docs that detail how to set $DISPLAY in the script. X display is installed and active on my server, but I don't know how to configure the c9 script to access it properly. Any assistance would be appreciated!

I don't know if Cloud9 supports it but normally to run a remote GUI application you would have ssh forward the X11 communication over the ssh connection via a tunnel. So basically the application is running on the remote system and it is communicating with a local X11 server which provides you with the display and handling of the mouse and keyboard.
If you run ssh with the -X parameter then it will attempt to set up the X11 tunnel and set $DISPLAY in the remote shell so any GUI applications you run there will know how to connect to the X11 tunnel. Bw aware however that this is something that can be turned off on the remote end, so ultimately it is up to Cloud9 whether they will allow you to do this.

Related

How to make SSH in Google cloud keep running after closing the browser whilst running a .exe-file?

I’m running a gameserver, more specifically a Terraria server on GCP. When I run ./TerrariaServer.bin.x86_64 (exe-file)
I have to input some settings for the server to run. Hence, nohup and & have not worked for me to keep the server running after I close the SSH-terminal. Any suggestions on how to achieve this?
Do not use hohup for SSH sessions. The program will be terminated when the SSH session ends.
Instead use programs like screen or tmux.
Techniques to Keep SSH Session Running After Disconnection

Access GCP Debian VM in GUI mode

** I am not a Linux expert.
I have spun a Debian 10 VM in GCP which i need to access like in a GUI mode and be able to download and install some required applications for development and experiment purposes.
I think i have installed xrdp, display GUI packages, firefox, apache2 etc, but not able to land into GUI mode or browser mode.
1- I can't invoke/run firefox with "Display" error - Error: no DISPLAY environment variable specified
2- RDP from my local laptop also being refused with "connection refused" error.
Need some help.

cannot connect to X server error showed up in GCP

I create a python GUI by PyQt4, and now I'm trying to save this program into Google Cloud Platform(Compute engine) so that I can remotely execute it. But after I execute my python program, there's a problem showed up, the console showed the message :"cannot connect to X server". I also try to run with "xvfb-run python GUI.py", although it started to run but the graphical user interface didn't showed up, is there any suggestion? Thanks in advance!
In order to run a GUI application remotely on a Linux/Unix box, you need to have a X server running on your local machine and ready to accept a connection. Easiest way to do this is to SSH in and enable X11Forwarding either in your client config, your personal version of the client config, or on the command line (ie, the -X or -Y options).
Us Linux folks already have an X server, as do them BSD folks. Mac users can install it and it integrates quite nicely on OS X. Windows users need to either pay some $ and buy a license for a commercial product, or use cygwin-x.

Remote debugging .net core 2.0 console app over ssh

I am building a .net core 2.0 console app on windows 10 but I want to debug it on a remote linux server running debian 9.
I found this article:
https://blogs.msdn.microsoft.com/devops/2017/01/26/debugging-net-core-on-unix-over-ssh/
but where I get stuck is selecting the SSH connection. My remote server has authentication and if I enter the user#ip:port it doesn't find anything.
I found some mention of using SSH tunnelling but as there is no dotnet process listening on the server (it's installed but it doesn't have any listening service running I can see) I am unsure exactly what port I'm meant to be tunnelling or even which direction to tunnel it.
What do I need to do to get my SSH connection visible in the debugger?
I just tried this and I found that the Find.. button doesn't do anything either.
First you enable SSH connections in your Linux host (in my case, Ubuntu, I had to run sudo ufw allow ssh). Test things out by opening cmd on Windows and doing ssh user#host.
Then, on Visual Studio, in the SSH attach to process window, make sure you hit "refresh" and check the "show processes from all users" box. You should see the "dotnet" process running.
EDIT: you should be prompted for the remote host's password at some point. Here's the dialog shown when I changed the password on the remote host and then attempted to debug.

How to set a remote django develop environment?

I have to set a development environment on a ubuntu machine(16.04).
It's django+postgresql+Nginx, I.think I could install all these things together on that machine,but I totally don't have any idea about how to connect it by using pycharm running on my pc, and how to manipulate the database.
Is there anyone could tell me how to connect it. This is the first time I have to use a remote machine.
By the way, my pc and ubuntu machine are in the same LAN, but there is another person who were asked to write db are not.
I hope I could get some suggestions from the community.
One of the best and common way is to use SSH.
Here you can find an official guide on how to enable SSH server on Ubuntu 16.04
You can use Putty to connect from Windows PC to your SSH server or if you're using Mac or Linux, there should be already installed SSH client. So, just ssh username#servername
Use SSH. Assuming you're on Linux, open a terminal and type:
ssh username#local-ip-address-of-machine
and then type your password when prompted. Your terminal window essentially acts as a terminal on your remote machine. From here, I suggest you research Docker in order to set up a custom environment for your Django project. I have only told you how to connect since that's your question, and there are plenty of tutorials on setting up Django and Docker. If the other person wants to connect, you will need to port forward on your router port 22 on the local IP of the machine.
If you haven't got SSH set up, this page tells you how.