Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X session in Git Bash on Windows?

I'm using Git Bash on Windows. I have used Git Bash to SSH into a UNIX machine and tried to run a program with a GUI. I got the message: LINUX/UNIX system detected, but unable to access X11 display.

I have X-Win 32 (commercial). I've also used Xming which is like a free version of X-Win 32 but has problems with certain graphics.

Is there a way I can get this remote system to access my X11 display through X-Win 32 or Xming or through any way ?

I'd just like to run programs like MATLAB, with a GUI popping up, from UNIX machines, when SSH'ed into that machine via Git Bash on Windows.

I also have PuTTY and Secure Shell Client installed, but would prefer to work exclusively form Git Bash because it requires less buttons to press in order to ssh to other machines.

If it's impossible to get this working on Git Bash I'd like to get it working with PuTTY (Secure Shell Client is good but has discontinued updates permanently).

like image 292
Pearson Avatar asked Apr 12 '12 18:04

Pearson


People also ask

How do I run Git bash on Windows?

Open the Start menu by clicking on the Windows icon and typing “Git Bash” into the search bar. The icon for Git Bash and the words “Git Bash Desktop App” will appear. Click on the icon or the words “Git Bash Desktop App” to open Git Bash.

Can I run Linux commands on Git bash?

Git Bash application provides and emulation layer for Git command line. Apart from Git commands, Git Bash also supports many Bash utilities such as ssh, scp, cat, find etc. In other words, you can run many common Linux/Bash commands using the Git Bash application.


1 Answers

This Q is rather old, but anyway... I was (at last...) able to get this working using the ssh command from Git for Windows and XMing. All I had to do was to set the DISPLAY environment variable to localhost:0.0 (it was set to only :0.0).

like image 171
Stefan Näwe Avatar answered Sep 22 '22 17:09

Stefan Näwe