-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support local X server #1181
Comments
@FranklinYu you said "I tried (temporarily) disabling authentication in my local X server (VcXsrv). After that I manually set $DISPLAY environment variable (inside session of course), then it worked", how to "disabling authentication in my local X server (VcXsrv)", and "manually set $DISPLAY"? |
@fungtion Keywords:
I didn’t went into details about that in this issue because it is specific to VcXsrv, not something the PowerShell team should care about. In addition, it has very strong security implication, so don’t do it unless you understand the consequence. |
@FranklinYu Thanks |
I am having a similar problem. I'm on a Windows 10 client trying to reach a Red Hat server. Using Putty with Xming on the client side, I can get X11 forwarding to work. I can even open an SSH connection through OpenSSH, manually set DISPLAY for that other session to be whatever Putty set it as, and open graphical programs from cmd. But using OpenSSH alone, DISPLAY never gets set in the ssh session, and if I close Putty, things start complaining they can't open the display. Is OpenSSH just broken? I feel like -X should work seamlessly like in linux. |
I believe the key line here is
Since there is no xauth program in the Windows environment, SSH can't generate the auth info. So, there are two ways for having X11 with native OpenSSH for Windows:
|
Actually, it worked for me without xauth at all.
it works. Ensure you have configured the SSH server correctly, you can use https://wiki.archlinux.org/index.php/OpenSSH#X11_forwarding as a reference P.S. I have P.S.S. If I use |
@Kukunin In your case, is X11 authentication enable in VcXsrv? |
frankly, I don't know. It's totally a default config of VcXsrv with no changes. But I configured /etc/ssh/sshd_config on the archlinux server to enable X11. |
Have you solved it? |
@nicksunyang No, this is not a problem, it’s a lack of feature. @manojampalam Please replace “Issue-Discussion” label with “Issue-Enhancement” since we don’t have this feature yet, based on the discussion above. |
@fungtion VcXsrv has some command line parameters. You can create a shortcut with below command, which includes the parameter to disable the authentication: "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl |
@github-samson Thank you. As I have mentioned:
|
do you enable Disable access control? in Vcxsrv I enabled Disable access control , set display number: 0, then it works, |
@nicksunyang Please see #1181 (comment) |
Trusted mode is now supported. |
the debug log showing For example:
|
Please answer the following
"OpenSSH for Windows" version
7.7.1.0
Server Operating System
Remote SSHD running on Arch Linux
Client Operating System
Windows 10 Enterprise
background
I know some basic concept about SSH connection, but I have no idea how X-Forwarding works.
My remote is a Linux VM, with some GUI application installed. My local machine is Windows, with Portable OpenSSH (this project) installed. X server (VcXsrv in my case) is installed in local Windows machine.
Portable OpenSSH story
I started the local X server on Windows on
localhost:0.0
, then ranI expected this to “just work”, but in the SSH session,
DISPLAY
is unset (not even empty string). I startedxclock
to test; it complained thatDISPLAY
is not set:I manually set
export DISPLAY=franklinyu-windows:0.0
, thenxclock
saidI suppose that authentication information should be forwarded by the SSH client (Portable OpenSSH in this case). I quit the session and started another with verbose flag; I noticed below messages:
other experiments
I tried PuTTY (because there is many tutorials for PuTTY + VcXsrv). Simply replacing OpenSSH with PuTTY worked (PuTTY need to be told about
$DISPLAY
and X forwarding, of course), with all the other building blocks (X server, remote Linux) unchanged. PuTTY is my current solution, but I really prefer this project over PuTTY, for obvious reason.I tried (temporarily) disabling authentication in my local X server (VcXsrv). After that I manually set
$DISPLAY
environment variable (inside session of course), then it worked: all my GUI application were able to be started from SSH session. However, in this case I suppose there is no X Forwarding, and there may be security concern.(Originally posted on #427 (comment).)
The text was updated successfully, but these errors were encountered: