2

I have a Windows 10 x64 machine and I have recently been given an account on a more poweful Linux machine. I'm hoping to run MATLAB files created on the Windows machine on this Linux machine which, I'm told, has its own MATLAB installation.

I have been able to log in to the Linux machine from PuTTy (on the Windows machine) but don't know how to proceed further once I get to the command line.

If possible, I hope for a solution that works like Windows Remote Desktop where I can interact with the remote unix machine via GUI.

I have switched my Windows to developer's mode and installed the Ubuntu bash shell.

  • VNC server on the Linux machine, VNC client on the Windows machine. Ubuntu for example comes with "Desktop Sharing" which is a GUI over the VNC server vino. – phk Sep 22 '16 at 15:58
  • You should talk to the administrator(s) of the Linux machine - if they're smart, they will have restricted what services and ports may be accessed from outside - for example, they may require you to configure your PuTTY (or other SSH client) to securely tunnel X11 (GUI) traffic – steeldriver Sep 22 '16 at 16:03
  • @phk Thanks. Which VNC client / server pair would you recommend please? – yurnero Sep 22 '16 at 20:13
  • 1
    Yes that would be correct: either SSH with X11 forwarding (requires an X server at your end) or VNC (requires a VNC client at your end - and a VNC server at theirs, which likely they would require you to access via an SSH tunnel anyway). – steeldriver Sep 22 '16 at 20:23
  • 1
    @yurnero: The last time I used this solution I believe I used the afermentioned server built-in into Ubuntu and as a client TightVNC. – phk Sep 22 '16 at 21:15
2

The simplest way would be to install VNC server on the Linux machine and a VNC client on the Windows. Check with the server admins...they might have VNC running already and can provide instructions how to connect to it, or set it up for you. Also, check if they allow X11 forwarding through SSH and if they have instructions for that already. (I'm assuming that a server with Matlab has some form of X11 forwarding enabled...otherwise it seems pointless.) If they have or are willing to setup a VNC server for you, the rest of this answer does not matter.

If they generally allow X11 forwarding, you can enable X11 forwarding from PuTTY with these steps:

  1. Install an X server on your Windows machine. One open source option is Xming.
  2. Start XMing, select Multiple Windows in the config and set display number as 0, and click next until config is finished.
  3. After that, in PuTTY, expand the Connections options -> SSH -> X11.
  4. Check Enable X11 Forwarding and in the Display Location put :0.0 or localhost:0.0.
  5. Connect to the server and just run Matlab from the command line in Linux and it should open a Matlab window on your Windows machine.

Same info with some troubleshooting details here: http://aruljohn.com/info/x11forwarding/

I did this with Matlab on a server a few months ago, so I know this works reasonably well. The interactive experience is a little slow, but not that bad.

  • Thank you for the detailed answer. I have followed Steps 1-4 in your answer. Please allow me to ask a few quick follow up questions. (1) Which VNC server / client pair do you recommend? (2) The Xming solution is an alternative to the VNC server / client approach, isn't it? (3) I have a spare Win machine that I can install Ubuntu to, does that simplify things? – yurnero Sep 22 '16 at 20:11
  • 2
    There's also MobaXterm - an SSH client (like PuTTY) with a built in X server (like Xming) – steeldriver Sep 22 '16 at 20:20
  • 2
    @yurnero There are also ways to run an X server in Cygwin (or the fork MSYS2 I guess) but I can't really tell you what looks/behaves best. And yes, X forwarding is totally different, I didn't originally mention because you specifically said were looking specifically for a solution similar to RDP (and on Windows an equivalent to X forwarding does not exist). – phk Sep 22 '16 at 21:18
  • 1
    @yurnero 1. TightVNC is decent and both client and server are available through apt-get. 2. Yes, XMing is an alternative to VNC, using X11 forwarding from Windows to Linux. 3. If you have Ubuntu, you can use VNC or use X11 forwarding by using ssh -X. You won't need to install Xming in this case. But X11 forwarding needs to be enabled on the server as well. – Munir Sep 22 '16 at 21:24
0

I agree with the previous answer, the fundamental thing you need to do is set up a server on linux to send the graphics over the network, and have client software on the Windows machine that will connect to the linux's server software which is pumping its graphics over the network.

But be aware if the linux machine has a nvidia graphics card or more specifically the software on the linux system uses the graphics card to render images that you are likely to have problems. With many of the free approaches to remote desktop for linux such as tightvnc, they will not push graphics from the graphics card over the network. This is also true for software that uses hardware accelerated OpenGL.

If your matlab (or whatever software) does everything at the prompt and just crunches numbers without doing graphics then you will probably be ok. But if you are doing high end matlab with graphics it might fail. And with any software if it uses OpenGL to display graphics that many of these free remote desktops for linux won't work. You will get a specific OpenGL error when launching the software remotely, I forget the specific syntax at the moment.

I use NICE-DCV which is based on RealVNC, but it is not free. you can read their website for info.

Another option I know of is NxMachine from nomachine.com. You can test drive NxMachine for free to see if it suits your needs. I have experience with it and is rather easy and quick to get going with.

you can refer to en.wikipedia.org/wiki/VirtualGL and virtualgl.org/About/Introduction which gives a good description of the problem at large which is all about remote opengl.

This is for getting a fully functional remote desktop connection to linux.

  • i forgot to mention, usually tightvnc is available on most linux distributions. So for starters all you may need is the tightvnc client installed on your windows machine, and simply connect to your linux system via linuxhostname:1. refer to tightvnc.com for more info. then if the software you need to run in linux does not work because of opengl then what i described above applies. – ron Jan 23 '17 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.